]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2335. [port] sunos: libbind and *printf() support for long long.
authorMark Andrews <marka@isc.org>
Mon, 18 Feb 2008 03:50:46 +0000 (03:50 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Feb 2008 03:50:46 +0000 (03:50 +0000)
                        [RT #17513]

12 files changed:
CHANGES
README
lib/bind/bsd/strerror.c
lib/bind/bsd/strtoul.c
lib/bind/config.h.in
lib/bind/configure
lib/bind/configure.in
lib/bind/include/isc/misc.h
lib/bind/irs/irp.c
lib/bind/isc/ctl_clnt.c
lib/bind/isc/ctl_srvr.c
lib/bind/port_after.h.in

diff --git a/CHANGES b/CHANGES
index 6aa6c6afefb0776e82ff9ee35da596e22d433598..a740d04ef1d2cec75dbe691cf8357f9d4928d615 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2335.  [port]          sunos:  libbind and *printf() support for long long. 
+                       [RT #17513]
+
 2334.  [bug]           Bad REQUIRES in fromstruct_in_naptr(),  off by one
                        bug in fromstruct_txt(). [RT #17609]
                        
diff --git a/README b/README
index 56c9c4079f586fa1ec2c5c112eb88ee60d5cfd75..7b242762f56982bcf1f854371874750211d0551b 100644 (file)
--- a/README
+++ b/README
@@ -508,6 +508,9 @@ Building
        on your system, and some require Perl; see bin/tests/system/README
        for details.
 
+       SunOS 4 requires "printf" to be installed to make the shared
+       libraries.  sh-utils-1.16 provides a "printf" which compiles
+       on SunOS 4.
 
 Documentation
 
index 416cad48770725cef1647a455f3974541bc25941..5973e63d5bf2184deadd55b9ad1442d1066a1c1b 100644 (file)
@@ -1,6 +1,6 @@
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)strerror.c   8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: strerror.c,v 1.5 2005/04/27 04:56:12 sra Exp $";
+static const char rcsid[] = "$Id: strerror.c,v 1.6 2008/02/18 03:49:08 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -60,12 +60,14 @@ isc_strerror(int num) {
        static char ebuf[40] = UPREFIX;         /*%< 64-bit number + slop */
        u_int errnum;
        char *p, *t;
+#ifndef USE_SYSERROR_LIST
        const char *ret;
+#endif
        char tmp[40];
 
        errnum = num;                           /*%< convert to unsigned */
 #ifdef USE_SYSERROR_LIST
-       if (errnum < sys_nerr)
+       if (errnum < (u_int)sys_nerr)
                return (sys_errlist[errnum]);
 #else
 #undef strerror
index 5d066a93d408f246d069f509fe346f514881d043..b37ff72729152f6c38cf16137a4a4639fa2c7eb0 100644 (file)
@@ -1,6 +1,6 @@
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)strtoul.c    8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: strtoul.c,v 1.3 2005/04/27 04:56:12 sra Exp $";
+static const char rcsid[] = "$Id: strtoul.c,v 1.4 2008/02/18 03:49:08 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -70,7 +70,7 @@ strtoul(const char *nptr, char **endptr, int base) {
         * See strtol for comments as to the logic used.
         */
        do {
-               c = *(unsigned char *)s++;
+               c = *(const unsigned char *)s++;
        } while (isspace(c));
        if (c == '-') {
                neg = 1;
@@ -87,7 +87,7 @@ strtoul(const char *nptr, char **endptr, int base) {
                base = c == '0' ? 8 : 10;
        cutoff = (u_long)ULONG_MAX / (u_long)base;
        cutlim = (u_long)ULONG_MAX % (u_long)base;
-       for (acc = 0, any = 0;; c = *(unsigned char*)s++) {
+       for (acc = 0, any = 0;; c = *(const unsigned char*)s++) {
                if (isdigit(c))
                        c -= '0';
                else if (isalpha(c))
@@ -96,7 +96,7 @@ strtoul(const char *nptr, char **endptr, int base) {
                        break;
                if (c >= base)
                        break;
-               if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
+               if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
                        any = -1;
                else {
                        any = 1;
@@ -110,7 +110,7 @@ strtoul(const char *nptr, char **endptr, int base) {
        } else if (neg)
                acc = -acc;
        if (endptr != 0)
-               *endptr = (char *)(any ? s - 1 : nptr);
+               DE_CONST((any ? s - 1 : nptr), *endptr);
        return (acc);
 }
 
index 69ea2854300007cd84ec62890cc5094768145b3b..27df74f838fa7a00e099fb760b182945c710d4c5 100644 (file)
@@ -5,6 +5,7 @@
 #undef HAVE_STROPTS_H
 #undef HAVE_SYS_TIMERS_H
 #undef HAVE_SYS_SELECT_H
+#undef HAVE_MEMORY_H
 #undef SYS_CDEFS_H
 #undef _POSIX_PTHREAD_SEMANTICS
 #undef POSIX_GETPWUID_R
 #undef POSIX_GETGRNAM_R
 #undef HAVE_MEMMOVE
 #undef HAVE_MEMCHR
+#undef SPRINTF_CHAR
+#undef VSPRINTF_CHAR
+#undef USE_SYSERROR_LIST
+#undef NEED_STRTOUL
+#undef NEED_SUN4PROTOS
 
 #undef NEED_SETGROUPENT
 #undef NEED_GETGROUPLIST
index 83b3b71c1b96336b6c37b3573afd5ca17c4fb346..67ec8d11f129059cc3f4bff6e0fa2cd7d6a7c7ee 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.130 .
+# From configure.in Revision: 1.131 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -929,7 +929,6 @@ ISC_PLATFORM_NEEDSTRSEP
 ISC_PLATFORM_NEEDVSNPRINTF
 ISC_EXTRA_OBJS
 ISC_EXTRA_SRCS
-USE_SYSERROR_LIST
 ISC_PLATFORM_QUADFORMAT
 ISC_SOCKLEN_T
 GETGROUPLIST_ARGS
@@ -4248,7 +4247,8 @@ done
 
 
 
-for ac_header in fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h
+
+for ac_header in fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h memory.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -7258,6 +7258,96 @@ _ACEOF
 
 fi
 
+{ echo "$as_me:$LINENO: checking for strtoul" >&5
+echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; }
+if test "${ac_cv_func_strtoul+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define strtoul to an innocuous variant, in case <limits.h> declares strtoul.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define strtoul innocuous_strtoul
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strtoul (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef strtoul
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strtoul ();
+/* 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_strtoul || defined __stub___strtoul
+choke me
+#endif
+
+int
+main ()
+{
+return strtoul ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_strtoul=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_strtoul=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5
+echo "${ECHO_T}$ac_cv_func_strtoul" >&6; }
+if test $ac_cv_func_strtoul = yes; then
+  :
+else
+  cat >>confdefs.h <<\_ACEOF
+#define NEED_STRTOUL 1
+_ACEOF
+
+fi
+
 
 { echo "$as_me:$LINENO: checking for if_nametoindex" >&5
 echo $ECHO_N "checking for if_nametoindex... $ECHO_C" >&6; }
@@ -7624,6 +7714,61 @@ fi
 
 
 
+if test -n "$NEED_STRERROR"
+then
+       { echo "$as_me:$LINENO: checking for extern char * sys_errlist" >&5
+echo $ECHO_N "checking for extern char * sys_errlist... $ECHO_C" >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+ extern int sys_nerr; extern char *sys_errlist[];
+int
+main ()
+{
+ const char *p = sys_errlist[0];
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+                   cat >>confdefs.h <<\_ACEOF
+#define USE_SYSERROR_LIST 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
 #
 # flockfile is usually provided by pthreads, but we may want to use it
 # even if compiled with --disable-threads.
@@ -8972,7 +9117,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 8975 "configure"' > conftest.$ac_ext
+  echo '#line 9120 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -11094,11 +11239,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11097: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11242: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11101: \$? = $ac_status" >&5
+   echo "$as_me:11246: \$? = $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
@@ -11337,11 +11482,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11340: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11485: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11344: \$? = $ac_status" >&5
+   echo "$as_me:11489: \$? = $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
@@ -11397,11 +11542,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11400: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11545: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11404: \$? = $ac_status" >&5
+   echo "$as_me:11549: \$? = $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
@@ -13545,7 +13690,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13548 "configure"
+#line 13693 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13643,7 +13788,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13646 "configure"
+#line 13791 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15836,11 +15981,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15839: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15984: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15843: \$? = $ac_status" >&5
+   echo "$as_me:15988: \$? = $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
@@ -15896,11 +16041,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15899: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16044: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15903: \$? = $ac_status" >&5
+   echo "$as_me:16048: \$? = $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
@@ -17224,7 +17369,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17227 "configure"
+#line 17372 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17322,7 +17467,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17325 "configure"
+#line 17470 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18159,11 +18304,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18162: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18307: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18166: \$? = $ac_status" >&5
+   echo "$as_me:18311: \$? = $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
@@ -18219,11 +18364,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18222: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18367: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18226: \$? = $ac_status" >&5
+   echo "$as_me:18371: \$? = $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
@@ -20253,11 +20398,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20256: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20401: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20260: \$? = $ac_status" >&5
+   echo "$as_me:20405: \$? = $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
@@ -20496,11 +20641,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20499: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20644: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20503: \$? = $ac_status" >&5
+   echo "$as_me:20648: \$? = $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
@@ -20556,11 +20701,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20559: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20704: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:20563: \$? = $ac_status" >&5
+   echo "$as_me:20708: \$? = $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
@@ -22704,7 +22849,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 22707 "configure"
+#line 22852 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -22802,7 +22947,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 22805 "configure"
+#line 22950 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -24621,6 +24766,10 @@ case "$host" in
        *-qnx*)         PORT_DIR="port/qnx";;
        *-rhapsody*)    PORT_DIR="port/rhapsody";;
        *-sunos4*)
+                       cat >>confdefs.h <<\_ACEOF
+#define NEED_SUN4PROTOS 1
+_ACEOF
+
                        PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
                        PORT_DIR="port/sunos";;
        *-solaris2.[01234])
@@ -25917,64 +26066,35 @@ else
   ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"
 fi
 
-{ echo "$as_me:$LINENO: checking for vsnprintf" >&5
-echo $ECHO_N "checking for vsnprintf... $ECHO_C" >&6; }
-if test "${ac_cv_func_vsnprintf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+
+
+{ echo "$as_me:$LINENO: checking for char *sprintf" >&5
+echo $ECHO_N "checking for char *sprintf... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define vsnprintf innocuous_vsnprintf
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char vsnprintf (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef vsnprintf
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char vsnprintf ();
-/* 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_vsnprintf || defined __stub___vsnprintf
-choke me
-#endif
+#include <stdio.h>
 
 int
 main ()
 {
-return vsnprintf ();
+ char buf[2]; return(*sprintf(buf,"x"));
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -25983,37 +26103,94 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_func_vsnprintf=yes
+       } && test -s conftest.$ac_objext; then
+  cat >>confdefs.h <<\_ACEOF
+#define SPRINTF_CHAR 1
+_ACEOF
+
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_vsnprintf=no
-fi
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5
-echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6; }
-if test $ac_cv_func_vsnprintf = yes; then
-  ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
-else
-  ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
-        ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
-        ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+{ echo "$as_me:$LINENO: checking for char *vsprintf" >&5
+echo $ECHO_N "checking for char *vsprintf... $ECHO_C" >&6; }
+case $host in
+*sunos4*) # not decared in any header file.
+cat >>confdefs.h <<\_ACEOF
+#define VSPRINTF_CHAR 1
+_ACEOF
 
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+;;
+*)
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+#include <stdio.h>
 
+int
+main ()
+{
+ char buf[2]; return(*vsprintf(buf,"x"));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >>confdefs.h <<\_ACEOF
+#define VSPRINTF_CHAR 1
+_ACEOF
 
-{ echo "$as_me:$LINENO: checking for strerror" >&5
-echo $ECHO_N "checking for strerror... $ECHO_C" >&6; }
-if test "${ac_cv_func_strerror+set}" = set; then
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+;;
+esac
+
+{ echo "$as_me:$LINENO: checking for vsnprintf" >&5
+echo $ECHO_N "checking for vsnprintf... $ECHO_C" >&6; }
+if test "${ac_cv_func_vsnprintf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -26022,12 +26199,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define strerror to an innocuous variant, in case <limits.h> declares strerror.
+/* Define vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define strerror innocuous_strerror
+#define vsnprintf innocuous_vsnprintf
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char strerror (); below.
+    which can conflict with char vsnprintf (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
@@ -26037,7 +26214,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <assert.h>
 #endif
 
-#undef strerror
+#undef vsnprintf
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -26045,18 +26222,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char strerror ();
+char vsnprintf ();
 /* 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_strerror || defined __stub___strerror
+#if defined __stub_vsnprintf || defined __stub___vsnprintf
 choke me
 #endif
 
 int
 main ()
 {
-return strerror ();
+return vsnprintf ();
   ;
   return 0;
 }
@@ -26079,28 +26256,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_func_strerror=yes
+  ac_cv_func_vsnprintf=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_strerror=no
+       ac_cv_func_vsnprintf=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5
-echo "${ECHO_T}$ac_cv_func_strerror" >&6; }
-if test $ac_cv_func_strerror = yes; then
-  USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"
+{ echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6; }
+if test $ac_cv_func_vsnprintf = yes; then
+  ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
 else
-  USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"
+  ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
+        ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
+        ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
 fi
 
 
 
-#
+
+
+
+
 # Determine the printf format characters to use when printing
 # values of type isc_int64_t.  We make the assumption that platforms
 # where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
@@ -33211,7 +33393,6 @@ ISC_PLATFORM_NEEDSTRSEP!$ISC_PLATFORM_NEEDSTRSEP$ac_delim
 ISC_PLATFORM_NEEDVSNPRINTF!$ISC_PLATFORM_NEEDVSNPRINTF$ac_delim
 ISC_EXTRA_OBJS!$ISC_EXTRA_OBJS$ac_delim
 ISC_EXTRA_SRCS!$ISC_EXTRA_SRCS$ac_delim
-USE_SYSERROR_LIST!$USE_SYSERROR_LIST$ac_delim
 ISC_PLATFORM_QUADFORMAT!$ISC_PLATFORM_QUADFORMAT$ac_delim
 ISC_SOCKLEN_T!$ISC_SOCKLEN_T$ac_delim
 GETGROUPLIST_ARGS!$GETGROUPLIST_ARGS$ac_delim
@@ -33235,6 +33416,7 @@ GROUP_R_OK!$GROUP_R_OK$ac_delim
 GROUP_R_RETURN!$GROUP_R_RETURN$ac_delim
 GROUP_R_END_RESULT!$GROUP_R_END_RESULT$ac_delim
 GROUP_R_END_RETURN!$GROUP_R_END_RETURN$ac_delim
+GROUP_R_ENT_ARGS!$GROUP_R_ENT_ARGS$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -33276,7 +33458,6 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-GROUP_R_ENT_ARGS!$GROUP_R_ENT_ARGS$ac_delim
 GROUP_R_SET_RESULT!$GROUP_R_SET_RESULT$ac_delim
 GROUP_R_SET_RETURN!$GROUP_R_SET_RETURN$ac_delim
 HOST_R_ARGS!$HOST_R_ARGS$ac_delim
@@ -33354,7 +33535,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 76; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 89697196a4a03165365588cce94fd27daf3407d2..0735bc00a730e6dc8a4b467b1dbf2a7eb1ddcd30 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-AC_REVISION($Revision: 1.130 $)
+AC_REVISION($Revision: 1.131 $)
 
 AC_INIT(resolv/herror.c)
 AC_PREREQ(2.13)
@@ -169,7 +169,7 @@ AC_PROG_CC
 AC_HEADER_STDC
 
 
-AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h)
+AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h memory.h)
 
 AC_C_CONST
 AC_C_INLINE
@@ -461,6 +461,7 @@ AC_SUBST(WANT_THREADS_OBJS)
 AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
 AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE))
 AC_CHECK_FUNC(memchr, AC_DEFINE(HAVE_MEMCHR))
+AC_CHECK_FUNC(strtoul, , AC_DEFINE(NEED_STRTOUL))
 
 AC_CHECK_FUNC(if_nametoindex,
        [USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
@@ -490,6 +491,16 @@ AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
 [NEED_STRERROR="#define NEED_STRERROR 1"])
 AC_SUBST(NEED_STRERROR)
 
+if test -n "$NEED_STRERROR"
+then
+       AC_MSG_CHECKING([for extern char * sys_errlist[]])
+       AC_TRY_LINK([ extern int sys_nerr; extern char *sys_errlist[]; ],
+                   [ const char *p = sys_errlist[0]; ],
+                   AC_MSG_RESULT(yes)
+                   AC_DEFINE(USE_SYSERROR_LIST),
+                   AC_MSG_RESULT(no))
+fi
+
 #
 # flockfile is usually provided by pthreads, but we may want to use it
 # even if compiled with --disable-threads.
@@ -1050,6 +1061,7 @@ case "$host" in
        *-qnx*)         PORT_DIR="port/qnx";;
        *-rhapsody*)    PORT_DIR="port/rhapsody";;
        *-sunos4*)
+                       AC_DEFINE(NEED_SUN4PROTOS)
                        PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
                        PORT_DIR="port/sunos";;
        *-solaris2.[[01234]])
@@ -1246,6 +1258,38 @@ found_rt_iflist
 AC_CHECK_FUNC(strsep,
        [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
        [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
+
+
+AC_MSG_CHECKING(for char *sprintf)
+AC_TRY_COMPILE([
+#include <stdio.h>
+],
+[ char buf[2]; return(*sprintf(buf,"x"));],
+AC_DEFINE(SPRINTF_CHAR)
+AC_MSG_RESULT(yes)
+,
+AC_MSG_RESULT(no)
+)
+
+AC_MSG_CHECKING(for char *vsprintf)
+case $host in
+*sunos4*) # not decared in any header file.
+AC_DEFINE(VSPRINTF_CHAR)
+AC_MSG_RESULT(yes)
+;;
+*)
+AC_TRY_COMPILE([
+#include <stdio.h>
+],
+[ char buf[2]; return(*vsprintf(buf,"x"));],
+AC_DEFINE(VSPRINTF_CHAR)
+AC_MSG_RESULT(yes)
+,
+AC_MSG_RESULT(no)
+)
+;;
+esac
+
 AC_CHECK_FUNC(vsnprintf,
        [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
        [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
@@ -1256,12 +1300,7 @@ AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
 
 AC_SUBST(ISC_EXTRA_OBJS)
 AC_SUBST(ISC_EXTRA_SRCS)
-AC_CHECK_FUNC(strerror,
-       [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
-       [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
-AC_SUBST(USE_SYSERROR_LIST)
 
-#
 # Determine the printf format characters to use when printing
 # values of type isc_int64_t.  We make the assumption that platforms
 # where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
index e9ad2c552d57faea21641bd8bb0a92ebd88256d5..1b93f19f32d19d4cbbd2f532be7421252b895b1d 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: misc.h,v 1.5 2005/04/27 04:56:18 sra Exp $
+ * $Id: misc.h,v 1.6 2008/02/18 03:49:08 marka Exp $
  */
 
 #ifndef _ISC_MISC_H
@@ -25,6 +25,7 @@
 /*! \file */
 
 #include <stdio.h>
+#include <sys/types.h>
 
 #define        bitncmp         __bitncmp
 /*#define isc_movefile __isc_movefile */
index 3bd43783cd1176225a129a85296c9af372605b90..81a66e5dc0c8c8cb9e734389778a62782434fe50 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irp.c,v 1.9 2006/03/09 23:57:56 marka Exp $";
+static const char rcsid[] = "$Id: irp.c,v 1.10 2008/02/18 03:49:08 marka Exp $";
 #endif
 
 /* Imports */
@@ -48,6 +48,12 @@ static const char rcsid[] = "$Id: irp.c,v 1.9 2006/03/09 23:57:56 marka Exp $";
 
 #include "port_after.h"
 
+#ifdef VSPRINTF_CHAR
+# define VSPRINTF(x) strlen(vsprintf/**/x)
+#else
+# define VSPRINTF(x) ((size_t)vsprintf x)
+#endif
+
 /* Forward. */
 
 static void            irp_close(struct irs_acc *);
@@ -528,7 +534,7 @@ irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...) {
        }
 
        va_start(ap, fmt);
-       todo = vsprintf(buffer, fmt, ap);
+       todo = VSPRINTF((buffer, fmt, ap));
        va_end(ap);
        if (todo > (int)sizeof(buffer) - 3) {
                syslog(LOG_CRIT, "memory overrun in irs_irp_send_command()");
index 5438868fe9f49c69351f99938a5f55b5fa2aae31..cfaec1c792cdd956aa5c0ff72ea8213233598aff 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_clnt.c,v 1.9 2007/05/18 06:22:03 marka Exp $";
+static const char rcsid[] = "$Id: ctl_clnt.c,v 1.10 2008/02/18 03:49:08 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -38,6 +38,9 @@ static const char rcsid[] = "$Id: ctl_clnt.c,v 1.9 2007/05/18 06:22:03 marka Exp
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
 
 #include <isc/assertions.h>
 #include <isc/ctl.h>
index 836b85a8df84b6738f6b5ba336d8979dfdda5cfa..c31d6478f21a293217b91ae264a27aa6d0fec98a 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_srvr.c,v 1.8 2006/12/07 04:46:27 marka Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 1.9 2008/02/18 03:49:08 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -40,6 +40,9 @@ static const char rcsid[] = "$Id: ctl_srvr.c,v 1.8 2006/12/07 04:46:27 marka Exp
 #include <time.h>
 #include <unistd.h>
 #include <fcntl.h>
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
 
 #include <isc/assertions.h>
 #include <isc/ctl.h>
index 7acc0556a351c761a8e6657436bb3543b483e850..112f3ec230502ca2da18f80c100062efe4f9dab6 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: port_after.h.in,v 1.55 2008/01/23 02:15:56 tbox Exp $ */
+/* $Id: port_after.h.in,v 1.56 2008/02/18 03:49:08 marka Exp $ */
 
 #ifndef port_after_h
 #define port_after_h
 @NEED_DAEMON@
 @NEED_STRSEP@
 @NEED_STRERROR@
+#ifdef NEED_STRERROR
+const char *isc_strerror(int);
+#define strerror isc_strerror
+#endif
 @HAS_INET6_STRUCTS@
 @HAVE_SIN6_SCOPE_ID@
 @NEED_IN6ADDR_ANY@
@@ -49,7 +53,6 @@
 @NEED_GETTIMEOFDAY@
 @HAVE_STRNDUP@
 @USE_FIONBIO_IOCTL@
-@USE_SYSERROR_LIST@
 @INNETGR_ARGS@
 @SETNETGRENT_ARGS@
 @USE_IFNAMELINKID@
@@ -438,4 +441,80 @@ setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS);
 NGR_R_SET_RETURN
 setnetgrent_r(const char *netgroup);
 #endif
+
+#ifdef NEED_STRTOUL
+unsigned long strtoul(const char *, char **, int);
+#endif
+
+#ifdef NEED_SUN4PROTOS
+#include <stdarg.h>
+#ifndef __SIZE_TYPE__
+#define __SIZE_TYPE__ int
+#endif
+struct sockaddr;
+struct iovec;
+struct timeval;
+struct timezone;
+int fprintf(FILE *, const char *, ...);
+int getsockname(int, struct sockaddr *, int *);
+int getpeername(int, struct sockaddr *, int *);
+int socket(int, int, int);
+int connect(int, const struct sockaddr *, int);
+int writev(int, struct iovec *, int);
+int readv(int, struct iovec *, int);
+int send(int, const char *, int, int);
+void bzero(char *, int);
+int recvfrom(int, char *, int, int, struct sockaddr *, int *);
+int syslog(int, const char *, ... );
+int printf(const char *, ...);
+__SIZE_TYPE__ fread(void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *);
+__SIZE_TYPE__ fwrite(const void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *);
+int fclose(FILE *);
+int ungetc(int, FILE *);
+int scanf(const char *, ...);
+int sscanf(const char *, const char *, ... );
+int tolower(int);
+int toupper(int);
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, int);
+int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+#ifdef gettimeofday
+#undef gettimeofday
+int gettimeofday(struct timeval *, struct timezone *);
+#define gettimeofday isc__gettimeofday
+#else
+int gettimeofday(struct timeval *, struct timezone *);
+#endif
+long strtol(const char*, char **, int);
+int fseek(FILE *, long, int);
+int setsockopt(int, int, int, const char *, int);
+int bind(int, const struct sockaddr *, int);
+void bcopy(char *, char *, int);
+int fputc(char, FILE *);
+int listen(int, int);
+int accept(int, struct sockaddr *, int *);
+int getsockopt(int, int, int, char *, int *);
+int vfprintf(FILE *, const char *, va_list);
+int fflush(FILE *);
+int fgetc(FILE *);
+int fputs(const char *, FILE *);
+int fchown(int, int, int);
+void setbuf(FILE *, char *);
+int gethostname(char *, int);
+int rename(const char *, const char *);
+time_t time(time_t *);
+int fscanf(FILE *, const char *, ...);
+int sscanf(const char *, const char *, ...);
+int ioctl(int, int, caddr_t);
+void perror(const char *);
+
+#if !defined(__USE_FIXED_PROTOTYPES__) && !defined(__cplusplus) && !defined(__STRICT_ANSI__)
+/*
+ * 'gcc -ansi' changes the prototype for vsprintf().
+ * Use this prototype when 'gcc -ansi' is not in effect.
+ */
+char *vsprintf(char *, const char *, va_list);
+#endif
+#endif 
+
 #endif