pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat As the seemingly untested -Werror...
details: https://anonhg.NetBSD.org/pkgsrc/rev/54b2c45f3366
branches: trunk
changeset: 652791:54b2c45f3366
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Jun 08 00:44:46 2015 +0000
description:
As the seemingly untested -Werror changes break the bootstrap at least
on Linux, update libnbcompat to 20150615:
- Assume a C89 environment and malloc, vprintf, memcpy, memset, memmove
to be present and working.
- Use full prototypes for isblank, snprintf, asprintf and strdup.
This avoids GCC failing to do conflicts with the builtins.
diffstat:
pkgtools/libnbcompat/Makefile | 4 +-
pkgtools/libnbcompat/files/configure | 218 ++++++++---------------
pkgtools/libnbcompat/files/configure.ac | 25 +-
pkgtools/libnbcompat/files/malloc.c | 15 -
pkgtools/libnbcompat/files/md5c.c | 10 +-
pkgtools/libnbcompat/files/nbcompat/config.h.in | 60 +-----
pkgtools/libnbcompat/files/nbcompat/ctype.h | 4 +-
pkgtools/libnbcompat/files/nbcompat/stdio.h | 4 +-
pkgtools/libnbcompat/files/nbcompat/string.h | 8 +-
pkgtools/libnbcompat/files/rmd160.c | 12 +-
10 files changed, 116 insertions(+), 244 deletions(-)
diffs (truncated from 672 to 300 lines):
diff -r 4cee23dfa373 -r 54b2c45f3366 pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile Sun Jun 07 23:25:27 2015 +0000
+++ b/pkgtools/libnbcompat/Makefile Mon Jun 08 00:44:46 2015 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.83 2015/04/19 12:24:21 tnn Exp $
+# $NetBSD: Makefile,v 1.84 2015/06/08 00:44:46 joerg Exp $
#
# NOTE: If you update this package, it is *mandatory* that you update
# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
# list of tested and supported platforms.
#
-PKGNAME= libnbcompat-20150419
+PKGNAME= libnbcompat-20150615
CATEGORIES= pkgtools devel
MAINTAINER= joerg%NetBSD.org@localhost
diff -r 4cee23dfa373 -r 54b2c45f3366 pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure Sun Jun 07 23:25:27 2015 +0000
+++ b/pkgtools/libnbcompat/files/configure Mon Jun 08 00:44:46 2015 +0000
@@ -5533,73 +5533,6 @@
# Checks for library functions.
-for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_malloc_0_nonnull=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
-
-int
-main ()
-{
-return ! malloc (0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_malloc_0_nonnull=yes
-else
- ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
-
-else
- $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
-
- case " $LIBOBJS " in
- *" malloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define malloc rpl_malloc" >>confdefs.h
-
-fi
-
-
ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
ac_have_decl=1
@@ -5916,29 +5849,11 @@
fi
-for ac_func in vprintf
-do :
- ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
-_ACEOF
-
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = xyes; then :
-
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
-
-fi
-
-fi
-done
-
-
-
-ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "#include <stdio.h>
+
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_snprintf(char *, size_t, const char *, ...)" | $as_tr_sh`
+ac_fn_c_check_decl "$LINENO" "snprintf(char *, size_t, const char *, ...)" "$as_ac_Symbol" "#include <stdio.h>
"
-if test "x$ac_cv_have_decl_snprintf" = xyes; then :
+if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -5947,17 +5862,63 @@
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SNPRINTF $ac_have_decl
_ACEOF
-ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "#include <stdio.h>
+if test $ac_have_decl = 1; then :
+
+else
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+fi
+
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_asprintf(char **, const char *, ...)" | $as_tr_sh`
+ac_fn_c_check_decl "$LINENO" "asprintf(char **, const char *, ...)" "$as_ac_Symbol" "#define _GNU_SOURCE
+ #include <stdio.h>
"
-if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
+if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VASPRINTF $ac_have_decl
-_ACEOF
+#define HAVE_DECL_ASPRINTF $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+
+else
+ case " $LIBOBJS " in
+ *" asprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
+ ;;
+esac
+
+fi
+
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_strdup(const char *)" | $as_tr_sh`
+ac_fn_c_check_decl "$LINENO" "strdup(const char *)" "$as_ac_Symbol" "#include <string.h>
+"
+if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+
+else
+ case " $LIBOBJS " in
+ *" strdup.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
+ ;;
+esac
+
+fi
case $host_os in
@@ -5967,19 +5928,30 @@
;;
esac
-ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
-if test "x$ac_cv_func_asprintf" = xyes; then :
- $as_echo "#define HAVE_ASPRINTF 1" >>confdefs.h
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_isblank(int)" | $as_tr_sh`
+ac_fn_c_check_decl "$LINENO" "isblank(int)" "$as_ac_Symbol" "#include <ctype.h>
+"
+if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
else
case " $LIBOBJS " in
- *" asprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
+ *" isblank.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
;;
esac
fi
+
ac_fn_c_check_func "$LINENO" "err" "ac_cv_func_err"
if test "x$ac_cv_func_err" = xyes; then :
$as_echo "#define HAVE_ERR 1" >>confdefs.h
@@ -6071,19 +6043,6 @@
fi
-ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
-if test "x$ac_cv_func_isblank" = xyes; then :
- $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
-
-else
- case " $LIBOBJS " in
- *" isblank.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
- ;;
-esac
-
-fi
-
ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
if test "x$ac_cv_func_lchflags" = xyes; then :
$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
@@ -6227,19 +6186,6 @@
fi
-ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
-if test "x$ac_cv_func_snprintf" = xyes; then :
- $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
-
-else
- case " $LIBOBJS " in
- *" snprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
- ;;
-esac
-
-fi
-
ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
if test "x$ac_cv_func_statvfs" = xyes; then :
$as_echo "#define HAVE_STATVFS 1" >>confdefs.h
@@ -6253,19 +6199,6 @@
fi
-ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
-if test "x$ac_cv_func_strdup" = xyes; then :
- $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
-
-else
- case " $LIBOBJS " in
- *" strdup.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
- ;;
-esac
-
-fi
-
ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
if test "x$ac_cv_func_strerror" = xyes; then :
$as_echo "#define HAVE_STRERROR 1" >>confdefs.h
@@ -6644,13 +6577,12 @@
fi
-for ac_func in bcopy bzero memset memcpy setlocale
+for ac_func in setlocale
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
Home |
Main Index |
Thread Index |
Old Index