From: Kurt Zeilenga Date: Fri, 15 Oct 1999 18:04:22 +0000 (+0000) Subject: Import TCP_NODELAY support from devel. X-Git-Tag: OPENLDAP_REL_ENG_1_2_8~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5abd99a9628ff73814e7823fb930df1f94ac0640;p=thirdparty%2Fopenldap.git Import TCP_NODELAY support from devel. --- diff --git a/CHANGES b/CHANGES index 44579bab14..065a443d84 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ Changes included in OpenLDAP 1.2 Release Engineering Fixed -lldap templates y2k bug (ITS#294) Fixed ldbm db_appinit to use u_int32_t instead of int (ITS#295) Fixed lber/io.c Cray T90 specific pointer arithmetic problem (ITS#325) + Added slapd TCP_NODELAY support Documentation Reference Quick Start Guide in README and INSTALL ldappasswd(1) fix -c vs -H typo (ITS#154) diff --git a/configure b/configure index 70d851dd14..709a3589a9 100755 --- a/configure +++ b/configure @@ -7992,6 +7992,7 @@ for ac_hdr in \ limits.h \ malloc.h \ memory.h \ + netinet/tcp.h \ regex.h \ psap.h \ pwd.h \ @@ -8019,17 +8020,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:8023: checking for $ac_hdr" >&5 +echo "configure:8024: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8057,12 +8058,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:8061: checking for uid_t in sys/types.h" >&5 +echo "configure:8062: 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 @@ -8091,7 +8092,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:8095: checking type of array argument to getgroups" >&5 +echo "configure:8096: 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 @@ -8099,7 +8100,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:8129: \"$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 @@ -8138,7 +8139,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -8161,12 +8162,12 @@ cat >> confdefs.h <&6 -echo "configure:8165: checking for mode_t" >&5 +echo "configure:8166: checking for mode_t" >&5 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8196,12 +8197,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:8200: checking for off_t" >&5 +echo "configure:8201: checking for off_t" >&5 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8231,12 +8232,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:8235: checking for pid_t" >&5 +echo "configure:8236: checking for pid_t" >&5 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8266,19 +8267,19 @@ EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:8270: checking for ptrdiff_t" >&5 +echo "configure:8271: checking for ptrdiff_t" >&5 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ptrdiff_t p ; return 0; } EOF -if { (eval echo configure:8282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else @@ -8299,12 +8300,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:8303: checking return type of signal handlers" >&5 +echo "configure:8304: checking return type of signal handlers" >&5 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8321,7 +8322,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:8325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -8340,12 +8341,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:8344: checking for size_t" >&5 +echo "configure:8345: checking for size_t" >&5 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -8375,12 +8376,12 @@ EOF fi echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:8379: checking for member st_blksize in aggregate type struct stat" >&5 +echo "configure:8380: 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 @@ -8388,7 +8389,7 @@ int main() { struct stat foo; foo.st_blksize; ; return 0; } EOF -if { (eval echo configure:8392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_blksize=yes else @@ -8410,12 +8411,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:8414: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:8415: 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 @@ -8424,7 +8425,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:8428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -8445,12 +8446,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:8449: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:8450: 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 @@ -8458,7 +8459,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:8462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -8481,7 +8482,7 @@ fi echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 -echo "configure:8485: checking if toupper() requires islower()" >&5 +echo "configure:8486: 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 @@ -8490,7 +8491,7 @@ else ol_cv_c_upper_lower=safe else cat > conftest.$ac_ext < @@ -8502,7 +8503,7 @@ main() exit(1); } EOF -if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8507: \"$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 @@ -8525,12 +8526,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:8529: checking for working const" >&5 +echo "configure:8530: 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:8584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -8607,14 +8608,14 @@ EOF else echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:8611: checking whether byte ordering is bigendian" >&5 +echo "configure:8612: 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 @@ -8625,11 +8626,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:8629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8630: \"$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 @@ -8640,7 +8641,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:8644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -8660,7 +8661,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:8678: \"$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 @@ -8697,7 +8698,7 @@ EOF fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:8701: checking size of short" >&5 +echo "configure:8702: checking size of short" >&5 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8705,7 +8706,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -8716,7 +8717,7 @@ main() exit(0); } EOF -if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -8736,7 +8737,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:8740: checking size of int" >&5 +echo "configure:8741: checking size of int" >&5 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8744,7 +8745,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -8755,7 +8756,7 @@ main() exit(0); } EOF -if { (eval echo configure:8759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -8775,7 +8776,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:8779: checking size of long" >&5 +echo "configure:8780: checking size of long" >&5 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8783,7 +8784,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -8794,7 +8795,7 @@ main() exit(0); } EOF -if { (eval echo configure:8798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -8816,7 +8817,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:8820: checking for 8-bit clean memcmp" >&5 +echo "configure:8821: 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 @@ -8824,7 +8825,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:8839: \"$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 @@ -8852,12 +8853,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:8856: checking for strftime" >&5 +echo "configure:8857: 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:8886: \"$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 @@ -8903,7 +8904,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:8907: checking for strftime in -lintl" >&5 +echo "configure:8908: 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 @@ -8911,7 +8912,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:8927: \"$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 @@ -8949,12 +8950,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:8953: checking for vprintf" >&5 +echo "configure:8954: 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:8983: \"$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 @@ -9002,12 +9003,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:9006: checking for _doprnt" >&5 +echo "configure:9007: 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:9036: \"$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 @@ -9060,12 +9061,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:9064: checking for $ac_func" >&5 +echo "configure:9065: 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:9094: \"$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 @@ -9147,12 +9148,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9151: checking for $ac_func" >&5 +echo "configure:9152: 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:9181: \"$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 @@ -9204,12 +9205,12 @@ done for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9208: checking for $ac_func" >&5 +echo "configure:9209: 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:9238: \"$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 @@ -9263,13 +9264,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:9267: checking declaration of sys_errlist" >&5 +echo "configure:9268: 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 < @@ -9279,7 +9280,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:9283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -9300,20 +9301,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:9304: checking existence of sys_errlist" >&5 +echo "configure:9305: 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:9317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9318: \"$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 6b474908b4..ad02027c7b 100644 --- a/configure.in +++ b/configure.in @@ -1308,6 +1308,7 @@ AC_CHECK_HEADERS( \ limits.h \ malloc.h \ memory.h \ + netinet/tcp.h \ regex.h \ psap.h \ pwd.h \ diff --git a/include/ac/socket.h b/include/ac/socket.h index 2ee4405016..baecf66046 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -26,6 +26,11 @@ #endif #include + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + #include #ifdef HAVE_ARPA_NAMESER_H diff --git a/include/portable.h.in b/include/portable.h.in index ae2e17dd2a..df6fbd1ec9 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -409,6 +409,9 @@ /* Define if you have the header file. */ #undef HAVE_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_NETINET_TCP_H + /* Define if you have the header file. */ #undef HAVE_PSAP_H diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 14e309e589..ad81340e77 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -122,6 +122,17 @@ slapd_daemon( } #endif +#ifdef TCP_NODELAY + i = 1; + if ( setsockopt( tcps, IPPROTO_TCP, TCP_NODELAY, (char *) &i, + sizeof(i) ) == -1 ) { + int err = errno; + Debug( LDAP_DEBUG_ANY, "setsockopt(TCP_NODELAY) failed errno %d (%s)", + err, err > -1 && err < sys_nerr ? sys_errlist[err] : + "unknown", 0 ); + } +#endif + (void) memset( (void *) &addr, '\0', sizeof(addr) ); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY;