diff options
Diffstat (limited to 'gl')
-rw-r--r-- | gl/Makefile.am | 45 | ||||
-rw-r--r-- | gl/getopt.c | 6 | ||||
-rw-r--r-- | gl/m4/absolute-header.m4 | 49 | ||||
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 5 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 18 | ||||
-rw-r--r-- | gl/m4/include_next.m4 | 7 | ||||
-rw-r--r-- | gl/m4/stdarg.m4 | 53 |
7 files changed, 96 insertions, 87 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index e6dc5f8..0023783 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2004-2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2008 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --libtool --macro-prefix=gl fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf AUTOMAKE_OPTIONS = 1.5 gnits @@ -35,15 +35,6 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgnu_la_SOURCES = libgnu_la_LDFLAGS = $(AM_LDFLAGS) -## begin gnulib module absolute-header - -# Use this preprocessor expression to decide whether #include_next works. -# Do not rely on a 'configure'-time test for this, since the expression -# might appear in an installed header, which is used by some other compiler. -HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) - -## end gnulib module absolute-header - ## begin gnulib module gendocs @@ -76,6 +67,16 @@ libgnu_la_SOURCES += gettext.h ## end gnulib module gettext-h +## begin gnulib module gnumakefile + +distclean-local: clean-GNUmakefile +clean-GNUmakefile: + if test x"$(VPATH)" != x ; then rm -f $(top_srcdir)/GNUmakefile ; fi + +EXTRA_DIST += $(top_srcdir)/GNUmakefile + +## end gnulib module gnumakefile + ## begin gnulib module link-warning LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h @@ -86,7 +87,7 @@ EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h ## begin gnulib module maintainer-makefile -EXTRA_DIST += $(top_srcdir)/build-aux/GNUmakefile $(top_srcdir)/build-aux/maint.mk +EXTRA_DIST += $(top_srcdir)/maint.mk ## end gnulib module maintainer-makefile @@ -123,6 +124,26 @@ EXTRA_libgnu_la_SOURCES += realloc.c ## end gnulib module realloc-posix +## begin gnulib module stdarg + +BUILT_SOURCES += $(STDARG_H) + +# We need the following in order to create <stdarg.h> when the system +# doesn't have one that works with the given compiler. +stdarg.h: stdarg.in.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \ + -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ + < $(srcdir)/stdarg.in.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdarg.h stdarg.h-t + +EXTRA_DIST += stdarg.in.h + +## end gnulib module stdarg + ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) diff --git a/gl/getopt.c b/gl/getopt.c index 3c23601..f1e6d1f 100644 --- a/gl/getopt.c +++ b/gl/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006 + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -30,10 +30,6 @@ #include <string.h> #include <unistd.h> -#ifdef __VMS -# include <unixlib.h> -#endif - #ifdef _LIBC # include <libintl.h> #else diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4 deleted file mode 100644 index 5b7a2fc..0000000 --- a/gl/m4/absolute-header.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# absolute-header.m4 serial 7 -dnl Copyright (C) 2006, 2007 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. - -dnl From Derek Price. - -# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) -# --------------------------------------- -# Find the absolute name of a header file, assuming the header exists. -# If the header were sys/inttypes.h, this macro would define -# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h -# in config.h -# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. -AC_DEFUN([gl_ABSOLUTE_HEADER], -[AC_LANG_PREPROC_REQUIRE()dnl -AC_FOREACH([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_absolute_header], - [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl - AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>], - m4_quote(m4_defn([gl_absolute_header])), - [AS_VAR_PUSHDEF([ac_header_exists], - [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl - AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl - if test AS_VAR_GET(ac_header_exists) = yes; then - AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])]) -dnl eval is necessary to expand ac_cpp. -dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. - AS_VAR_SET(gl_absolute_header, -[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | -sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{ - s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1# - s#^/[^/]#//&# - p - q -}'`]) - fi - AS_VAR_POPDEF([ac_header_exists])dnl - ])dnl - AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))), - ["AS_VAR_GET(gl_absolute_header)"], - [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.]) - AS_VAR_POPDEF([gl_absolute_header])dnl -])dnl -])# gl_ABSOLUTE_HEADER diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 2cc08ba..60b49e7 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2008 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --libtool --macro-prefix=gl fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf +# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) @@ -31,3 +31,4 @@ gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) +gl_VC_FILES([false]) diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 22ac1bc..b0122b3 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2004-2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2008 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -47,6 +47,16 @@ AC_DEFUN([gl_INIT], gl_GETOPT AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) + # Autoconf 2.61a.99 and earlier don't support linking a file only + # in VPATH builds. But since GNUmakefile is for maintainer use + # only, it does not matter if we skip the link with older autoconf. + # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH + # builds, so use a shell variable to bypass this. + GNUmakefile=GNUmakefile + m4_if(m4_version_compare([2.61a.100], + m4_defn([m4_PACKAGE_VERSION])), [1], [], + [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], + [GNUmakefile=$GNUmakefile])]) gl_FUNC_MALLOC_POSIX gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_FUNC_READ_FILE @@ -175,10 +185,8 @@ AC_DEFUN([gltests_LIBSOURCES], [ # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ - build-aux/GNUmakefile build-aux/gendocs.sh build-aux/link-warning.h - build-aux/maint.mk doc/fdl.texi doc/gendocs_template doc/gpl-3.0.texi @@ -194,6 +202,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/read-file.c lib/read-file.h lib/realloc.c + lib/stdarg.in.h lib/stdint.in.h lib/stdlib.in.h lib/strdup.c @@ -203,7 +212,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/version-etc.c lib/version-etc.h lib/wchar.in.h - m4/absolute-header.m4 m4/extensions.m4 m4/getopt.m4 m4/gnulib-common.m4 @@ -219,4 +227,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/string_h.m4 m4/unistd_h.m4 m4/wchar.m4 + top/GNUmakefile + top/maint.mk ]) diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index 7ce472b..7c08e93 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 @@ -1,5 +1,5 @@ -# include_next.m4 serial 4 -dnl Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# include_next.m4 serial 5 +dnl Copyright (C) 2006-2008 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. @@ -63,6 +63,9 @@ EOF # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use `""', not `<>', so that the /// cannot be confused with a C99 comment. +# Note: This macro assumes that the header file is not empty after +# preprocessing, i.e. it does not only define preprocessor macros but also +# provides some type/enum definitions or function/variable declarations. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ AC_REQUIRE([gl_INCLUDE_NEXT]) diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4 index e8e680a..21910e4 100644 --- a/gl/m4/stdarg.m4 +++ b/gl/m4/stdarg.m4 @@ -1,5 +1,5 @@ -# stdarg.m4 serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. +# stdarg.m4 serial 2 +dnl Copyright (C) 2006, 2008 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. @@ -9,6 +9,8 @@ dnl Provide a working va_copy in combination with <stdarg.h>. AC_DEFUN([gl_STDARG_H], [ + STDARG_H=''; AC_SUBST([STDARG_H]) + NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H]) AC_MSG_CHECKING([for va_copy]) AC_CACHE_VAL([gl_cv_func_va_copy], [ AC_TRY_COMPILE([#include <stdarg.h>], [ @@ -19,22 +21,47 @@ void (*func) (va_list, va_list) = va_copy; [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])]) AC_MSG_RESULT([$gl_cv_func_va_copy]) if test $gl_cv_func_va_copy = no; then - # Provide a substitute, either __va_copy or as a simple assignment. - AC_CACHE_VAL([gl_cv_func___va_copy], [ - AC_TRY_COMPILE([#include <stdarg.h>], [ + dnl Provide a substitute. + dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5 + dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h> + dnl which does '#undef va_copy', leading to a missing va_copy symbol. For + dnl this platform, we use an <stdarg.h> substitute. But we cannot use this + dnl approach on other platforms, because <stdarg.h> often defines only + dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do + dnl not work in this situation. + AC_EGREP_CPP([vaccine], + [#if defined _AIX && !defined __GNUC__ + AIX vaccine + #endif + ], [gl_aixcc=yes], [gl_aixcc=no]) + if test $gl_aixcc = yes; then + dnl Provide a substitute <stdarg.h> file. + STDARG_H=stdarg.h + gl_CHECK_NEXT_HEADERS([stdarg.h]) + dnl Fallback for the case when <stdarg.h> contains only macro definitions. + if test "$gl_cv_next_stdarg_h" = '""'; then + gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' + NEXT_STDARG_H="$gl_cv_next_stdarg_h" + fi + else + dnl Provide a substitute in <config.h>, either __va_copy or as a simple + dnl assignment. + AC_CACHE_VAL([gl_cv_func___va_copy], [ + AC_TRY_COMPILE([#include <stdarg.h>], [ #ifndef __va_copy error, bail out #endif ], - [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])]) - if test $gl_cv_func___va_copy = yes; then - AC_DEFINE([va_copy], [__va_copy], - [Define as a macro for copying va_list variables.]) - else - AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ + [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])]) + if test $gl_cv_func___va_copy = yes; then + AC_DEFINE([va_copy], [__va_copy], + [Define as a macro for copying va_list variables.]) + else + AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ #define gl_va_copy(a,b) ((a) = (b))]) - AC_DEFINE([va_copy], [gl_va_copy], - [Define as a macro for copying va_list variables.]) + AC_DEFINE([va_copy], [gl_va_copy], + [Define as a macro for copying va_list variables.]) + fi fi fi ]) |