From: Yang Tse Date: Mon, 15 Oct 2007 23:58:11 +0000 (+0000) Subject: Avoid depending on a header file for the definition of NULL X-Git-Tag: curl-7_17_1~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbb5518ab6f4dc6737d5c7ccb325cbdb0830cd08;p=curl Avoid depending on a header file for the definition of NULL --- diff --git a/acinclude.m4 b/acinclude.m4 index fe62273f2..0c34a8c8d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -181,10 +181,12 @@ AC_DEFUN([CURL_CHECK_HEADER_WINLDAP], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ #undef inline +#ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include +#endif #include ],[ #ifdef __CYGWIN__ @@ -219,10 +221,12 @@ AC_DEFUN([CURL_CHECK_HEADER_WINBER], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ #undef inline +#ifdef HAVE_WINDOWS_H #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include +#endif #include #include ],[ @@ -266,11 +270,13 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [ #endif #include #else -#include #ifdef HAVE_SYS_TYPES_H #include #endif #endif +#ifndef NULL +#define NULL (void *)0 +#endif #include ],[ BerValue *bvp = NULL; @@ -296,11 +302,13 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [ #endif #include #else -#include #ifdef HAVE_SYS_TYPES_H #include #endif #endif +#ifndef NULL +#define NULL (void *)0 +#endif #ifndef LDAP_DEPRECATED #define LDAP_DEPRECATED 1 #endif @@ -436,11 +444,13 @@ AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [ #endif #include #else -#include #ifdef HAVE_SYS_TYPES_H #include #endif #endif +#ifndef NULL +#define NULL (void *)0 +#endif #ifndef LDAP_DEPRECATED #define LDAP_DEPRECATED 1 #endif @@ -498,11 +508,13 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [ #endif #include #else -#include #ifdef HAVE_SYS_TYPES_H #include #endif #endif +#ifndef NULL +#define NULL (void *)0 +#endif #ifndef LDAP_DEPRECATED #define LDAP_DEPRECATED 1 #endif @@ -1689,10 +1701,12 @@ dnl AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[ AC_MSG_CHECKING([if "localhost" resolves]) AC_TRY_RUN([ -#include #include #include #include +#ifndef NULL +#define NULL (void *)0 +#endif int main () {