Fix LDAP compile error when LDAP is not available.

Fixed a typo in the LDAP configure code and made sure NULL is defined
in a test programs that need it.
This commit is contained in:
Dan Fandrich 2007-10-15 16:24:46 +00:00
parent 95446f694b
commit 001a2d9b67
2 changed files with 7 additions and 2 deletions

View File

@ -266,6 +266,7 @@ 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
@ -295,6 +296,7 @@ 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
@ -434,6 +436,7 @@ 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
@ -495,6 +498,7 @@ 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
@ -507,7 +511,7 @@ AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
#endif #endif
#ifdef HAVE_LDAP_H #ifdef HAVE_LDAP_H
#include <ldap.h> #include <ldap.h>
#endif" #endif
],[ ],[
BerValue *bvp = NULL; BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp); BerElement *bep = ber_init(bvp);
@ -1685,6 +1689,7 @@ 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>

View File

@ -242,7 +242,7 @@ static const struct Curl_handler * const protocols[] = {
&Curl_handler_ldap, &Curl_handler_ldap,
#endif #endif
#if defined(HAVE_LDAP_SSL) && !defined(CURL_DISABLE_SSL) #if !defined(CURL_DISABLE_LDAP) && defined(HAVE_LDAP_SSL)
&Curl_handler_ldaps, &Curl_handler_ldaps,
#endif #endif