add missing HAVE_ macros to cmake
authorRomain Pokrzywka <romain@kdab.com>
Tue, 13 Apr 2010 14:16:27 +0000 (16:16 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 13 Apr 2010 18:17:14 +0000 (20:17 +0200)
cmake/ConfigureChecks.cmake
cmake/config.h.cmake

index c4e3359..5c405a8 100644 (file)
@@ -24,11 +24,16 @@ check_symbol_exists(getpeerucred "ucred.h"          HAVE_GETPEERUCRED)       #
 check_symbol_exists(nanosleep    "time.h"           HAVE_NANOSLEEP)          #  dbus-sysdeps.c
 check_symbol_exists(getpwnam_r   "errno.h pwd.h"    HAVE_POSIX_GETPWNAM_R)   #  dbus-sysdeps-util-unix.c
 check_symbol_exists(setenv       "stdlib.h"         HAVE_SETENV)             #  dbus-sysdeps.c
-check_symbol_exists(socketpair   "sys/socket.h"     HAVE_SOCKETPAIR)         #  dbus-sysdeps.c
 check_symbol_exists(unsetenv     "stdlib.h"         HAVE_UNSETENV)           #  dbus-sysdeps.c
+check_symbol_exists(clearenv     "stdlib.h"         HAVE_CLEARENV)           #  dbus-sysdeps.c
 check_symbol_exists(writev       "sys/uio.h"        HAVE_WRITEV)             #  dbus-sysdeps.c, dbus-sysdeps-win.c
 check_symbol_exists(setrlimit    "sys/resource.h"   HAVE_SETRLIMIT)          #  dbus-sysdeps.c, dbus-sysdeps-win.c, test/test-segfault.c
+check_symbol_exists(socketpair   "sys/socket.h"     HAVE_SOCKETPAIR)         #  dbus-sysdeps.c
 check_symbol_exists(socklen_t    "sys/socket.h"     HAVE_SOCKLEN_T)          #  dbus-sysdeps-unix.c
+check_symbol_exists(setlocale    "locale.h"         HAVE_SETLOCALE)          #  dbus-test-main.c
+check_symbol_exists(localeconv   "locale.h"         HAVE_LOCALECONV)         #  dbus-sysdeps.c
+check_symbol_exists(strtoll      "stdlib.h"         HAVE_STRTOLL)            #  dbus-send.c
+check_symbol_exists(strtoull     "stdlib.h"         HAVE_STRTOULL)           #  dbus-send.c
 
 check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED)   #  dbus-sysdeps.c
 
index a4aae42..6965c03 100644 (file)
 /* Define to 1 if you have unsetenv */
 #cmakedefine   HAVE_UNSETENV 1
 
+/* Define to 1 if you have clearenv */
+#cmakedefine   HAVE_CLEARENV 1
+
 /* Define to 1 if you have writev */
 #cmakedefine   HAVE_WRITEV 1
 
 /* Define to 1 if you have socklen_t */
 #cmakedefine   HAVE_SOCKLEN_T 1
 
+/* Define to 1 if you have setlocale */
+#cmakedefine   HAVE_SETLOCALE 1
+
+/* Define to 1 if you have localeconv */
+#cmakedefine   HAVE_LOCALECONV 1
+
+/* Define to 1 if you have strtoll */
+#cmakedefine   HAVE_STRTOLL 1
+
+/* Define to 1 if you have strtoull */
+#cmakedefine   HAVE_STRTOULL 1
+
 // structs
 /* Define to 1 if you have struct cmsgred */
 #cmakedefine    HAVE_CMSGCRED 1
 #  define gid_t int
 # else
 #  define snprintf _snprintf
-#  define strtoll _strtoi64
-#  define strtoull _strtoui64
    typedef int mode_t;
+#  if !defined(_WIN32_WCE)
+#    define strtoll _strtoi64
+#    define strtoull _strtoui64
+#    define HAVE_STRTOLL 1
+#    define HAVE_STRTOULL 1
+#  endif
 # endif
 #endif // defined(_WIN32) || defined(_WIN64)