Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/compat Deal with errc/warnc



details:   https://anonhg.NetBSD.org/src/rev/60e509d61b12
branches:  trunk
changeset: 329736:60e509d61b12
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jun 06 01:40:40 2014 +0000

description:
Deal with errc/warnc

diffstat:

 tools/compat/compat_defs.h      |   14 +-
 tools/compat/configure          |  761 ++++++++++++++++++++++++++-------------
 tools/compat/configure.ac       |    8 +-
 tools/compat/nbtool_config.h.in |   18 +-
 4 files changed, 534 insertions(+), 267 deletions(-)

diffs (truncated from 2075 to 300 lines):

diff -r 74dc78b162e5 -r 60e509d61b12 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Fri Jun 06 01:27:32 2014 +0000
+++ b/tools/compat/compat_defs.h        Fri Jun 06 01:40:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.96 2014/04/19 19:01:08 apb Exp $     */
+/*     $NetBSD: compat_defs.h,v 1.97 2014/06/06 01:40:40 christos Exp $        */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -260,6 +260,18 @@
 void warnx(const char *, ...);
 void vwarnx(const char *, va_list);
 #endif
+#if !HAVE_DECL_WARNC
+void warnc(int, const char *, ...);
+#endif
+#if !HAVE_DECL_VWARNC
+void vwarnc(int, const char *, va_list);
+#endif
+#if !HAVE_DECL_ERRC
+void errc(int, int, const char *, ...);
+#endif
+#if !HAVE_DECL_VERRC
+void verrc(int, int, const char *, va_list);
+#endif
 
 #if !HAVE_ESETFUNC
 void (*esetfunc(void (*)(int, const char *, ...)))(int, const char *, ...);
diff -r 74dc78b162e5 -r 60e509d61b12 tools/compat/configure
--- a/tools/compat/configure    Fri Jun 06 01:27:32 2014 +0000
+++ b/tools/compat/configure    Fri Jun 06 01:40:40 2014 +0000
@@ -5794,14 +5794,247 @@
 
 fi
 
-echo "$as_me:5797: checking whether htobe16 is declared" >&5
-echo $ECHO_N "checking whether htobe16 is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_htobe16+set}" = set; then
+echo "$as_me:5797: checking whether errc is declared" >&5
+echo $ECHO_N "checking whether errc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_errc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line 5803 "configure"
 #include "confdefs.h"
+
+#ifdef HAVE_ERR_H
+#include <err.h>
+#endif
+
+int
+main ()
+{
+#ifndef errc
+  char *p = (char *) errc;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5822: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:5825: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:5828: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:5831: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_decl_errc=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_decl_errc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:5841: result: $ac_cv_have_decl_errc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_errc" >&6
+if test $ac_cv_have_decl_errc = yes; then
+
+cat >>confdefs.h <<EOF
+#define HAVE_DECL_ERRC 1
+EOF
+
+else
+  cat >>confdefs.h <<EOF
+#define HAVE_DECL_ERRC 0
+EOF
+
+fi
+echo "$as_me:5855: checking whether verrc is declared" >&5
+echo $ECHO_N "checking whether verrc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_verrc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 5861 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_ERR_H
+#include <err.h>
+#endif
+
+int
+main ()
+{
+#ifndef verrc
+  char *p = (char *) verrc;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5880: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:5883: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:5886: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:5889: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_decl_verrc=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_decl_verrc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:5899: result: $ac_cv_have_decl_verrc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_verrc" >&6
+if test $ac_cv_have_decl_verrc = yes; then
+
+cat >>confdefs.h <<EOF
+#define HAVE_DECL_VERRC 1
+EOF
+
+else
+  cat >>confdefs.h <<EOF
+#define HAVE_DECL_VERRC 0
+EOF
+
+fi
+echo "$as_me:5913: checking whether warnc is declared" >&5
+echo $ECHO_N "checking whether warnc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_warnc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 5919 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_ERR_H
+#include <err.h>
+#endif
+
+int
+main ()
+{
+#ifndef warnc
+  char *p = (char *) warnc;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5938: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:5941: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:5944: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:5947: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_decl_warnc=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_decl_warnc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:5957: result: $ac_cv_have_decl_warnc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_warnc" >&6
+if test $ac_cv_have_decl_warnc = yes; then
+
+cat >>confdefs.h <<EOF
+#define HAVE_DECL_WARNC 1
+EOF
+
+else
+  cat >>confdefs.h <<EOF
+#define HAVE_DECL_WARNC 0
+EOF
+
+fi
+echo "$as_me:5971: checking whether vwarnc is declared" >&5
+echo $ECHO_N "checking whether vwarnc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vwarnc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 5977 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_ERR_H
+#include <err.h>
+#endif
+
+int
+main ()
+{
+#ifndef vwarnc
+  char *p = (char *) vwarnc;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5996: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:5999: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:6002: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:6005: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_decl_vwarnc=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_decl_vwarnc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6015: result: $ac_cv_have_decl_vwarnc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vwarnc" >&6
+if test $ac_cv_have_decl_vwarnc = yes; then
+
+cat >>confdefs.h <<EOF
+#define HAVE_DECL_VWARNC 1
+EOF
+
+else
+  cat >>confdefs.h <<EOF
+#define HAVE_DECL_VWARNC 0
+EOF
+
+fi
+
+echo "$as_me:6030: checking whether htobe16 is declared" >&5
+echo $ECHO_N "checking whether htobe16 is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_htobe16+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line 6036 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 
 int
@@ -5816,16 +6049,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5819: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6052: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:5822: \$? = $ac_status" >&5
+  echo "$as_me:6055: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:5825: \"$ac_try\"") >&5
+  { (eval echo "$as_me:6058: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:5828: \$? = $ac_status" >&5
+  echo "$as_me:6061: \$? = $ac_status" >&5



Home | Main Index | Thread Index | Old Index