summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-31 02:05:50 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-31 02:05:50 +0000
commitc16600fee5d3b2d01823e3e793d1fc4ad794a521 (patch)
treefb169ad1db35aa3b4bed0296019d7cd4049ea193
parent23f4c6b43947ea1d0bee370cb0cb3b9f15220df4 (diff)
Removed check for HAVE_VA_LIST_AS_ARRAY, it broke MemoServ.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1893 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--CMakeLists.txt8
-rw-r--r--include/services.h6
-rw-r--r--include/sysconf.h.cmake1
-rw-r--r--include/sysconf.h.in1
-rw-r--r--va_list_check.c19
5 files changed, 1 insertions, 34 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e42e6e5be..71c7fd41d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,14 +144,6 @@ if(NOT MSVC)
set(LDFLAGS "${LDFLAGS} -lsocket")
endif(HAVE_SOCKET_LIB)
endif(NOT WIN32)
-
- # Check if va_list can be copied as an array, and if it can, set the flag for it
- try_run(RUN_VA_LIST_AS_ARRAY COMPILE_VA_LIST_AS_ARRAY
- ${Anope_SOURCE_DIR} ${Anope_SOURCE_DIR}/va_list_check.c
- )
- if(COMPILE_VA_LIST_AS_ARRAY AND NOT RUN_VA_LIST_AS_ARRAY)
- set(HAVE_VA_LIST_AS_ARRAY 1)
- endif(COMPILE_VA_LIST_AS_ARRAY AND NOT RUN_VA_LIST_AS_ARRAY)
endif(NOT MSVC)
# If DEFUMASK wasn't passed to CMake, set a default depending on if RUNGROUP was passed in or not
diff --git a/include/services.h b/include/services.h
index d27fc5f52..78589e98b 100644
--- a/include/services.h
+++ b/include/services.h
@@ -125,11 +125,7 @@
# define VA_COPY(DEST, SRC) memcpy ((&DEST), (&SRC), sizeof(va_list))
# endif
#else
-# ifdef HAVE_VA_LIST_AS_ARRAY
-# define VA_COPY(DEST,SRC) (*(DEST) = *(SRC))
-# else
-# define VA_COPY(DEST, SRC) va_copy(DEST, SRC)
-# endif
+# define VA_COPY(DEST, SRC) va_copy(DEST, SRC)
#endif
#ifdef _AIX
diff --git a/include/sysconf.h.cmake b/include/sysconf.h.cmake
index c19e634cf..5884a3284 100644
--- a/include/sysconf.h.cmake
+++ b/include/sysconf.h.cmake
@@ -16,7 +16,6 @@
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_SYS_SELECT_H 1
#cmakedefine HAVE_UMASK 1
-#cmakedefine HAVE_VA_LIST_AS_ARRAY 1
#cmakedefine RUNGROUP "@RUNGROUP@"
#cmakedefine SERVICES_BIN "@SERVICES_BIN@"
diff --git a/include/sysconf.h.in b/include/sysconf.h.in
index 5acfa3d74..83aec699e 100644
--- a/include/sysconf.h.in
+++ b/include/sysconf.h.in
@@ -16,7 +16,6 @@
#undef HAVE_STRLCPY
#undef HAVE_SYS_SELECT_H
#undef HAVE_UMASK
-#undef HAVE_VA_LIST_AS_ARRAY
#undef RUNGROUP
#define SERVICES_BIN "services"
diff --git a/va_list_check.c b/va_list_check.c
deleted file mode 100644
index 7f13379d8..000000000
--- a/va_list_check.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdlib.h>
-#include <stdarg.h>
-
-void foo(int i, ...)
-{
- va_list ap1, ap2;
- va_start(ap1, i);
- ap2 = ap1;
- if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) exit(1);
- va_end(ap1);
- va_end(ap2);
-}
-
-int main()
-{
- foo(0, 123);
- return 0;
-}
-