Hi Simon, > Bruno, what do you think? For rationale, I got a comment in > https://savannah.gnu.org/task/?9954 that link-warning.h lacked licensing > information.
With the coding guideline that every file should have a copyright statement, and the license audits that they do in Debian, I nearly saw this coming ;-) > +2009-12-08 Simon Josefsson <si...@josefsson.org> > + > + * build-aux/link-warning.h: Add license header. > + It takes a bit more than this, because we don't want the generated unistd.h etc. files to contain two - possibly contradicting - copyright notices. So the copyright notice of link-warning.h has to be removed at the moment the contents is included in unistd.h etc. I'm applying this: 2009-12-09 Simon Josefsson <si...@josefsson.org> Bruno Haible <br...@clisp.org> * build-aux/link-warning.h: Add copyright notice. * modules/link-warning (Makefile.am): Generate link-warning.h from build-aux/link-warning.h. Update LINK_WARNING_H accordingly. * NEWS: Mention change in link-warning module. * modules/arpa_inet (Makefile.am): Add dependency to arpa/inet.h. * modules/dirent (Makefile.am): Add dependency to dirent.h. * modules/fcntl-h (Makefile.am): Add dependency to fcntl.h. * modules/getopt-posix (Makefile.am): Add dependency to getopt.h. * modules/inttypes (Makefile.am): Add dependency to inttypes.h. * modules/math (Makefile.am): Add dependency to math.h. * modules/search (Makefile.am): Add dependency to search.h. * modules/signal (Makefile.am): Add dependency to signal.h. * modules/spawn (Makefile.am): Add dependency to spawn.h. * modules/stdio (Makefile.am): Add dependency to stdio.h. * modules/stdlib (Makefile.am): Add dependency to stdlib.h. * modules/string (Makefile.am): Add dependency to string.h. * modules/strings (Makefile.am): Add dependency to strings.h. * modules/sys_ioctl (Makefile.am): Add dependency to sys/ioctl.h. * modules/sys_select (Makefile.am): Add dependency to sys/select.h. * modules/sys_socket (Makefile.am): Add dependency to sys/socket.h. * modules/sys_stat (Makefile.am): Add dependency to sys/stat.h. * modules/sys_times (Makefile.am): Add dependency to sys/times.h. * modules/sys_utsname (Makefile.am): Add dependency to sys/utsname.h. * modules/sys_wait (Makefile.am): Add dependency to sys/wait.h. * modules/unistd (Makefile.am): Add dependency to unistd.h. * modules/wchar (Makefile.am): Add dependency to wchar.h. --- NEWS.orig 2009-12-09 12:38:14.000000000 +0100 +++ NEWS 2009-12-09 12:27:26.000000000 +0100 @@ -6,6 +6,10 @@ Date Modules Changes +2009-12-09 link-warning The Makefile rules that use $(LINK_WARNING_H) now + must contain an explicit dependency on + $(LINK_WARNING_H). + 2009-11-12 getgroups These functions now use a signature of gid_t, getugroups rather than GETGROUPS_T. This probably has no effect except on very old platforms. --- build-aux/link-warning.h.orig 2009-12-09 12:38:14.000000000 +0100 +++ build-aux/link-warning.h 2009-12-09 12:22:40.000000000 +0100 @@ -1,3 +1,20 @@ +/* A C macro for emitting link time warnings. + Copyright (C) 1995, 1997, 2000, 2002-2003, 2007, 2009 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + /* GL_LINK_WARNING("literal string") arranges to emit the literal string as a linker warning on most glibc systems. We use a linker warning rather than a preprocessor warning, because --- modules/link-warning.orig 2009-12-09 12:38:14.000000000 +0100 +++ modules/link-warning 2009-12-09 12:31:05.000000000 +0100 @@ -9,7 +9,14 @@ configure.ac: Makefile.am: -LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h +BUILT_SOURCES += link-warning.h +link-warning.h: $(top_srcdir)/build-aux/link-warning.h + $(AM_V_GEN)rm -f $...@-t $@ && \ + sed 1,17d < $(top_srcdir)/build-aux/link-warning.h > $...@-t && \ + mv $...@-t $@ +MOSTLYCLEANFILES += link-warning.h link-warning.h-t + +LINK_WARNING_H=link-warning.h Include: --- modules/arpa_inet.orig 2009-12-09 12:38:14.000000000 +0100 +++ modules/arpa_inet 2009-12-09 12:27:38.000000000 +0100 @@ -19,7 +19,7 @@ # We need the following in order to create <arpa/inet.h> when the system # doesn't have one. -arpa/inet.h: arpa_inet.in.h +arpa/inet.h: arpa_inet.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) arpa $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/dirent.orig 2009-12-09 12:38:14.000000000 +0100 +++ modules/dirent 2009-12-09 12:27:38.000000000 +0100 @@ -18,7 +18,7 @@ # We need the following in order to create <dirent.h> when the system # doesn't have one that works with the given compiler. -dirent.h: dirent.in.h +dirent.h: dirent.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' \ --- modules/fcntl-h.orig 2009-12-09 12:38:14.000000000 +0100 +++ modules/fcntl-h 2009-12-09 12:27:39.000000000 +0100 @@ -19,7 +19,7 @@ # We need the following in order to create <fcntl.h> when the system # doesn't have one that works with the given compiler. -fcntl.h: fcntl.in.h +fcntl.h: fcntl.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' \ --- modules/getopt-posix.orig 2009-12-09 12:38:14.000000000 +0100 +++ modules/getopt-posix 2009-12-09 12:27:39.000000000 +0100 @@ -22,7 +22,7 @@ # We need the following in order to create <getopt.h> when the system # doesn't have one that works with the given compiler. -getopt.h: getopt.in.h +getopt.h: getopt.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ --- modules/inttypes.orig 2009-12-09 12:38:14.000000000 +0100 +++ modules/inttypes 2009-12-09 12:27:39.000000000 +0100 @@ -20,7 +20,7 @@ # We need the following in order to create <inttypes.h> when the system # doesn't have one that works with the given compiler. -inttypes.h: inttypes.in.h +inttypes.h: inttypes.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ --- modules/math.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/math 2009-12-09 12:27:39.000000000 +0100 @@ -17,7 +17,7 @@ # We need the following in order to create <math.h> when the system # doesn't have one that works with the given compiler. -math.h: math.in.h +math.h: math.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ --- modules/search.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/search 2009-12-09 12:27:39.000000000 +0100 @@ -17,7 +17,7 @@ # We need the following in order to create <search.h> when the system # doesn't have one that works with the given compiler. -search.h: search.in.h +search.h: search.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''HAVE_SEARCH_H''@|$(HAVE_SEARCH_H)|g' \ --- modules/signal.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/signal 2009-12-09 12:27:38.000000000 +0100 @@ -17,7 +17,7 @@ # We need the following in order to create <signal.h> when the system # doesn't have a complete one. -signal.h: signal.in.h +signal.h: signal.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' \ --- modules/spawn.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/spawn 2009-12-09 12:27:39.000000000 +0100 @@ -18,7 +18,7 @@ # We need the following in order to create a replacement for <spawn.h> when # the system doesn't have one. -spawn.h: spawn.in.h +spawn.h: spawn.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \ --- modules/stdio.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/stdio 2009-12-09 12:27:39.000000000 +0100 @@ -20,7 +20,7 @@ # We need the following in order to create <stdio.h> when the system # doesn't have one that works with the given compiler. -stdio.h: stdio.in.h +stdio.h: stdio.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' \ --- modules/stdlib.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/stdlib 2009-12-09 12:27:39.000000000 +0100 @@ -20,7 +20,7 @@ # We need the following in order to create <stdlib.h> when the system # doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h +stdlib.h: stdlib.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' \ --- modules/string.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/string 2009-12-09 12:27:39.000000000 +0100 @@ -19,7 +19,7 @@ # We need the following in order to create <string.h> when the system # doesn't have one that works with the given compiler. -string.h: string.in.h +string.h: string.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' \ --- modules/strings.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/strings 2009-12-09 12:27:39.000000000 +0100 @@ -17,7 +17,7 @@ # We need the following in order to create <strings.h> when the system # doesn't have one that works with the given compiler. -strings.h: strings.in.h +strings.h: strings.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' \ --- modules/sys_ioctl.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_ioctl 2009-12-09 12:27:39.000000000 +0100 @@ -19,7 +19,7 @@ # We need the following in order to create <sys/ioctl.h> when the system # does not have a complete one. -sys/ioctl.h: sys_ioctl.in.h +sys/ioctl.h: sys_ioctl.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/sys_select.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_select 2009-12-09 12:27:39.000000000 +0100 @@ -20,7 +20,7 @@ # We need the following in order to create <sys/select.h> when the system # doesn't have one that works with the given compiler. -sys/select.h: sys_select.in.h +sys/select.h: sys_select.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/sys_socket.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_socket 2009-12-09 12:27:39.000000000 +0100 @@ -21,7 +21,7 @@ # We need the following in order to create <sys/socket.h> when the system # doesn't have one that works with the given compiler. -sys/socket.h: sys_socket.in.h +sys/socket.h: sys_socket.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/sys_stat.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_stat 2009-12-09 12:27:38.000000000 +0100 @@ -20,7 +20,7 @@ # We need the following in order to create <sys/stat.h> when the system # has one that is incomplete. -sys/stat.h: sys_stat.in.h +sys/stat.h: sys_stat.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/sys_times.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_times 2009-12-09 12:27:38.000000000 +0100 @@ -17,7 +17,7 @@ # We need the following in order to create <sys/times.h> when the system # doesn't have one that works with the given compiler. -sys/times.h: sys_times.in.h +sys/times.h: sys_times.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/sys_utsname.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_utsname 2009-12-09 12:27:38.000000000 +0100 @@ -17,7 +17,7 @@ # We need the following in order to create <sys/utsname.h> when the system # does not have one. -sys/utsname.h: sys_utsname.in.h +sys/utsname.h: sys_utsname.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/sys_wait.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/sys_wait 2009-12-09 12:27:39.000000000 +0100 @@ -18,7 +18,7 @@ # We need the following in order to create <sys/wait.h> when the system # has one that is incomplete. -sys/wait.h: sys_wait.in.h +sys/wait.h: sys_wait.in.h $(LINK_WARNING_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ --- modules/unistd.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/unistd 2009-12-09 12:27:39.000000000 +0100 @@ -18,7 +18,7 @@ # We need the following in order to create an empty placeholder for # <unistd.h> when the system doesn't have one. -unistd.h: unistd.in.h +unistd.h: unistd.in.h $(LINK_WARNING_H) $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ --- modules/wchar.orig 2009-12-09 12:38:15.000000000 +0100 +++ modules/wchar 2009-12-09 12:27:38.000000000 +0100 @@ -19,7 +19,7 @@ # We need the following in order to create <wchar.h> when the system # version does not work standalone. -wchar.h: wchar.in.h +wchar.h: wchar.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' \