1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Avoid depending on a header file for the definition of NULL

This commit is contained in:
Yang Tse 2007-10-15 23:58:11 +00:00
parent a83b5d1b67
commit fbb5518ab6

View File

@ -181,10 +181,12 @@ AC_DEFUN([CURL_CHECK_HEADER_WINLDAP], [
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([ AC_LANG_PROGRAM([
#undef inline #undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif #endif
#include <windows.h> #include <windows.h>
#endif
#include <winldap.h> #include <winldap.h>
],[ ],[
#ifdef __CYGWIN__ #ifdef __CYGWIN__
@ -219,10 +221,12 @@ AC_DEFUN([CURL_CHECK_HEADER_WINBER], [
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([ AC_LANG_PROGRAM([
#undef inline #undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#endif #endif
#include <windows.h> #include <windows.h>
#endif
#include <winldap.h> #include <winldap.h>
#include <winber.h> #include <winber.h>
],[ ],[
@ -266,11 +270,13 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [
#endif #endif
#include <windows.h> #include <windows.h>
#else #else
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#endif #endif
#ifndef NULL
#define NULL (void *)0
#endif
#include <lber.h> #include <lber.h>
],[ ],[
BerValue *bvp = NULL; BerValue *bvp = NULL;
@ -296,11 +302,13 @@ AC_DEFUN([CURL_CHECK_HEADER_LBER], [
#endif #endif
#include <windows.h> #include <windows.h>
#else #else
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#endif #endif
#ifndef NULL
#define NULL (void *)0
#endif
#ifndef LDAP_DEPRECATED #ifndef LDAP_DEPRECATED
#define LDAP_DEPRECATED 1 #define LDAP_DEPRECATED 1
#endif #endif
@ -436,11 +444,13 @@ AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [
#endif #endif
#include <windows.h> #include <windows.h>
#else #else
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#endif #endif
#ifndef NULL
#define NULL (void *)0
#endif
#ifndef LDAP_DEPRECATED #ifndef LDAP_DEPRECATED
#define LDAP_DEPRECATED 1 #define LDAP_DEPRECATED 1
#endif #endif
@ -498,11 +508,13 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
#endif #endif
#include <windows.h> #include <windows.h>
#else #else
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#endif #endif
#ifndef NULL
#define NULL (void *)0
#endif
#ifndef LDAP_DEPRECATED #ifndef LDAP_DEPRECATED
#define LDAP_DEPRECATED 1 #define LDAP_DEPRECATED 1
#endif #endif
@ -1689,10 +1701,12 @@ dnl
AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[ AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[
AC_MSG_CHECKING([if "localhost" resolves]) AC_MSG_CHECKING([if "localhost" resolves])
AC_TRY_RUN([ AC_TRY_RUN([
#include <stddef.h>
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <netdb.h> #include <netdb.h>
#ifndef NULL
#define NULL (void *)0
#endif
int int
main () { main () {