[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

aCaB acab at clamav.net
Sun Apr 4 01:07:56 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 15fbe96ff63c25b4ff32ba96946841d9816946a1
Author: aCaB <acab at clamav.net>
Date:   Wed Oct 14 19:10:38 2009 +0200

    removed r_gethostbyname which was not used

diff --git a/ChangeLog b/ChangeLog
index 938e22c..0097bf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Oct 14 19:03:47 CEST 2009 (acab)
+------------------------------------
+ * win32: remove stale netcode
+
 Wed Oct 14 18:59:13 CEST 2009 (acab)
 ------------------------------------
  * win32: preliminary winsock support files
diff --git a/clamav-config.h.in b/clamav-config.h.in
index 8183067..ffe2ad7 100644
--- a/clamav-config.h.in
+++ b/clamav-config.h.in
@@ -187,15 +187,6 @@
 /* have getaddrinfo() */
 #undef HAVE_GETADDRINFO
 
-/* gethostbyname_r takes 3 arguments */
-#undef HAVE_GETHOSTBYNAME_R_3
-
-/* gethostbyname_r takes 5 arguments */
-#undef HAVE_GETHOSTBYNAME_R_5
-
-/* gethostbyname_r takes 6 arguments */
-#undef HAVE_GETHOSTBYNAME_R_6
-
 /* Define to 1 if getpagesize() is available */
 #undef HAVE_GETPAGESIZE
 
diff --git a/clamd/Makefile.am b/clamd/Makefile.am
index d66b1b9..53a47fb 100644
--- a/clamd/Makefile.am
+++ b/clamd/Makefile.am
@@ -29,8 +29,6 @@ clamd_SOURCES = \
     $(top_srcdir)/shared/getopt.h \
     $(top_srcdir)/shared/misc.c \
     $(top_srcdir)/shared/misc.h \
-    $(top_srcdir)/shared/network.c \
-    $(top_srcdir)/shared/network.h \
     clamd.c \
     tcpserver.c \
     tcpserver.h \
diff --git a/clamd/Makefile.in b/clamd/Makefile.in
index 0f95f47..8f15590 100644
--- a/clamd/Makefile.in
+++ b/clamd/Makefile.in
@@ -78,8 +78,7 @@ am__clamd_SOURCES_DIST = $(top_srcdir)/shared/output.c \
 	$(top_srcdir)/shared/output.h $(top_srcdir)/shared/optparser.c \
 	$(top_srcdir)/shared/optparser.h $(top_srcdir)/shared/getopt.c \
 	$(top_srcdir)/shared/getopt.h $(top_srcdir)/shared/misc.c \
-	$(top_srcdir)/shared/misc.h $(top_srcdir)/shared/network.c \
-	$(top_srcdir)/shared/network.h clamd.c tcpserver.c tcpserver.h \
+	$(top_srcdir)/shared/misc.h clamd.c tcpserver.c tcpserver.h \
 	localserver.c localserver.h session.c session.h thrmgr.c \
 	thrmgr.h server-th.c server.h scanner.c scanner.h others.c \
 	others.h clamuko.c clamuko.h clamukofs.c clamukofs.h \
@@ -87,12 +86,12 @@ am__clamd_SOURCES_DIST = $(top_srcdir)/shared/output.c \
 	dazuko_xp.h dazukoio_xp.h dazukofs.c dazukofs.h shared.h
 @BUILD_CLAMD_TRUE at am_clamd_OBJECTS = output.$(OBJEXT) \
 @BUILD_CLAMD_TRUE@	optparser.$(OBJEXT) getopt.$(OBJEXT) \
- at BUILD_CLAMD_TRUE@	misc.$(OBJEXT) network.$(OBJEXT) \
- at BUILD_CLAMD_TRUE@	clamd.$(OBJEXT) tcpserver.$(OBJEXT) \
- at BUILD_CLAMD_TRUE@	localserver.$(OBJEXT) session.$(OBJEXT) \
- at BUILD_CLAMD_TRUE@	thrmgr.$(OBJEXT) server-th.$(OBJEXT) \
- at BUILD_CLAMD_TRUE@	scanner.$(OBJEXT) others.$(OBJEXT) \
- at BUILD_CLAMD_TRUE@	clamuko.$(OBJEXT) clamukofs.$(OBJEXT) \
+ at BUILD_CLAMD_TRUE@	misc.$(OBJEXT) clamd.$(OBJEXT) \
+ at BUILD_CLAMD_TRUE@	tcpserver.$(OBJEXT) localserver.$(OBJEXT) \
+ at BUILD_CLAMD_TRUE@	session.$(OBJEXT) thrmgr.$(OBJEXT) \
+ at BUILD_CLAMD_TRUE@	server-th.$(OBJEXT) scanner.$(OBJEXT) \
+ at BUILD_CLAMD_TRUE@	others.$(OBJEXT) clamuko.$(OBJEXT) \
+ at BUILD_CLAMD_TRUE@	clamukofs.$(OBJEXT) \
 @BUILD_CLAMD_TRUE@	dazukoio_compat12.$(OBJEXT) \
 @BUILD_CLAMD_TRUE@	dazukoio.$(OBJEXT) dazukofs.$(OBJEXT)
 clamd_OBJECTS = $(am_clamd_OBJECTS)
@@ -297,8 +296,6 @@ top_srcdir = @top_srcdir@
 @BUILD_CLAMD_TRUE@    $(top_srcdir)/shared/getopt.h \
 @BUILD_CLAMD_TRUE@    $(top_srcdir)/shared/misc.c \
 @BUILD_CLAMD_TRUE@    $(top_srcdir)/shared/misc.h \
- at BUILD_CLAMD_TRUE@    $(top_srcdir)/shared/network.c \
- at BUILD_CLAMD_TRUE@    $(top_srcdir)/shared/network.h \
 @BUILD_CLAMD_TRUE@    clamd.c \
 @BUILD_CLAMD_TRUE@    tcpserver.c \
 @BUILD_CLAMD_TRUE@    tcpserver.h \
@@ -446,7 +443,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/getopt.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/localserver.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/misc.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/network.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/optparser.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/others.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/output.Po at am__quote@
@@ -544,22 +540,6 @@ misc.obj: $(top_srcdir)/shared/misc.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o misc.obj `if test -f '$(top_srcdir)/shared/misc.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/misc.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/misc.c'; fi`
 
-network.o: $(top_srcdir)/shared/network.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT network.o -MD -MP -MF $(DEPDIR)/network.Tpo -c -o network.o `test -f '$(top_srcdir)/shared/network.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/network.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/network.Tpo $(DEPDIR)/network.Po
- at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/shared/network.c' object='network.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o network.o `test -f '$(top_srcdir)/shared/network.c' || echo '$(srcdir)/'`$(top_srcdir)/shared/network.c
-
-network.obj: $(top_srcdir)/shared/network.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT network.obj -MD -MP -MF $(DEPDIR)/network.Tpo -c -o network.obj `if test -f '$(top_srcdir)/shared/network.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/network.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/network.c'; fi`
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/network.Tpo $(DEPDIR)/network.Po
- at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/shared/network.c' object='network.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o network.obj `if test -f '$(top_srcdir)/shared/network.c'; then $(CYGPATH_W) '$(top_srcdir)/shared/network.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/shared/network.c'; fi`
-
 mostlyclean-libtool:
 	-rm -f *.lo
 
diff --git a/clamd/scanner.c b/clamd/scanner.c
index ec269cb..b50730e 100644
--- a/clamd/scanner.c
+++ b/clamd/scanner.c
@@ -59,7 +59,6 @@
 #include "others.h"
 #include "scanner.h"
 #include "shared.h"
-#include "network.h"
 #include "thrmgr.h"
 #include "server.h"
 
diff --git a/clamd/tcpserver.c b/clamd/tcpserver.c
index df98e11..0afea86 100644
--- a/clamd/tcpserver.c
+++ b/clamd/tcpserver.c
@@ -40,7 +40,6 @@
 
 #include "shared/optparser.h"
 #include "shared/output.h"
-#include "shared/network.h"
 
 #include "others.h"
 #include "server.h"
diff --git a/configure b/configure
index 9296aca..44fb2d0 100755
--- a/configure
+++ b/configure
@@ -970,7 +970,6 @@ enable_no_cache
 enable_dns_fix
 enable_bigstack
 with_dbdir
-enable_gethostbyname_r
 enable_readdir_r
 enable_fdpassing
 enable_clamdtop
@@ -1642,7 +1641,6 @@ Optional Features:
   --enable-no-cache	  use "Cache-Control: no-cache" in freshclam
   --enable-dns-fix	  enable workaround for broken DNS servers (as in SpeedTouch 510)
   --enable-bigstack	  increase thread stack size
-  --disable-gethostbyname_r	  disable support for gethostbyname_r
   --enable-readdir_r		    enable support for readdir_r
   --disable-fdpassing        don't build file descriptor passing support
   --enable-clamdtop       Enable 'clamdtop' tool [default=auto]
@@ -5130,13 +5128,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5133: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5131: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5136: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5134: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5139: output\"" >&5)
+  (eval echo "\"\$as_me:5137: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6331,7 +6329,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6334 "configure"' > conftest.$ac_ext
+  echo '#line 6332 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7860,11 +7858,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7863: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7861: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7867: \$? = $ac_status" >&5
+   echo "$as_me:7865: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8199,11 +8197,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8202: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8200: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8206: \$? = $ac_status" >&5
+   echo "$as_me:8204: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8304,11 +8302,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8307: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8305: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8311: \$? = $ac_status" >&5
+   echo "$as_me:8309: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8359,11 +8357,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8362: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8360: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8366: \$? = $ac_status" >&5
+   echo "$as_me:8364: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10742,7 +10740,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10745 "configure"
+#line 10743 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10838,7 +10836,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10841 "configure"
+#line 10839 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11510,7 +11508,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11513 "configure"
+#line 11511 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16516,7 +16514,6 @@ $as_echo "#define CLAMUKO 1" >>confdefs.h
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 freebsd*)
     if test "$have_pthreads" = "yes"; then
@@ -16537,7 +16534,6 @@ $as_echo "#define CLAMUKO 1" >>confdefs.h
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 dragonfly*)
     if test "$have_pthreads" = "yes"; then
@@ -16558,7 +16554,6 @@ $as_echo "#define CLAMUKO 1" >>confdefs.h
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 openbsd*)
     if test "$have_pthreads" = "yes"; then
@@ -16576,7 +16571,6 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 bsdi*)
     if test "$have_pthreads" = "yes"; then
@@ -16592,7 +16586,6 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 netbsd*)
      if test "$have_pthreads" = "yes"; then
@@ -16607,7 +16600,6 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 bsd*)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Unknown BSD detected. Disabling thread support." >&5
@@ -16616,7 +16608,6 @@ $as_echo "Unknown BSD detected. Disabling thread support." >&6; }
 
 $as_echo "#define C_BSD 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 beos*)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: BeOS detected. Disabling thread support." >&5
@@ -16625,7 +16616,6 @@ $as_echo "BeOS detected. Disabling thread support." >&6; }
 
 $as_echo "#define C_BEOS 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 darwin*)
 
@@ -16638,7 +16628,6 @@ $as_echo "#define C_DARWIN 1" >>confdefs.h
 $as_echo "#define BIND_8_COMPAT 1" >>confdefs.h
 
     use_netinfo="yes"
-    use_gethostbyname_r="no"
     ;;
 os2*)
     FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsyslog"
@@ -16674,7 +16663,6 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
 
 $as_echo "#define C_HPUX 1" >>confdefs.h
 
-    use_gethostbyname_r="no"
     ;;
 aix*)
     if test "$have_pthreads" = "yes"; then
@@ -16999,121 +16987,6 @@ $as_echo "#define BUILD_CLAMD 1" >>confdefs.h
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r" >&5
-$as_echo_n "checking for gethostbyname_r... " >&6; }
-if test -z "$ac_cv_gethostbyname_args"; then
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-int
-main ()
-{
-
-struct hostent *hp;
-struct hostent h;
-char *name;
-char buffer[10];
-int  h_errno;
-hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_gethostbyname_args=5
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test -z "$ac_cv_gethostbyname_args"; then
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-int
-main ()
-{
-
-struct hostent h;
-struct hostent_data hdata;
-char *name;
-int  rc;
-rc = gethostbyname_r(name, &h, &hdata);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_gethostbyname_args=3
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if test -z "$ac_cv_gethostbyname_args"; then
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netdb.h>
-
-int
-main ()
-{
-
-struct hostent h;
-struct hostent *hp;
-char *name;
-char buf[10];
-int rc;
-int h_errno;
-
-rc = gethostbyname_r(name, &h, buf, 10, &hp, &h_errno);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_gethostbyname_args=6
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-# Check whether --enable-gethostbyname_r was given.
-if test "${enable_gethostbyname_r+set}" = set; then :
-  enableval=$enable_gethostbyname_r; use_gethostbyname_r=$enableval
-fi
-
-
-if test "$use_gethostbyname_r" = "no"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: support disabled" >&5
-$as_echo "support disabled" >&6; }
-elif test -z "$ac_cv_gethostbyname_args"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
-    if test "$ac_cv_gethostbyname_args" = 3; then
-
-$as_echo "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h
-
-    elif test "$ac_cv_gethostbyname_args" = 5; then
-
-$as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h
-
-    elif test "$ac_cv_gethostbyname_args" = 6; then
-
-$as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h
-
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, and it takes $ac_cv_gethostbyname_args arguments" >&5
-$as_echo "yes, and it takes $ac_cv_gethostbyname_args arguments" >&6; }
-fi
-
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readdir_r" >&5
 $as_echo_n "checking for readdir_r... " >&6; }
diff --git a/configure.in b/configure.in
index da98c3c..014cc66 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
 dnl   Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm at clamav.net>
-dnl   gethostbyname_r and readdir_r checks (c) COPYRIGHT MIT 1995
+dnl   readdir_r checks (c) COPYRIGHT MIT 1995
 dnl   socklen_t check (c) Alexander V. Lukyanov <lav at yars.free.net>
 dnl
 dnl   This program is free software; you can redistribute it and/or modify
@@ -953,7 +953,6 @@ freebsd[[45]]*)
 	fi
     fi
     AC_DEFINE([C_BSD],1,[os is freebsd 4 or 5])
-    use_gethostbyname_r="no"
     ;;
 freebsd*)
     if test "$have_pthreads" = "yes"; then
@@ -966,7 +965,6 @@ freebsd*)
 	fi
     fi
     AC_DEFINE([C_BSD],1,[os is freebsd 6])
-    use_gethostbyname_r="no"
     ;;
 dragonfly*)
     if test "$have_pthreads" = "yes"; then
@@ -979,7 +977,6 @@ dragonfly*)
 	fi
     fi
     AC_DEFINE([C_BSD],1,[os is dragonfly])
-    use_gethostbyname_r="no"
     ;;
 openbsd*)
     if test "$have_pthreads" = "yes"; then
@@ -991,7 +988,6 @@ openbsd*)
 	AC_DEFINE([_REENTRANT],1,[thread safe])
     fi
     AC_DEFINE([C_BSD],1,[os is OpenBSD])
-    use_gethostbyname_r="no"
     ;;
 bsdi*)
     if test "$have_pthreads" = "yes"; then
@@ -1001,7 +997,6 @@ bsdi*)
 	AC_DEFINE([_REENTRANT],1,[thread safe])
     fi
     AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS])
-    use_gethostbyname_r="no"
     ;;
 netbsd*)
      if test "$have_pthreads" = "yes"; then
@@ -1010,26 +1005,22 @@ netbsd*)
 	AC_DEFINE([_REENTRANT],1,[thread safe])
      fi
     AC_DEFINE([C_BSD],1,[os is NetBSD])
-    use_gethostbyname_r="no"
     ;;
 bsd*)
     AC_MSG_RESULT([Unknown BSD detected. Disabling thread support.])
     have_pthreads="no"
     AC_DEFINE([C_BSD],1,[os is bsd flavor])
-    use_gethostbyname_r="no"
     ;;
 beos*)
     AC_MSG_RESULT([BeOS detected. Disabling thread support.])
     have_pthreads="no"
     AC_DEFINE([C_BEOS],1,[os is beos])
-    use_gethostbyname_r="no"
     ;;
 darwin*)
     AC_DEFINE([C_BSD],1,[os is bsd flavor])
     AC_DEFINE([C_DARWIN],1,[os is darwin])
     AC_DEFINE([BIND_8_COMPAT],1,[enable bind8 compatibility])
     use_netinfo="yes"
-    use_gethostbyname_r="no"
     ;;
 os2*)
     FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsyslog"
@@ -1057,7 +1048,6 @@ hpux*)
 	AC_DEFINE([_REENTRANT],1,[thread safe])
     fi
     AC_DEFINE([C_HPUX],1,[os is hpux])
-    use_gethostbyname_r="no"
     ;;
 aix*)
     if test "$have_pthreads" = "yes"; then
@@ -1169,72 +1159,6 @@ then
     AC_DEFINE([BUILD_CLAMD], 1, "build clamd")
 fi
 
-dnl Check for gethostbyname_r and number of its arguments
-dnl Code from libwww/configure.in
-AC_MSG_CHECKING([for gethostbyname_r])
-if test -z "$ac_cv_gethostbyname_args"; then
-AC_TRY_COMPILE(
-[
-#include <sys/types.h>
-#include <netdb.h>
-],[
-struct hostent *hp;
-struct hostent h;
-char *name;
-char buffer[10];
-int  h_errno;
-hp = gethostbyname_r(name, &h, buffer, 10, &h_errno);
-], ac_cv_gethostbyname_args=5)
-fi
-if test -z "$ac_cv_gethostbyname_args"; then
-AC_TRY_COMPILE(
-[
-#include <sys/types.h>
-#include <netdb.h>
-],[
-struct hostent h;
-struct hostent_data hdata;
-char *name;
-int  rc;
-rc = gethostbyname_r(name, &h, &hdata);
-], ac_cv_gethostbyname_args=3)
-fi
-if test -z "$ac_cv_gethostbyname_args"; then
-AC_TRY_COMPILE(
-[
-#include <sys/types.h>
-#include <netdb.h>
-], [
-struct hostent h;
-struct hostent *hp;
-char *name;
-char buf[10];
-int rc;
-int h_errno;
-
-rc = gethostbyname_r(name, &h, buf, 10, &hp, &h_errno);
-], ac_cv_gethostbyname_args=6)
-fi
-
-AC_ARG_ENABLE([gethostbyname_r],
-[  --disable-gethostbyname_r	  disable support for gethostbyname_r],
-use_gethostbyname_r=$enableval,)
-
-if test "$use_gethostbyname_r" = "no"; then
-    AC_MSG_RESULT([support disabled])
-elif test -z "$ac_cv_gethostbyname_args"; then
-    AC_MSG_RESULT(no)
-else
-    if test "$ac_cv_gethostbyname_args" = 3; then
-	AC_DEFINE([HAVE_GETHOSTBYNAME_R_3],1,[gethostbyname_r takes 3 arguments])
-    elif test "$ac_cv_gethostbyname_args" = 5; then
-	AC_DEFINE([HAVE_GETHOSTBYNAME_R_5],1,[gethostbyname_r takes 5 arguments])
-    elif test "$ac_cv_gethostbyname_args" = 6; then
-	AC_DEFINE([HAVE_GETHOSTBYNAME_R_6],1,[gethostbyname_r takes 6 arguments])
-    fi
-    AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments])
-fi
-
 dnl Check for readdir_r and number of its arguments
 dnl Code from libwww/configure.in
 
diff --git a/shared/network.c b/shared/network.c
deleted file mode 100644
index a4a4540..0000000
--- a/shared/network.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *  Copyright (C) 2007-2009 Sourcefire, Inc.
- *
- *  Authors: Nigel Horne
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- *  MA 02110-1301, USA.
- *
- */
-
-#if HAVE_CONFIG_H
-#include "clamav-config.h"
-#endif
-
-#include <stdio.h>
-
-#ifdef	HAVE_STRING_H
-#include <string.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifndef _WIN32
-#include <netdb.h>
-#endif
-
-#ifdef CL_NOTHREADS
-#undef CL_THREAD_SAFE
-#endif
-
-#ifdef  CL_THREAD_SAFE
-#include <pthread.h>
-#endif
-
-#include "network.h"
-
-/*
- * TODO: gethostbyname_r is non-standard so different operating
- * systems do it in different ways. Need more examples
- * Perhaps we could use res_search()?
- *
- * Returns 0 for success
- */
-int r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t len)
-{
-	struct hostent *hp2;
-	int ret = -1;
-#if !defined(HAVE_GETHOSTBYNAME_R_6) && !defined(HAVE_GETHOSTBYNAME_R_5) && !defined(HAVE_GETHOSTBYNAME_R_3)
-#ifdef  CL_THREAD_SAFE
-	static pthread_mutex_t hostent_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
-#endif
-
-	if((hostname == NULL) || (hp == NULL))
-		return -1;
-	memset(hp, 0, sizeof(struct hostent));
-#if	defined(HAVE_GETHOSTBYNAME_R_6)
-	/* e.g. Linux */
-	if(gethostbyname_r(hostname, hp, buf, len, &hp2, &ret) < 0)
-		return ret;
-#elif	defined(HAVE_GETHOSTBYNAME_R_5)
-	/* e.g. BSD, Solaris, Cygwin */
-	if(gethostbyname_r(hostname, hp, buf, len, &ret) == NULL)
-		return ret;
-#elif	defined(HAVE_GETHOSTBYNAME_R_3)
-	/* e.g. HP/UX, AIX */
-	if(gethostbyname_r(hostname, &hp, (struct hostent_data *)buf) < 0)
-		return h_errno;
-#else
-	/* Single thread the code e.g. VS2005 */
-#ifdef  CL_THREAD_SAFE
-	pthread_mutex_lock(&hostent_mutex);
-#endif
-	if((hp2 = gethostbyname(hostname)) == NULL) {
-#ifdef  CL_THREAD_SAFE
-		pthread_mutex_unlock(&hostent_mutex);
-#endif
-		return h_errno;
-	}
-	memcpy(hp, hp2, sizeof(struct hostent));
-#ifdef  CL_THREAD_SAFE
-	pthread_mutex_unlock(&hostent_mutex);
-#endif
-
-#endif
-	return 0;
-}
diff --git a/shared/network.h b/shared/network.h
deleted file mode 100644
index 62ebb54..0000000
--- a/shared/network.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Copyright (C) 2007-2009 Sourcefire, Inc.
- *
- *  Authors: Nigel Horne
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- *  MA 02110-1301, USA.
- *
- */
-
-#ifndef __NETWORK_H
-#define __NETWORK_H
-
-#ifdef	HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifndef	_WIN32
-#include <netdb.h>
-#endif
-
-int r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t len);
-
-#endif

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list