diff --git a/configure b/configure index 77fd8bad461d665d863b9fce604c1866b867eb2d..7f02f21e8880b829c2be01e4cbf8b6761c91d42a 100755 --- a/configure +++ b/configure @@ -4966,7 +4966,9 @@ for ac_hdr in \ sys/errno.h \ sys/ioctl.h \ sys/param.h \ + sys/socket.h\ sys/time.h \ + sys/types.h \ syslog.h \ termios.h \ unistd.h \ @@ -4974,17 +4976,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4978: checking for $ac_hdr" >&5 +echo "configure:4980: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4983 "configure" +#line 4985 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -5012,12 +5014,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5016: checking for uid_t in sys/types.h" >&5 +echo "configure:5018: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5021 "configure" +#line 5023 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -5046,7 +5048,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:5050: checking type of array argument to getgroups" >&5 +echo "configure:5052: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5054,7 +5056,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 5058 "configure" +#line 5060 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -5079,7 +5081,7 @@ main() } EOF -if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -5093,7 +5095,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 5097 "configure" +#line 5099 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -5117,12 +5119,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5121: checking for mode_t" >&5 +echo "configure:5123: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5126 "configure" +#line 5128 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5150,12 +5152,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5154: checking for off_t" >&5 +echo "configure:5156: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5159 "configure" +#line 5161 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5183,12 +5185,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5187: checking for pid_t" >&5 +echo "configure:5189: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5192 "configure" +#line 5194 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5216,12 +5218,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5220: checking return type of signal handlers" >&5 +echo "configure:5222: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5225 "configure" +#line 5227 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -5238,7 +5240,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5257,12 +5259,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5261: checking for size_t" >&5 +echo "configure:5263: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5266 "configure" +#line 5268 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -5290,12 +5292,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5294: checking for uid_t in sys/types.h" >&5 +echo "configure:5296: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5299 "configure" +#line 5301 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -5324,12 +5326,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5328: checking for st_blksize in struct stat" >&5 +echo "configure:5330: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5333 "configure" +#line 5335 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -5337,7 +5339,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5358,12 +5360,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5362: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5364: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5367 "configure" +#line 5369 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -5372,7 +5374,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5393,12 +5395,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5397: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5399: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5402 "configure" +#line 5404 "configure" #include "confdefs.h" #include <sys/types.h> #include <time.h> @@ -5406,7 +5408,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5428,12 +5430,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5432: checking for working const" >&5 +echo "configure:5434: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5437 "configure" +#line 5439 "configure" #include "confdefs.h" int main() { @@ -5482,7 +5484,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:5486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5505,7 +5507,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5509: checking for 8-bit clean memcmp" >&5 +echo "configure:5511: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5513,7 +5515,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <<EOF -#line 5517 "configure" +#line 5519 "configure" #include "confdefs.h" main() @@ -5523,7 +5525,7 @@ main() } EOF -if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -5541,12 +5543,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:5545: checking for strftime" >&5 +echo "configure:5547: checking for strftime" >&5 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5550 "configure" +#line 5552 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strftime(); below. */ @@ -5569,7 +5571,7 @@ strftime(); ; return 0; } EOF -if { (eval echo configure:5573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5591,7 +5593,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:5595: checking for strftime in -lintl" >&5 +echo "configure:5597: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5599,7 +5601,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 5603 "configure" +#line 5605 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5610,7 +5612,7 @@ int main() { strftime() ; return 0; } EOF -if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5637,12 +5639,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5641: checking for vprintf" >&5 +echo "configure:5643: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5646 "configure" +#line 5648 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vprintf(); below. */ @@ -5665,7 +5667,7 @@ vprintf(); ; return 0; } EOF -if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5689,12 +5691,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5693: checking for _doprnt" >&5 +echo "configure:5695: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5698 "configure" +#line 5700 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt(); below. */ @@ -5717,7 +5719,7 @@ _doprnt(); ; return 0; } EOF -if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5742,7 +5744,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5746: checking for wait3 that fills in rusage" >&5 +echo "configure:5748: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5750,7 +5752,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext <<EOF -#line 5754 "configure" +#line 5756 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -5781,7 +5783,7 @@ main() { } } EOF -if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -5831,12 +5833,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5835: checking for $ac_func" >&5 +echo "configure:5837: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5840 "configure" +#line 5842 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5859,7 +5861,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5887,12 +5889,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5891: checking for $ac_func" >&5 +echo "configure:5893: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5896 "configure" +#line 5898 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5915,7 +5917,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5945,13 +5947,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5949: checking declaration of sys_errlist" >&5 +echo "configure:5951: checking declaration of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5955 "configure" +#line 5957 "configure" #include "confdefs.h" #include <stdio.h> @@ -5961,7 +5963,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5982,20 +5984,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:5986: checking existence of sys_errlist" >&5 +echo "configure:5988: checking existence of sys_errlist" >&5 if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5992 "configure" +#line 5994 "configure" #include "confdefs.h" #include <errno.h> int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index b13be3e1544f7b5fa07c8dd0d291380963d03cef..890aa41c051e1df0f5e4ada227a812ba9b5ca864 100644 --- a/configure.in +++ b/configure.in @@ -694,7 +694,9 @@ AC_CHECK_HEADERS( \ sys/errno.h \ sys/ioctl.h \ sys/param.h \ + sys/socket.h\ sys/time.h \ + sys/types.h \ syslog.h \ termios.h \ unistd.h \ diff --git a/include/ac/regex.h b/include/ac/regex.h index a98ee7899867c47623048eaabb1abddebb9fd032..c646a08d9312a541cb6b708776b98e3bdf9472e6 100644 --- a/include/ac/regex.h +++ b/include/ac/regex.h @@ -4,6 +4,10 @@ #ifndef _AC_REGEX_H_ #define _AC_REGEX_H_ +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + #ifdef HAVE_REGEX_H /* have regex.h, assume it's POSIX compliant */ # include <regex.h> @@ -12,4 +16,4 @@ # include <regex-compat.h> #endif /* ! regex.h */ -#endif /* _AC_REGEX_H_ */ \ No newline at end of file +#endif /* _AC_REGEX_H_ */ diff --git a/include/ac/socket.h b/include/ac/socket.h index 1cb39b6537dbbb3d26767ebf25604665e916efb8..70e044aa47ba0c9fefe74e59eead626b09d70212 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -5,8 +5,11 @@ #ifndef _AC_SOCKET_H_ #define _AC_SOCKET_H_ -#ifdef HAVE_SYS_SOCKET_H +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> +#endif + +#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #include <netinet/in.h> @@ -17,11 +20,8 @@ #endif #ifdef HAVE_WINSOCK2 -#include <sys/types.h> #include <winsock2.h> -#endif - -#ifdef HAVE_WINSOCK +#elif HAVE_WINSOCK #include <winsock.h> #endif diff --git a/include/ldap.h b/include/ldap.h index 9b67d5d6232d40a13e7a507869f484f94266456b..65b2d87b79c3bb64591fdf874939653b77db2c0f 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -634,7 +634,7 @@ LDAP_F void ldap_value_free_len LDAP_P(( struct berval **vals )); * in result.c: */ LDAP_F int ldap_result LDAP_P(( LDAP *ld, int msgid, int all, - LDAP_timeval_p timeout, LDAPMessage **result )); + struct timeval *timeout, LDAPMessage **result )); LDAP_F int ldap_msgfree LDAP_P(( LDAPMessage *lm )); LDAP_F int ldap_msgdelete LDAP_P(( LDAP *ld, int msgid )); diff --git a/include/portable.h.in b/include/portable.h.in index 09ae8735d570474f37c2b932c4132e106c2d6b41..6c782517ea04a2ba1290f1526b77d5c908e45230 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -389,9 +389,15 @@ is provided ``as is'' without express or implied warranty. /* Define if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H +/* Define if you have the <sys/socket.h> header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + /* Define if you have the <syslog.h> header file. */ #undef HAVE_SYSLOG_H diff --git a/libraries/liblber/etest.c b/libraries/liblber/etest.c index 71c7ee31cfd87510a8fd4de2daea613dc83dcaed..eca656730e9b173b01566f586aaf0e7dd2869a48 100644 --- a/libraries/liblber/etest.c +++ b/libraries/liblber/etest.c @@ -4,7 +4,6 @@ * All rights reserved. */ -#define DISABLE_BRIDGE #include "portable.h" #include <stdio.h> @@ -156,9 +155,9 @@ main( int argc, char **argv ) break; default: -#ifndef NO_USERINTERFACE +#ifdef LDAP_LIBUI fprintf( stderr, "unknown fmt %c\n", *fmt ); -#endif /* NO_USERINTERFACE */ +#endif /* LDAP_LIBUI */ rc = -1; break; } diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 6c4d8dbc1e927ecdbedd67361ef9ccac7ab7dbfc..cbf1837a91c3e1c3eeb1fc847c875294a4ed390c 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -111,9 +111,9 @@ int ber_filbuf( Sockbuf *sb, long len ) { short rc; -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS int addrlen; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( sb->sb_ber.ber_buf == NULL ) { if ( (sb->sb_ber.ber_buf = (char *) malloc( READBUFSIZ )) == @@ -124,7 +124,7 @@ ber_filbuf( Sockbuf *sb, long len ) } if ( sb->sb_naddr > 0 ) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS rc = udp_read(sb, sb->sb_ber.ber_buf, READBUFSIZ, addrlen ); #ifdef LDAP_DEBUG if ( lber_debug ) { @@ -134,9 +134,9 @@ ber_filbuf( Sockbuf *sb, long len ) lber_bprint( sb->sb_ber.ber_buf, rc ); } #endif /* LDAP_DEBUG */ -#else /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ rc = -1; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ } else { rc = read( sb->sb_sd, sb->sb_ber.ber_buf, ((sb->sb_options & LBER_NO_READ_AHEAD) && @@ -296,18 +296,19 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit ) nwritten = 0; do { if (sb->sb_naddr > 0) { -#ifdef CLDAP +#ifdef LDAP_CONNECTIONLESS rc = udp_write( sb, ber->ber_buf + nwritten, (size_t)towrite ); -#else /* CLDAP */ +#else /* LDAP_CONNECTIONLESS */ rc = -1; -#endif /* CLDAP */ +#endif /* LDAP_CONNECTIONLESS */ if ( rc <= 0 ) return( -1 ); + /* fake error if write was not atomic */ if (rc < towrite) { -#if defined( WSAEMSGSIZE ) - errno = WSAEMSGSIZE; +#if !defined(MACOS) && !defined(DOS) + errno = EMSGSIZE; #endif return( -1 ); } diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index a5e93798c1bc3c4750321fa30bff11835d2bdbf3..e9d718c99d16012bb46315c3c7d816cdcf120c3a 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/add.c b/libraries/libldap/add.c index 901658bef36d4ad369155028e0f328ab0ffcfd64..73e84964c1ae19c54f5354951fb387d3b0a4d916 100644 --- a/libraries/libldap/add.c +++ b/libraries/libldap/add.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/addentry.c b/libraries/libldap/addentry.c index ff8e5635ca2ab96bbb26e142aa2cf90f6fb4bcc1..3b5c752a88d08995718ed15644cc8e337be9fc73 100644 --- a/libraries/libldap/addentry.c +++ b/libraries/libldap/addentry.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/bind.c b/libraries/libldap/bind.c index 050d72a5960b582fba43a475c1faff6bae1da898..be796f192013fefcbabef5115aa3132dd4446cef 100644 --- a/libraries/libldap/bind.c +++ b/libraries/libldap/bind.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/charset.c b/libraries/libldap/charset.c index 6c821c81c5876a52d1662b319c96ad8775537f40..8371c62e3b172803d6be23bd3796959333b76587 100644 --- a/libraries/libldap/charset.c +++ b/libraries/libldap/charset.c @@ -18,6 +18,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index c037927de8db5168f6a2a4f5a4bdcff787e3cb4c..dc4794cb3d88cc4675655a672564c3f95dd30394 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -16,10 +16,10 @@ static char copyright[] = "@(#) Copyright (c) 1990, 1994 Regents of the Universi #include <stdio.h> #include <stdlib.h> - #include <ac/errno.h> #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index 2e2e243b969f37fae541600fb504c8e70c942cbf..e9f78cbfae28206e9fc40e2c23311667014a49c1 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/delete.c b/libraries/libldap/delete.c index a6ebfecd50ef68248f08e8b0564465b5252e7323..eb8f589198ae0c1785864aad797214b2daefe852 100644 --- a/libraries/libldap/delete.c +++ b/libraries/libldap/delete.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index 9827bfc5f2ecd7a104eb0627a7f027ecf947fbda..80dcd809fa594013de04a4402a5c4f83f92d30a4 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -5,6 +5,7 @@ #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/friendly.c b/libraries/libldap/friendly.c index 1bf6c4403388800d05b120b953c058655b778e9b..fc90fc9cdc567fd63256893c4cba08e95354675b 100644 --- a/libraries/libldap/friendly.c +++ b/libraries/libldap/friendly.c @@ -18,6 +18,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include <ac/errno.h> #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getattr.c b/libraries/libldap/getattr.c index 24f6d08509e0fe4bf7beabf580de701b0a8783b1..6e95b7d5f39161d36330079d2fb1ac5e0f8089ca 100644 --- a/libraries/libldap/getattr.c +++ b/libraries/libldap/getattr.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 5467b82c3ef0903ef20a3e24944d274fb6cbf1ba..54b8e8a92cb6468ef1fa9685cf6c0420236b6071 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getdxbyname.c b/libraries/libldap/getdxbyname.c index 97548e218c353c31b632af35a5333b5451f5e043..153b1119631abf4117e147b9bc9418233c7ef3a9 100644 --- a/libraries/libldap/getdxbyname.c +++ b/libraries/libldap/getdxbyname.c @@ -14,6 +14,7 @@ #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getentry.c b/libraries/libldap/getentry.c index f4f523ea3d5d7eaf0536c1314741041148882e86..df25d7a3ab215e8682d7acd95a1772816ada239f 100644 --- a/libraries/libldap/getentry.c +++ b/libraries/libldap/getentry.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index 5f9bffbe47e0c53611072b758fbdfdae8a0b08e5..68bd3fd26afb52adf6a8f2cfd6886369bc31fb9c 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -18,9 +18,9 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include <ac/errno.h> #include <ac/regex.h> #include <ac/string.h> +#include <ac/time.h> #include <ac/unistd.h> -#include <sys/types.h> #ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif diff --git a/libraries/libldap/getvalues.c b/libraries/libldap/getvalues.c index 41efe9adf4b32e4d30e1d62999ffbe22db031602..3abd28560a7da092c48c058e34281c138f40c2fd 100644 --- a/libraries/libldap/getvalues.c +++ b/libraries/libldap/getvalues.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index e900cc881f9b899e1cb2d6ecef70825ff65559c0..a9cd60b99a9af554d7edac42c710c3eb9e9ea1cd 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -19,6 +19,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include <ac/krb.h> #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/modify.c b/libraries/libldap/modify.c index 1766f8a26baa95444b95794444adcb9226622eb8..42ffde0f2f128286fae7a2c7ffbb85519ffa2945 100644 --- a/libraries/libldap/modify.c +++ b/libraries/libldap/modify.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/modrdn.c b/libraries/libldap/modrdn.c index 491fc97addf7c8a8e0c39daf6ae4f8e245c0b2e7..434ecb5d0b916bc17fc60a7eba2160682b96bca7 100644 --- a/libraries/libldap/modrdn.c +++ b/libraries/libldap/modrdn.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 30b48bafb5c9717ef8ae8ec55d31b1b819aecbbb..a85193958690e547479b2d03b03ce53ae95b4fc7 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1995 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index b1c8d64c9b044a9d0f55c89535da97bd4c087a1d..9c16fa921570db122ebdb29cc8ae883d683c4b44 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -13,6 +13,7 @@ #include <ac/errno.h> #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include <ac/unistd.h> #ifdef HAVE_IO_H diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index e8a5b2731fba421c8d9424291f140c2891cdf36b..a64d0ff778209549a0a689c7797ed8a26bf26d78 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -15,6 +15,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 3b53fc93ee00bf2ee4300e3f7a2f496141520a78..da6e7d37636c35d446e6fe7942056e36bb8b3b4b 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/tmpltest.c b/libraries/libldap/tmpltest.c index d10837579061a41ed6b0673e88c5c496ece35704..aa860b9a37df368207a7d22a8c812252f7a55f18 100644 --- a/libraries/libldap/tmpltest.c +++ b/libraries/libldap/tmpltest.c @@ -1,27 +1,25 @@ +#include "portable.h" + #include <stdio.h> -#include <sys/types.h> -#include "lber.h" -#include "ldap.h" -#include "disptmpl.h" -#include "srchpref.h" +#include <stdlib.h> + +#include <ac/socket.h> +#include <ac/time.h> #ifdef MACOS -#include <stdlib.h> #include <console.h> #endif /* MACOS */ -#ifdef NEEDPROTOS -void dump_tmpl( struct ldap_disptmpl *tmpl ); -void dump_srchpref( struct ldap_searchobj *sp ); -#else /* NEEDPROTOS */ -void dump_tmpl(); -void dump_srchpref(); -#endif /* NEEDPROTOS */ +#include "lber.h" +#include "ldap.h" +#include "disptmpl.h" +#include "srchpref.h" +void dump_tmpl LDAP_P(( struct ldap_disptmpl *tmpl )); +void dump_srchpref LDAP_P(( struct ldap_searchobj *sp )); #define NULLSTRINGIFNULL( s ) ( s == NULL ? "(null)" : s ) - int main( int argc, char **argv ) { diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index f87af4d87a710fb1a55990e6b1ce8e28970d190d..f623c285258ebe65e1f26007dc297742b79b9915 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -17,6 +17,7 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include <stdlib.h> #include <ac/socket.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index a555d46f72274c05f589d0785437253faca242a6..239ee81d7594b2dffa2b1b7735ea8035e8dd05b3 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -16,6 +16,7 @@ static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index f15e64b2cf197c6d07412c3e927cc7519aa02c90..badf8821103274be0dc536aff097800c55cb4d3b 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -29,6 +29,7 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of #include <ac/socket.h> #include <ac/string.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/libldif/line64.c b/libraries/libldif/line64.c index 9ca75941489067316359d1f16e989605f8d411f2..2a3a1708f1b6cd6e2d2b6d34c302eb4479d32553 100644 --- a/libraries/libldif/line64.c +++ b/libraries/libldif/line64.c @@ -7,6 +7,7 @@ #include <ac/string.h> #include <ac/socket.h> +#include <ac/time.h> #include "lber.h" #include "ldap.h" diff --git a/libraries/liblthread/stack.c b/libraries/liblthread/stack.c index e57b44b25f19667cb576eb1a2ca52058653a5d61..ad16bfd945da586d78153f9f1e9c21ab94260d76 100644 --- a/libraries/liblthread/stack.c +++ b/libraries/liblthread/stack.c @@ -1,6 +1,12 @@ /* stack.c - stack handling routines */ +#include "portable.h" + #include <stdio.h> + +#include <ac/time.h> +#include <ac/socket.h> + #include "lber.h" #include "ldap.h"