From dec1780f1250a0d4bc9061f4a9a8445c6f247268 Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Tue, 13 Apr 2010 16:16:27 +0200 Subject: [PATCH 1/2] add missing HAVE_ macros to cmake --- cmake/ConfigureChecks.cmake | 7 ++++++- cmake/config.h.cmake | 23 +++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index c4e3359..5c405a8 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -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 diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index a4aae42..6965c03 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -163,12 +163,27 @@ /* 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 @@ -196,9 +211,13 @@ # 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) -- 1.7.0.4