diff options
-rw-r--r-- | GNUmakefile | 10 | ||||
-rw-r--r-- | gl/Makefile.am | 5 | ||||
-rw-r--r-- | gl/m4/gnulib-common.m4 | 23 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 2 | ||||
-rw-r--r-- | gl/m4/include_next.m4 | 4 | ||||
-rw-r--r-- | gl/m4/stdint.m4 | 16 | ||||
-rw-r--r-- | gl/m4/stdlib_h.m4 | 7 | ||||
-rw-r--r-- | gl/stdarg.in.h | 31 | ||||
-rw-r--r-- | gl/stdlib.in.h | 19 | ||||
-rw-r--r-- | gl/wchar.in.h | 11 |
10 files changed, 109 insertions, 19 deletions
diff --git a/GNUmakefile b/GNUmakefile index 38dd126..0c1bc38 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -54,13 +54,14 @@ _have-git-version-gen := \ $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes) ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) _is-dist-target = $(filter-out %clean, \ - $(filter dist% alpha beta major,$(MAKECMDGOALS))) + $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS))) ifneq (,$(_is-dist-target)) _curr-ver := $(shell cd $(srcdir) && ./$(_build-aux)/git-version-gen \ $(srcdir)/.tarball-version) ifneq ($(_curr-ver),$(VERSION)) $(info INFO: running autoreconf for new version string: $(_curr-ver)) - _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache && $(_autoreconf))) + _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \ + && $(_autoreconf)) endif endif endif @@ -68,11 +69,16 @@ endif else .DEFAULT_GOAL := abort-due-to-no-makefile +srcdir = . # The package can override .DEFAULT_GOAL to run actions like autoreconf. -include ./cfg.mk include ./maint.mk +ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) +$(MAKECMDGOALS): abort-due-to-no-makefile +endif + abort-due-to-no-makefile: @echo There seems to be no Makefile in this directory. 1>&2 @echo "You must run ./configure before running \`make'." 1>&2 diff --git a/gl/Makefile.am b/gl/Makefile.am index 0023783..729cf7d 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -71,7 +71,7 @@ libgnu_la_SOURCES += gettext.h distclean-local: clean-GNUmakefile clean-GNUmakefile: - if test x"$(VPATH)" != x ; then rm -f $(top_srcdir)/GNUmakefile ; fi + test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || : EXTRA_DIST += $(top_srcdir)/GNUmakefile @@ -203,6 +203,7 @@ stdlib.h: stdlib.in.h -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ + -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ @@ -210,9 +211,11 @@ stdlib.h: stdlib.in.h -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \ + -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ + -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/stdlib.in.h; \ diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 9336d72..3edfc12 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,9 +1,28 @@ -# gnulib-common.m4 serial 3 -dnl Copyright (C) 2007 Free Software Foundation, Inc. +# gnulib-common.m4 serial 4 +dnl Copyright (C) 2007-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. +# gl_COMMON +# is expanded unconditionally through gnulib-tool magic. +AC_DEFUN([gl_COMMON], [ + dnl Use AC_REQUIRE here, so that the code is expanded once only. + AC_REQUIRE([gl_COMMON_BODY]) +]) +AC_DEFUN([gl_COMMON_BODY], [ + AH_VERBATIM([isoc99_inline], +[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for MacOS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif]) +]) + # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module. AC_DEFUN([gl_MODULE_INDICATOR], diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index b0122b3..d446f50 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -43,6 +43,7 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + gl_COMMON gl_source_base='gl' gl_GETOPT AC_SUBST([LIBINTL]) @@ -92,6 +93,7 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + gl_COMMON gl_source_base='tests' m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index 7c08e93..a842e2a 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 @@ -1,4 +1,4 @@ -# include_next.m4 serial 5 +# include_next.m4 serial 6 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, @@ -71,7 +71,7 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS], AC_REQUIRE([gl_INCLUDE_NEXT]) AC_CHECK_HEADERS_ONCE([$1]) - AC_FOREACH([gl_HEADER_NAME], [$1], + m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME]))) if test $gl_cv_have_include_next = yes; then diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 index bb6c34f..9b5001a 100644 --- a/gl/m4/stdint.m4 +++ b/gl/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 29 -dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. +# stdint.m4 serial 30 +dnl Copyright (C) 2001-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. @@ -240,7 +240,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF], dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. - AC_FOREACH([gltype], [$1], + m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do @@ -265,7 +265,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF], AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done - AC_FOREACH([gltype], [$1], + m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) @@ -278,7 +278,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED], dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. - AC_FOREACH([gltype], [$1], + m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do @@ -298,7 +298,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED], eval HAVE_SIGNED_${GLTYPE}=0 fi done - AC_FOREACH([gltype], [$1], + m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) @@ -311,7 +311,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. - AC_FOREACH([gltype], [$1], + m4_foreach_w([gltype], [$1], [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) @@ -350,7 +350,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result) done - AC_FOREACH([gltype], [$1], + m4_foreach_w([gltype], [$1], [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index fe4ce12..d9240b4 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 5 -dnl Copyright (C) 2007 Free Software Foundation, Inc. +# stdlib_h.m4 serial 6 +dnl Copyright (C) 2007, 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. @@ -27,6 +27,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) + GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) @@ -35,8 +36,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) + HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) + REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV]) ]) diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h new file mode 100644 index 0000000..6a054dd --- /dev/null +++ b/gl/stdarg.in.h @@ -0,0 +1,31 @@ +/* Substitute for and wrapper around <stdarg.h>. + Copyright (C) 2008 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 + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _GL_STDARG_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STDARG_H@ + +#ifndef _GL_STDARG_H +#define _GL_STDARG_H + +#ifndef va_copy +# define va_copy(a,b) ((a) = (b)) +#endif + +#endif /* _GL_STDARG_H */ +#endif /* _GL_STDARG_H */ diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index 100ff52..0181dd2 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like <stdlib.h>. - Copyright (C) 1995, 2001-2004, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2008 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 @@ -199,6 +199,23 @@ extern int unsetenv (const char *name); #endif +#if @GNULIB_STRTOD@ +# if @REPLACE_STRTOD@ +# define strtod rpl_strtod +# endif +# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@ + /* Parse a double from STRING, updating ENDP if appropriate. */ +extern double strtod (const char *str, char **endp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtod +# define strtod(s, e) \ + (GL_LINK_WARNING ("strtod is unportable - " \ + "use gnulib module strtod for portability"), \ + strtod (s, e)) +#endif + + #ifdef __cplusplus } #endif diff --git a/gl/wchar.in.h b/gl/wchar.in.h index b721572..f796167 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 <wchar.h>, for platforms that have issues. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 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 @@ -26,6 +26,14 @@ * the declaration of wcwidth(). */ +#ifdef __need_mbstate_t +/* Special invocation convention inside uClibc header files. */ + +#@INCLUDE_NEXT@ @NEXT_WCHAR_H@ + +#else +/* Normal invocation convention. */ + #ifndef _GL_WCHAR_H /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before @@ -80,3 +88,4 @@ extern int wcwidth (int /* actually wchar_t */); #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ +#endif |