From: wessels <> Date: Wed, 16 Oct 1996 05:27:24 +0000 (+0000) Subject: clean bunch of stuff from lib/util.c, made xmemcpy a macro, removed strdup() X-Git-Tag: SQUID_3_0_PRE1~5640 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f6fcd8ad8fa4c442f72375aed4963925e18a39f;p=thirdparty%2Fsquid.git clean bunch of stuff from lib/util.c, made xmemcpy a macro, removed strdup() put tempnam.o into LIBOBJS. --- diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d781300244..99f919c90f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -34,7 +34,7 @@ Special thanks go to people who have volunteered their time, effort, and ideas t Endre Balint Nagy Geoff Keating Arjan de Vet - + Mike Groeneweg Development of this caching software is funded by the National Science Foundation (grant NCR-9521745). Paid staff members on the caching diff --git a/configure b/configure index 041e77b857..5ce7277eb4 100755 --- a/configure +++ b/configure @@ -1722,6 +1722,100 @@ EOF fi +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +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 < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "pid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +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 < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +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 < +#if STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t int +EOF + +fi + + echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 ac_lib_var=`echo nsl | tr '.-/+' '___p'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then @@ -1730,7 +1824,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 +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 < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +LIBOBJS="$LIBOBJS ${ac_func}.o" +fi + +done + + echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 if test "$cross_compiling" = yes; then SQUID_FD_SETSIZE=256 else cat > conftest.$ac_ext < @@ -2304,7 +2448,7 @@ main() { #endif /* HAVE_SETRLIMIT */ #if HAVE_SYSCONF && defined(_SC_OPEN_MAX) i = sysconf(_SC_OPEN_MAX); -#elif HAVE_GETDTABLESIZE +#elif HAVE_GETDTABLESIZE && !defined(__linux__) i = getdtablesize(); #elif defined(OPEN_MAX) i = OPEN_MAX; @@ -2341,7 +2485,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2377,7 +2521,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2413,7 +2557,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -2449,7 +2593,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -2482,7 +2626,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } @@ -2506,7 +2650,7 @@ rm -f conftest* echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 cat > conftest.$ac_ext < @@ -339,7 +345,7 @@ main() { #endif /* HAVE_SETRLIMIT */ #if HAVE_SYSCONF && defined(_SC_OPEN_MAX) i = sysconf(_SC_OPEN_MAX); -#elif HAVE_GETDTABLESIZE +#elif HAVE_GETDTABLESIZE && !defined(__linux__) i = getdtablesize(); #elif defined(OPEN_MAX) i = OPEN_MAX;