[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo ChangeLog gnulib/lib/Makefile.am gnulib...
From: |
Karl Berry |
Subject: |
texinfo ChangeLog gnulib/lib/Makefile.am gnulib... |
Date: |
Sat, 15 Oct 2011 15:05:22 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Karl Berry <karl> 11/10/15 15:05:22
Modified files:
. : ChangeLog
gnulib/lib : Makefile.am malloc.c
gnulib/m4 : gnulib-cache.m4 gnulib-comp.m4 malloc.m4
Log message:
switch from deprecated getopt and strdup to getopt-gnu and strdup-posix
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1264&r2=1.1265
http://cvs.savannah.gnu.org/viewcvs/texinfo/gnulib/lib/Makefile.am?cvsroot=texinfo&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/texinfo/gnulib/lib/malloc.c?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/gnulib/m4/gnulib-cache.m4?cvsroot=texinfo&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/texinfo/gnulib/m4/gnulib-comp.m4?cvsroot=texinfo&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/texinfo/gnulib/m4/malloc.m4?cvsroot=texinfo&r1=1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1264
retrieving revision 1.1265
diff -u -b -r1.1264 -r1.1265
--- ChangeLog 15 Oct 2011 12:09:03 -0000 1.1264
+++ ChangeLog 15 Oct 2011 15:05:21 -0000 1.1265
@@ -1,7 +1,13 @@
+2011-10-15 Karl Berry <address@hidden>
+
+ * gnulib: switch from now-deprecated getopt to getopt-gnu,
+ likewise strdup to strdup-posix.
+
2011-10-15 Patrice Dumas <address@hidden>
- * doc/texinfo.txi (Other Configuration Variables): USE_SECTIONS is not
- used anymore, the same effect is obtained by setting USE_NODES to false.
+ * doc/texinfo.txi (Other Configuration Variables): USE_SECTIONS is
+ not used anymore, the same effect is obtained by setting USE_NODES
+ to false.
2011-10-14 Karl Berry <address@hidden>
Index: gnulib/lib/Makefile.am
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- gnulib/lib/Makefile.am 14 Oct 2011 16:09:03 -0000 1.46
+++ gnulib/lib/Makefile.am 15 Oct 2011 15:05:22 -0000 1.47
@@ -21,7 +21,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu
--source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests
--aux-dir=build-aux --no-conditional-dependencies --no-libtool
--macro-prefix=gl --no-vc-files argz getopt gettext mbchar mbiter mbscasecmp
mbschr mbslen mbsncasecmp mbsstr mbswidth memmem mkstemp strdup strerror xalloc
xsetenv
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu
--source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests
--aux-dir=build-aux --no-conditional-dependencies --no-libtool
--macro-prefix=gl --no-vc-files argz getopt-gnu gettext mbchar mbiter
mbscasecmp mbschr mbslen mbsncasecmp mbsstr mbswidth memmem mkstemp
strdup-posix strerror xalloc xsetenv
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
@@ -397,6 +397,15 @@
## end gnulib module lstat
+## begin gnulib module malloc-posix
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_a_SOURCES += malloc.c
+
+## end gnulib module malloc-posix
+
## begin gnulib module malloca
libgnu_a_SOURCES += malloca.c
@@ -845,14 +854,14 @@
## end gnulib module stpcpy
-## begin gnulib module strdup
+## begin gnulib module strdup-posix
EXTRA_DIST += strdup.c
EXTRA_libgnu_a_SOURCES += strdup.c
-## end gnulib module strdup
+## end gnulib module strdup-posix
## begin gnulib module streq
Index: gnulib/lib/malloc.c
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/lib/malloc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnulib/lib/malloc.c 26 Dec 2007 00:53:46 -0000 1.1
+++ gnulib/lib/malloc.c 15 Oct 2011 15:05:22 -0000 1.2
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997, 1998, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc.
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
@@ -18,21 +18,21 @@
/* written by Jim Meyering and Bruno Haible */
+#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
#ifdef malloc
-# define NEED_MALLOC_GNU
+# define NEED_MALLOC_GNU 1
# undef malloc
+/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
+#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
+# define NEED_MALLOC_GNU 1
#endif
-/* Specification. */
#include <stdlib.h>
#include <errno.h>
-/* Call the system's malloc below. */
-#undef malloc
-
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
@@ -41,7 +41,7 @@
{
void *result;
-#ifdef NEED_MALLOC_GNU
+#if NEED_MALLOC_GNU
if (n == 0)
n = 1;
#endif
Index: gnulib/m4/gnulib-cache.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/gnulib-cache.m4,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- gnulib/m4/gnulib-cache.m4 14 Oct 2011 16:09:04 -0000 1.19
+++ gnulib/m4/gnulib-cache.m4 15 Oct 2011 15:05:22 -0000 1.20
@@ -27,13 +27,13 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib
--m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux
--no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files argz
getopt gettext mbchar mbiter mbscasecmp mbschr mbslen mbsncasecmp mbsstr
mbswidth memmem mkstemp strdup strerror xalloc xsetenv
+# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib
--m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux
--no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files argz
getopt-gnu gettext mbchar mbiter mbscasecmp mbschr mbslen mbsncasecmp mbsstr
mbswidth memmem mkstemp strdup-posix strerror xalloc xsetenv
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
gl_MODULES([
argz
- getopt
+ getopt-gnu
gettext
mbchar
mbiter
@@ -45,7 +45,7 @@
mbswidth
memmem
mkstemp
- strdup
+ strdup-posix
strerror
xalloc
xsetenv
Index: gnulib/m4/gnulib-comp.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/gnulib-comp.m4,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- gnulib/m4/gnulib-comp.m4 14 Oct 2011 16:09:04 -0000 1.42
+++ gnulib/m4/gnulib-comp.m4 15 Oct 2011 15:05:22 -0000 1.43
@@ -50,7 +50,6 @@
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module fcntl-h:
- # Code from module getopt:
# Code from module getopt-gnu:
# Code from module getopt-posix:
# Code from module gettext:
@@ -65,6 +64,7 @@
AC_REQUIRE([AC_SYS_LARGEFILE])
# Code from module localcharset:
# Code from module lstat:
+ # Code from module malloc-posix:
# Code from module malloca:
# Code from module mbchar:
# Code from module mbiter:
@@ -99,7 +99,7 @@
# Code from module stdint:
# Code from module stdlib:
# Code from module stpcpy:
- # Code from module strdup:
+ # Code from module strdup-posix:
# Code from module streq:
# Code from module strerror:
# Code from module strerror-override:
@@ -204,6 +204,11 @@
gl_PREREQ_LSTAT
fi
gl_SYS_STAT_MODULE_INDICATOR([lstat])
+gl_FUNC_MALLOC_POSIX
+if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+fi
+gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_MALLOCA
gl_MBCHAR
gl_MBITER
@@ -286,8 +291,8 @@
gl_PREREQ_STPCPY
fi
gl_STRING_MODULE_INDICATOR([stpcpy])
-gl_FUNC_STRDUP
-if test $ac_cv_func_strdup = no; then
+gl_FUNC_STRDUP_POSIX
+if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
AC_LIBOBJ([strdup])
gl_PREREQ_STRDUP
fi
@@ -516,6 +521,7 @@
lib/localcharset.c
lib/localcharset.h
lib/lstat.c
+ lib/malloc.c
lib/malloca.c
lib/malloca.h
lib/malloca.valgrind
@@ -627,6 +633,7 @@
m4/lock.m4
m4/longlong.m4
m4/lstat.m4
+ m4/malloc.m4
m4/malloca.m4
m4/mbchar.m4
m4/mbiter.m4
Index: gnulib/m4/malloc.m4
===================================================================
RCS file: /sources/texinfo/texinfo/gnulib/m4/malloc.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnulib/m4/malloc.m4 26 Dec 2007 00:51:11 -0000 1.1
+++ gnulib/m4/malloc.m4 15 Oct 2011 15:05:22 -0000 1.2
@@ -1,25 +1,40 @@
-# malloc.m4 serial 8
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# malloc.m4 serial 13
+dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+# gl_FUNC_MALLOC_GNU
+# ------------------
+# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
+# it is not.
+AC_DEFUN([gl_FUNC_MALLOC_GNU],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
+ _AC_FUNC_MALLOC_IF(
+ [AC_DEFINE([HAVE_MALLOC_GNU], [1],
+ [Define to 1 if your system has a GNU libc compatible 'malloc'
+ function, and to 0 otherwise.])],
+ [AC_DEFINE([HAVE_MALLOC_GNU], [0])
+ REPLACE_MALLOC=1
+ ])
+])
+
# gl_FUNC_MALLOC_POSIX
# --------------------
# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
# fails), and replace malloc if it is not.
AC_DEFUN([gl_FUNC_MALLOC_POSIX],
[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
if test $gl_cv_func_malloc_posix = yes; then
- HAVE_MALLOC_POSIX=1
- AC_DEFINE([HAVE_MALLOC_POSIX], 1,
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
[Define if the 'malloc' function is POSIX compliant.])
else
- AC_LIBOBJ([malloc])
- HAVE_MALLOC_POSIX=0
+ REPLACE_MALLOC=1
fi
- AC_SUBST([HAVE_MALLOC_POSIX])
])
# Test whether malloc, realloc, calloc are POSIX compliant,
@@ -32,10 +47,14 @@
dnl It is too dangerous to try to allocate a large amount of memory:
dnl some systems go to their knees when you do that. So assume that
dnl all Unix implementations of the function are POSIX compliant.
- AC_TRY_COMPILE([],
- [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[]],
+ [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
choke me
#endif
- ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
+ ]])],
+ [gl_cv_func_malloc_posix=yes],
+ [gl_cv_func_malloc_posix=no])
])
])
- texinfo ChangeLog gnulib/lib/Makefile.am gnulib...,
Karl Berry <=