From: Kurt Zeilenga Date: Mon, 1 Nov 1999 18:14:26 +0000 (+0000) Subject: Add configure tests for ssize_t and caddr_t and remove NT preamble X-Git-Tag: UCDATA_2_4~262 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bb1b81473b29b30b81faf725fe3f14521d0c170f;p=openldap Add configure tests for ssize_t and caddr_t and remove NT preamble (excepting WIN32_LEAN_AND_MEAN). Rework openlog/closelog use to eliminate need for defines. --- diff --git a/acconfig.h b/acconfig.h index cc19afa69a..57dc4fc7d4 100644 --- a/acconfig.h +++ b/acconfig.h @@ -11,29 +11,8 @@ #ifndef _LDAP_PORTABLE_H #define _LDAP_PORTABLE_H -/* --------------------------------------------------- */ -/* begin of WINNT specific entries */ - -#if defined(WINNT) || defined(_WIN32) - -/* don't suck in all of the win32 api */ -#define WIN32_LEAN_AND_MEAN - -/* preprocess out undefined functions */ -#define LOG_DEBUG 0 -#define openlog(a, b) -#define closelog() - -/* define undefined types */ -#define ssize_t signed int -typedef char * caddr_t; - -#endif - -/* end of WINNT specific entries */ -/* --------------------------------------------------- */ - /* end of preamble */ + @TOP@ /* define this if needed to get reentrant functions */ @@ -81,12 +60,24 @@ typedef char * caddr_t; LBER_TAG_T */ +/* define to character address type */ +#undef caddr_t + +/* define to signed size type */ +#undef ssize_t + /* Leave that blank line there!! Autoheader needs it. */ @BOTTOM@ + /* begin of postamble */ +#ifdef _WIN32 + /* don't suck in all of the win32 api */ +# define WIN32_LEAN_AND_MEAN +#endif + #ifndef __NEED_PROTOTYPES /* force LDAP_P to always include prototypes */ #define __NEED_PROTOTYPES 1 diff --git a/clients/fax500/main.c b/clients/fax500/main.c index 440e7d4167..346ccc8bda 100644 --- a/clients/fax500/main.c +++ b/clients/fax500/main.c @@ -189,7 +189,7 @@ main ( int argc, char **argv ) #ifdef LOG_MAIL openlog( myname, OPENLOG_OPTIONS, LOG_MAIL ); -#else +#elif LOG_DEBUG openlog( myname, OPENLOG_OPTIONS ); #endif diff --git a/clients/finger/main.c b/clients/finger/main.c index 45b0d90ac3..5e8111633e 100644 --- a/clients/finger/main.c +++ b/clients/finger/main.c @@ -130,7 +130,7 @@ main( int argc, char **argv ) if ( dosyslog ) { #ifdef LOG_LOCAL4 openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL4 ); -#else +#elif LOG_DEBUG openlog( myname, OPENLOG_OPTIONS ); #endif } diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index aebc0ce667..ca03ce0a98 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -181,7 +181,7 @@ main( int argc, char **argv ) if ( dosyslog ) { #ifdef LOG_LOCAL3 openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL3 ); -#else +#elif LOG_DEBUG openlog( myname, OPENLOG_OPTIONS ); #endif } diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index 2d88e75c40..c390b283cd 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -204,7 +204,7 @@ main (int argc, char **argv ) if ( dosyslog ) { #ifdef LOG_LOCAL3 openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL3 ); -#else +#elif LOG_DEBUG openlog( myname, OPENLOG_OPTIONS ); #endif } diff --git a/clients/mail500/main.c b/clients/mail500/main.c index 4e40d1210c..9bb890449c 100644 --- a/clients/mail500/main.c +++ b/clients/mail500/main.c @@ -204,7 +204,7 @@ main ( int argc, char **argv ) #ifdef LOG_MAIL openlog( myname, OPENLOG_OPTIONS, LOG_MAIL ); -#else +#elif LOG_DEBUG openlog( myname, OPENLOG_OPTIONS ); #endif diff --git a/clients/rcpt500/main.c b/clients/rcpt500/main.c index afabd89322..3e49efdbd7 100644 --- a/clients/rcpt500/main.c +++ b/clients/rcpt500/main.c @@ -126,7 +126,7 @@ main( int argc, char **argv ) */ #ifdef LOG_DAEMON openlog( prog, OPENLOG_OPTIONS, LOG_DAEMON ); -#else +#elif LOG_DEBUG openlog( prog, OPENLOG_OPTIONS ); #endif } diff --git a/configure b/configure index 3a8357bfc6..1598e55b86 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # $OpenLDAP$ -# from OpenLDAP: pkg/ldap/configure.in,v 1.270 1999/11/01 02:40:57 kdz Exp +# from OpenLDAP: pkg/ldap/configure.in,v 1.271 1999/11/01 16:36:10 kdz Exp # Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved. # @@ -13285,13 +13285,85 @@ EOF fi + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:13291: checking for ssize_t" >&5 +if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval "ac_cv_type_ssize_t=yes" +else + rm -rf conftest* + eval "ac_cv_type_ssize_t=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 +echo "configure:13326: checking for caddr_t" >&5 +if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval "ac_cv_type_caddr_t=yes" +else + rm -rf conftest* + eval "ac_cv_type_caddr_t=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:13290: checking for socklen_t" >&5 +echo "configure:13362: checking for socklen_t" >&5 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_socklen_t=yes else @@ -13326,12 +13398,12 @@ EOF fi echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:13330: checking for member st_blksize in aggregate type struct stat" >&5 +echo "configure:13402: checking for member st_blksize in aggregate type struct stat" >&5 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13339,7 +13411,7 @@ int main() { struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:13343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_blksize=yes else @@ -13361,12 +13433,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:13365: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:13437: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13375,7 +13447,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:13379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -13396,12 +13468,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:13400: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:13472: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13409,7 +13481,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:13413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -13430,12 +13502,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:13434: checking for uid_t in sys/types.h" >&5 +echo "configure:13506: checking for uid_t in sys/types.h" >&5 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -13464,19 +13536,19 @@ EOF fi echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6 -echo "configure:13468: checking for sig_atomic_t" >&5 +echo "configure:13540: checking for sig_atomic_t" >&5 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { sig_atomic_t atomic; ; return 0; } EOF -if { (eval echo configure:13480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_type_sig_atomic_t=yes else @@ -13499,7 +13571,7 @@ EOF if test "$ac_cv_mingw32" != yes ; then echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:13503: checking type of array argument to getgroups" >&5 +echo "configure:13575: checking type of array argument to getgroups" >&5 if eval "test \"\${ac_cv_type_getgroups+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13507,7 +13579,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -13546,7 +13618,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -13571,13 +13643,13 @@ EOF # test for pw_gecos in struct passwd echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6 -echo "configure:13575: checking struct passwd for pw_gecos" >&5 +echo "configure:13647: checking struct passwd for pw_gecos" >&5 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -13587,7 +13659,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_gecos=yes else @@ -13609,13 +13681,13 @@ fi # test for pw_passwd in struct passwd echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6 -echo "configure:13613: checking struct passwd for pw_passwd" >&5 +echo "configure:13685: checking struct passwd for pw_passwd" >&5 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -13625,7 +13697,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_struct_passwd_pw_passwd=yes else @@ -13648,7 +13720,7 @@ fi fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:13652: checking if toupper() requires islower()" >&5 +echo "configure:13724: checking if toupper() requires islower()" >&5 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13657,7 +13729,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -13669,7 +13741,7 @@ main() exit(1); } EOF -if { (eval echo configure:13673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ol_cv_c_upper_lower=no else @@ -13692,12 +13764,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:13696: checking for working const" >&5 +echo "configure:13768: checking for working const" >&5 if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -13767,12 +13839,12 @@ EOF fi echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6 -echo "configure:13771: checking if compiler understands volatile" >&5 +echo "configure:13843: checking if compiler understands volatile" >&5 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_c_volatile=yes else @@ -13811,14 +13883,14 @@ EOF else echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:13815: checking whether byte ordering is bigendian" >&5 +echo "configure:13887: checking whether byte ordering is bigendian" >&5 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -13829,11 +13901,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -13844,7 +13916,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:13848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -13864,7 +13936,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -13903,13 +13975,13 @@ fi fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:13907: checking size of short" >&5 +echo "configure:13979: checking size of short" >&5 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < @@ -13919,7 +13991,7 @@ int main() { switch (0) case 0: case (sizeof (short) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:13923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_short=$ac_size else @@ -13942,13 +14014,13 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:13946: checking size of int" >&5 +echo "configure:14018: checking size of int" >&5 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < @@ -13958,7 +14030,7 @@ int main() { switch (0) case 0: case (sizeof (int) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:13962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_int=$ac_size else @@ -13981,13 +14053,13 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:13985: checking size of long" >&5 +echo "configure:14057: checking size of long" >&5 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext < @@ -13997,7 +14069,7 @@ int main() { switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:14001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else @@ -14056,7 +14128,7 @@ EOF echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:14060: checking for 8-bit clean memcmp" >&5 +echo "configure:14132: checking for 8-bit clean memcmp" >&5 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14064,7 +14136,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -14092,12 +14164,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:14096: checking for strftime" >&5 +echo "configure:14168: checking for strftime" >&5 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -14143,7 +14215,7 @@ else echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:14147: checking for strftime in -lintl" >&5 +echo "configure:14219: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14151,7 +14223,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14190,12 +14262,12 @@ fi echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6 -echo "configure:14194: checking for inet_aton()" >&5 +echo "configure:14266: checking for inet_aton()" >&5 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_func_inet_aton=yes else @@ -14239,12 +14311,12 @@ EOF echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 -echo "configure:14243: checking for _spawnlp" >&5 +echo "configure:14315: checking for _spawnlp" >&5 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__spawnlp=yes" else @@ -14292,12 +14364,12 @@ fi echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 -echo "configure:14296: checking for _snprintf" >&5 +echo "configure:14368: checking for _snprintf" >&5 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__snprintf=yes" else @@ -14347,12 +14419,12 @@ fi echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 -echo "configure:14351: checking for _vsnprintf" >&5 +echo "configure:14423: checking for _vsnprintf" >&5 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__vsnprintf=yes" else @@ -14402,12 +14474,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:14406: checking for vprintf" >&5 +echo "configure:14478: checking for vprintf" >&5 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -14455,12 +14527,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:14459: checking for _doprnt" >&5 +echo "configure:14531: checking for _doprnt" >&5 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -14513,12 +14585,12 @@ if test $ac_cv_func_vprintf = yes ; then for ac_func in vsnprintf vsprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14517: checking for $ac_func" >&5 +echo "configure:14589: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14619,12 +14691,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14623: checking for $ac_func" >&5 +echo "configure:14695: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14676,12 +14748,12 @@ done for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14680: checking for $ac_func" >&5 +echo "configure:14752: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14742,13 +14814,13 @@ fi # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:14746: checking declaration of sys_errlist" >&5 +echo "configure:14818: checking declaration of sys_errlist" >&5 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14761,7 +14833,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:14765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes ol_cv_have_sys_errlist=yes @@ -14784,20 +14856,20 @@ EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:14788: checking existence of sys_errlist" >&5 +echo "configure:14860: checking existence of sys_errlist" >&5 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:14801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 4e74b88ad5..339fb7dde0 100644 --- a/configure.in +++ b/configure.in @@ -1913,6 +1913,10 @@ AC_TYPE_PID_T AM_TYPE_PTRDIFF_T AC_TYPE_SIGNAL AC_TYPE_SIZE_T + +AC_CHECK_TYPE(ssize_t, [signed int]) +AC_CHECK_TYPE(caddr_t, [char *]) + OL_TYPE_SOCKLEN_T AC_STRUCT_ST_BLKSIZE AC_HEADER_TIME diff --git a/include/portable.h.in b/include/portable.h.in index c065815304..88ca2961e2 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -12,30 +12,9 @@ #ifndef _LDAP_PORTABLE_H #define _LDAP_PORTABLE_H -/* --------------------------------------------------- */ -/* begin of WINNT specific entries */ - -#if defined(WINNT) || defined(_WIN32) - -/* don't suck in all of the win32 api */ -#define WIN32_LEAN_AND_MEAN - -/* preprocess out undefined functions */ -#define LOG_DEBUG 0 -#define openlog(a, b) -#define closelog() - -/* define undefined types */ -#define ssize_t signed int -typedef char * caddr_t; - -#endif - -/* end of WINNT specific entries */ -/* --------------------------------------------------- */ - /* end of preamble */ + /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ @@ -160,6 +139,12 @@ typedef char * caddr_t; LBER_TAG_T */ +/* define to character address type */ +#undef caddr_t + +/* define to signed size type */ +#undef ssize_t + /* Define if you have the bcopy function. */ #undef HAVE_BCOPY @@ -913,8 +898,14 @@ typedef char * caddr_t; /* define to support dynamic TCL backend */ #undef SLAPD_TCL_DYNAMIC + /* begin of postamble */ +#ifdef _WIN32 + /* don't suck in all of the win32 api */ +# define WIN32_LEAN_AND_MEAN +#endif + #ifndef __NEED_PROTOTYPES /* force LDAP_P to always include prototypes */ #define __NEED_PROTOTYPES 1 diff --git a/include/portable.nt b/include/portable.nt index acec2d393a..9dea2a2c7c 100644 --- a/include/portable.nt +++ b/include/portable.nt @@ -58,10 +58,6 @@ typedef char * caddr_t; #define ssize_t signed int -#define LOG_DEBUG 0 -#define openlog( a, b ) -#define closelog() - /* we have NT threads */ #ifdef _MT #define HAVE_NT_THREADS 1 diff --git a/servers/ldapd/main.c b/servers/ldapd/main.c index 193f7446d0..0b7dfbea0b 100644 --- a/servers/ldapd/main.c +++ b/servers/ldapd/main.c @@ -277,7 +277,7 @@ main( int argc, char **argv ) if ( dosyslog ) { #ifdef LOG_LOCAL4 openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL4 ); -#else +#elif LOG_DEBUG openlog( myname, OPENLOG_OPTIONS ); #endif } diff --git a/servers/slapd/main.c b/servers/slapd/main.c index a797cf621d..a84cc8c275 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -337,7 +337,7 @@ int main( int argc, char **argv ) #ifdef LOG_LOCAL4 openlog( serverName, OPENLOG_OPTIONS, syslogUser ); -#else +#elif LOG_DEBUG openlog( serverName, OPENLOG_OPTIONS ); #endif @@ -457,7 +457,9 @@ stop: ReportSlapdShutdownComplete(); #endif +#ifdef LOG_DEBUG closelog(); +#endif slapd_daemon_destroy(); #ifdef CSRIMALLOC diff --git a/servers/slurpd/args.c b/servers/slurpd/args.c index 81b45df4eb..8f9eda099c 100644 --- a/servers/slurpd/args.c +++ b/servers/slurpd/args.c @@ -152,7 +152,7 @@ doargs( #ifdef LOG_LOCAL4 openlog( g->myname, OPENLOG_OPTIONS, LOG_LOCAL4 ); -#else +#elif LOG_DEBUG openlog( g->myname, OPENLOG_OPTIONS ); #endif