# HG changeset patch # User Eric Blake # Date 1261664363 25200 # Node ID 8db404cb2e519112405e1837c02d4638d39c6e54 # Parent 803f92dd00a19832fd0a877a1cd38aab38de5ed8 link-warning: make usage consistent Ensure GL_LINK_WARNING is defined before use. * modules/ctype (Depends-on): Add link-warning. (Makefile.am): Update rules accordingly. * modules/langinfo (Depends-on, Makefile.am): Likewise. * modules/locale (Depends-on, Makefile.am): Likewise. * modules/sys_file (Makefile.am): Likewise. * modules/getopt-posix (Makefile.am): Delete unused link warning efforts. * lib/ctype.in.h (GL_LINK_WARNING): Ensure definition before use. * lib/langinfo.in.h (GL_LINK_WARNING): Likewise. * lib/locale.in.h (GL_LINK_WARNING): Likewise. * lib/sys_file.in.h (GL_LINK_WARNING): Likewise. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2009-12-29 Eric Blake + link-warning: make usage consistent + * modules/ctype (Depends-on): Add link-warning. + (Makefile.am): Update rules accordingly. + * modules/langinfo (Depends-on, Makefile.am): Likewise. + * modules/locale (Depends-on, Makefile.am): Likewise. + * modules/sys_file (Makefile.am): Likewise. + * modules/getopt-posix (Makefile.am): Delete unused link warning + efforts. + * lib/ctype.in.h (GL_LINK_WARNING): Ensure definition before use. + * lib/langinfo.in.h (GL_LINK_WARNING): Likewise. + * lib/locale.in.h (GL_LINK_WARNING): Likewise. + * lib/sys_file.in.h (GL_LINK_WARNING): Likewise. + stdio: remove unused variables * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Remove unused variables. * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise. diff --git a/lib/ctype.in.h b/lib/ctype.in.h --- a/lib/ctype.in.h +++ b/lib/ctype.in.h @@ -36,6 +36,8 @@ #ifndef _GL_CTYPE_H #define _GL_CTYPE_H +/* The definition of GL_LINK_WARNING is copied here. */ + /* Return non-zero if c is a blank, i.e. a space or tab character. */ #if @GNULIB_ISBLANK@ # if !@HAVE_ISBLANK@ diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h --- a/lib/langinfo.in.h +++ b/lib/langinfo.in.h @@ -123,6 +123,7 @@ #endif +/* The definition of GL_LINK_WARNING is copied here. */ /* Declare overridden functions. */ diff --git a/lib/locale.in.h b/lib/locale.in.h --- a/lib/locale.in.h +++ b/lib/locale.in.h @@ -34,6 +34,8 @@ # include #endif +/* The definition of GL_LINK_WARNING is copied here. */ + /* The definition of _GL_ARG_NONNULL is copied here. */ /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. diff --git a/lib/sys_file.in.h b/lib/sys_file.in.h --- a/lib/sys_file.in.h +++ b/lib/sys_file.in.h @@ -41,6 +41,8 @@ # define LOCK_NB 4 /* Don't block when locking. */ #endif +/* The definition of GL_LINK_WARNING is copied here. */ + #if @GNULIB_FLOCK@ /* Apply or remove advisory locks on an open file. Return 0 if successful, otherwise -1 and errno set. */ diff --git a/modules/ctype b/modules/ctype --- a/modules/ctype +++ b/modules/ctype @@ -7,6 +7,7 @@ Depends-on: include_next +link-warning configure.ac: gl_CTYPE_H @@ -16,7 +17,7 @@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. -ctype.h: ctype.in.h +ctype.h: ctype.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @@ -24,6 +25,7 @@ -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/ctype.in.h; \ } > $@-t && \ mv $@-t $@ diff --git a/modules/getopt-posix b/modules/getopt-posix --- a/modules/getopt-posix +++ b/modules/getopt-posix @@ -23,14 +23,13 @@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) +getopt.h: getopt.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ diff --git a/modules/langinfo b/modules/langinfo --- a/modules/langinfo +++ b/modules/langinfo @@ -6,8 +6,9 @@ m4/langinfo_h.m4 Depends-on: +extensions include_next -extensions +link-warning configure.ac: gl_LANGINFO_H @@ -17,7 +18,7 @@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. -langinfo.h: langinfo.in.h +langinfo.h: langinfo.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ @@ -29,6 +30,7 @@ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ diff --git a/modules/locale b/modules/locale --- a/modules/locale +++ b/modules/locale @@ -9,6 +9,7 @@ include_next arg-nonnull extensions +link-warning stddef configure.ac: @@ -19,7 +20,7 @@ # We need the following in order to create when the system # doesn't have one that provides all definitions. -locale.h: locale.in.h $(ARG_NONNULL_H) +locale.h: locale.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @@ -28,6 +29,7 @@ -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/locale.in.h; \ } > $@-t && \ diff --git a/modules/sys_file b/modules/sys_file --- a/modules/sys_file +++ b/modules/sys_file @@ -18,7 +18,7 @@ # We need the following in order to create when the system # has one that is incomplete. -sys/file.h: sys_file.in.h +sys/file.h: sys_file.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -28,6 +28,7 @@ -e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \ -e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \ -e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_file.in.h; \ } > $@-t && \ mv $@-t $@