Source-Changes-HG archive

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

[src/netbsd-8]: src/tools/compat Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/f948ac105211
branches:  netbsd-8
changeset: 851227:f948ac105211
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Dec 21 19:11:21 2017 +0000

description:
Pull up following revision(s) (requested by sevan in ticket #435):
        tools/compat/compat_defs.h: 1.108
        tools/compat/configure: 1.87-1.88
        tools/compat/configure.ac: 1.88-1.89
        tools/compat/fpurge.c: 1.2
        tools/compat/nbtool_config.h.in: 1.41-1.42
handle __fpurge being declared in <stdio_ext.h>
--
regen
--
Add asnprintf() to the AC_CHECK_DECLS list.
Resolves conflict when cross compiling on Cygwin the provided implementation
does not get picked up.
Closes PR toolchain/52797
--
regen

diffstat:

 tools/compat/compat_defs.h      |   6 ++++-
 tools/compat/configure          |  48 ++++++++++++++++++++++++++++++++++++----
 tools/compat/configure.ac       |   8 +++---
 tools/compat/fpurge.c           |   5 +++-
 tools/compat/nbtool_config.h.in |  23 ++++++++++++++++---
 5 files changed, 75 insertions(+), 15 deletions(-)

diffs (207 lines):

diff -r 5e722d6fe326 -r f948ac105211 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Thu Dec 21 19:08:10 2017 +0000
+++ b/tools/compat/compat_defs.h        Thu Dec 21 19:11:21 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.107 2017/01/07 21:29:30 christos Exp $       */
+/*     $NetBSD: compat_defs.h,v 1.107.6.1 2017/12/21 19:11:21 snj Exp $        */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -252,6 +252,10 @@
 char *dirname(char *);
 #endif
 
+#if !HAVE_DECL_FPURGE
+void fpurge(FILE *);
+#endif
+
 #if !HAVE_DIRFD
 #if HAVE_DIR_DD_FD
 #define dirfd(dirp) ((dirp)->dd_fd)
diff -r 5e722d6fe326 -r f948ac105211 tools/compat/configure
--- a/tools/compat/configure    Thu Dec 21 19:08:10 2017 +0000
+++ b/tools/compat/configure    Thu Dec 21 19:11:21 2017 +0000
@@ -4097,7 +4097,7 @@
 
 fi
 
-for ac_header in sys/mtio.h sys/sysmacros.h sys/syslimits.h \
+for ac_header in sys/mtio.h sys/sysmacros.h sys/syslimits.h stdio_ext.h \
        getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4520,6 +4520,19 @@
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_ASPRINTF $ac_have_decl
 _ACEOF
+ac_fn_c_check_decl "$LINENO" "asnprintf" "ac_cv_have_decl_asnprintf" "
+#include <stdio.h>
+
+"
+if test "x$ac_cv_have_decl_asnprintf" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASNPRINTF $ac_have_decl
+_ACEOF
 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "
 #include <stdio.h>
 
@@ -4572,19 +4585,44 @@
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_FGETLN $ac_have_decl
 _ACEOF
-ac_fn_c_check_decl "$LINENO" "fparseln
-       getdelim" "ac_cv_have_decl_fparseln__getdelim" "
+ac_fn_c_check_decl "$LINENO" "fparseln" "ac_cv_have_decl_fparseln" "
 #include <stdio.h>
 
 "
-if test "x$ac_cv_have_decl_fparseln__getdelim" = xyes; then :
+if test "x$ac_cv_have_decl_fparseln" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FPARSELN__GETDELIM $ac_have_decl
+#define HAVE_DECL_FPARSELN $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "
+#include <stdio.h>
+
+"
+if test "x$ac_cv_have_decl_fpurge" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPURGE $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "
+#include <stdio.h>
+
+"
+if test "x$ac_cv_have_decl_getdelim" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM $ac_have_decl
 _ACEOF
 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "
 #include <stdio.h>
diff -r 5e722d6fe326 -r f948ac105211 tools/compat/configure.ac
--- a/tools/compat/configure.ac Thu Dec 21 19:08:10 2017 +0000
+++ b/tools/compat/configure.ac Thu Dec 21 19:11:21 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: configure.ac,v 1.87 2017/01/07 21:30:42 christos Exp $
+#      $NetBSD: configure.ac,v 1.87.6.1 2017/12/21 19:11:21 snj Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -78,7 +78,7 @@
 
 # Find headers that may not be available.
 AC_HEADER_DIRENT
-AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h \
+AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h stdio_ext.h \
        getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h)
 AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
        sys/endian.h sys/featuretest.h err.h inttypes.h libgen.h paths.h \
@@ -140,8 +140,8 @@
 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
 
 # Global variable decls.
-AC_CHECK_DECLS([asprintf, vasprintf, vasnprintf, vsnprintf, fgetln, fparseln
-       getdelim, getline, snprintf],,, [
+AC_CHECK_DECLS([asprintf, asnprintf, vasprintf, vasnprintf, vsnprintf, fgetln, fparseln,
+       fpurge, getdelim, getline, snprintf],,, [
 #include <stdio.h>
 ])
 
diff -r 5e722d6fe326 -r f948ac105211 tools/compat/fpurge.c
--- a/tools/compat/fpurge.c     Thu Dec 21 19:08:10 2017 +0000
+++ b/tools/compat/fpurge.c     Thu Dec 21 19:11:21 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpurge.c,v 1.1 2009/06/16 22:35:34 christos Exp $      */
+/*     $NetBSD: fpurge.c,v 1.1.38.1 2017/12/21 19:11:21 snj Exp $      */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -36,6 +36,9 @@
 #include "nbtool_config.h"
 
 #if !HAVE_FPURGE
+#if HAVE_STDIO_EXT_H
+#include <stdio_ext.h>
+#endif
 #include <stdio.h>
 #include <fcntl.h>
 
diff -r 5e722d6fe326 -r f948ac105211 tools/compat/nbtool_config.h.in
--- a/tools/compat/nbtool_config.h.in   Thu Dec 21 19:08:10 2017 +0000
+++ b/tools/compat/nbtool_config.h.in   Thu Dec 21 19:11:21 2017 +0000
@@ -1,6 +1,6 @@
 /* nbtool_config.h.in.  Generated from configure.ac by autoheader.  */
 
-/*      $NetBSD: nbtool_config.h.in,v 1.40 2017/01/07 21:31:07 christos Exp $    */
+/*      $NetBSD: nbtool_config.h.in,v 1.40.6.1 2017/12/21 19:11:21 snj Exp $    */
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__
@@ -47,6 +47,10 @@
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
 
+/* Define to 1 if you have the declaration of `asnprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_ASNPRINTF
+
 /* Define to 1 if you have the declaration of `asprintf', and to 0 if you
    don't. */
 #undef HAVE_DECL_ASPRINTF
@@ -126,14 +130,22 @@
    */
 #undef HAVE_DECL_FGETLN
 
-/* Define to 1 if you have the declaration of `fparseln getdelim', and to 0 if
-   you don't. */
-#undef HAVE_DECL_FPARSELN__GETDELIM
+/* Define to 1 if you have the declaration of `fparseln', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FPARSELN
+
+/* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FPURGE
 
 /* Define to 1 if you have the declaration of `fstatvfs', and to 0 if you
    don't. */
 #undef HAVE_DECL_FSTATVFS
 
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDELIM
+
 /* Define to 1 if you have the declaration of `getline', and to 0 if you
    don't. */
 #undef HAVE_DECL_GETLINE
@@ -613,6 +625,9 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
 /* Define to 1 if you have the <stdio.h> header file. */
 #undef HAVE_STDIO_H
 



Home | Main Index | Thread Index | Old Index