From: Eric Blake Date: Thu, 24 Dec 2009 14:19:23 +0000 (-0700) Subject: link-warning: make usage consistent X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0bf16819c83c3ef1d11bf373f5f90a1f09c534c;p=pspp 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 index fb766c31e6..79ffe48851 100644 --- 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 index d1a3c5bcad..ba90077d7d 100644 --- 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 index fc27826140..26678cc533 100644 --- a/lib/langinfo.in.h +++ b/lib/langinfo.in.h @@ -123,6 +123,7 @@ typedef int nl_item; #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 index 478795ad17..3a79c53a5a 100644 --- 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 index 44626640ff..2dff58c3df 100644 --- 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 index b0ebf1b376..e89681400e 100644 --- a/modules/ctype +++ b/modules/ctype @@ -7,6 +7,7 @@ m4/ctype.m4 Depends-on: include_next +link-warning configure.ac: gl_CTYPE_H @@ -16,7 +17,7 @@ BUILT_SOURCES += $(CTYPE_H) # 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 @@ ctype.h: ctype.in.h -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 index 63bc6c4e25..a3ae9f132a 100644 --- a/modules/getopt-posix +++ b/modules/getopt-posix @@ -23,14 +23,13 @@ BUILT_SOURCES += $(GETOPT_H) # 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 index f9b0a2f4ed..fb413d0e18 100644 --- a/modules/langinfo +++ b/modules/langinfo @@ -6,8 +6,9 @@ lib/langinfo.in.h m4/langinfo_h.m4 Depends-on: -include_next extensions +include_next +link-warning configure.ac: gl_LANGINFO_H @@ -17,7 +18,7 @@ BUILT_SOURCES += $(LANGINFO_H) # 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 @@ langinfo.h: langinfo.in.h -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 index 60d608192a..2541300e53 100644 --- a/modules/locale +++ b/modules/locale @@ -9,6 +9,7 @@ Depends-on: include_next arg-nonnull extensions +link-warning stddef configure.ac: @@ -19,7 +20,7 @@ BUILT_SOURCES += $(LOCALE_H) # 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 @@ locale.h: locale.in.h $(ARG_NONNULL_H) -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 index 593604c99e..61c6202343 100644 --- a/modules/sys_file +++ b/modules/sys_file @@ -18,7 +18,7 @@ BUILT_SOURCES += $(SYS_FILE_H) # 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 @@ sys/file.h: sys_file.in.h -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 $@