From: Bruno Haible Date: Tue, 12 Jul 2011 09:44:55 +0000 (+0200) Subject: Rename module 'warn-on-use' to 'snippet/warn-on-use'. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddb4ab56651fa57c58e584e12bb386015147c165;p=pspp Rename module 'warn-on-use' to 'snippet/warn-on-use'. * modules/snippet/warn-on-use: Renamed from modules/warn-on-use. (Files, Makefile.am): Update. * build-aux/snippet/warn-on-use.h: Renamed from build-aux/warn-on-use.h. * modules/arpa_inet (Depends-on): Update. * modules/ctype (Depends-on): Update. * modules/dirent (Depends-on): Update. * modules/fcntl-h (Depends-on): Update. * modules/glob (Depends-on): Update. * modules/iconv-h (Depends-on): Update. * modules/inttypes-incomplete (Depends-on): Update. * modules/langinfo (Depends-on): Update. * modules/locale (Depends-on): Update. * modules/math (Depends-on): Update. * modules/netdb (Depends-on): Update. * modules/poll-h (Depends-on): Update. * modules/pty (Depends-on): Update. * modules/search (Depends-on): Update. * modules/signal (Depends-on): Update. * modules/spawn (Depends-on): Update. * modules/stdio (Depends-on): Update. * modules/stdlib (Depends-on): Update. * modules/string (Depends-on): Update. * modules/strings (Depends-on): Update. * modules/sys_file (Depends-on): Update. * modules/sys_ioctl (Depends-on): Update. * modules/sys_select (Depends-on): Update. * modules/sys_socket (Depends-on): Update. * modules/sys_stat (Depends-on): Update. * modules/sys_time (Depends-on): Update. * modules/sys_times (Depends-on): Update. * modules/sys_utsname (Depends-on): Update. * modules/sys_wait (Depends-on): Update. * modules/termios (Depends-on): Update. * modules/time (Depends-on): Update. * modules/unistd (Depends-on): Update. * modules/wchar (Depends-on): Update. * modules/wctype-h (Depends-on): Update. * MODULES.html.sh (Support for building libraries and executables): Update. --- diff --git a/ChangeLog b/ChangeLog index 533f1a4886..92c8f306e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,46 @@ +2011-07-12 Bruno Haible + + Rename module 'warn-on-use' to 'snippet/warn-on-use'. + * modules/snippet/warn-on-use: Renamed from modules/warn-on-use. + (Files, Makefile.am): Update. + * build-aux/snippet/warn-on-use.h: Renamed from build-aux/warn-on-use.h. + * modules/arpa_inet (Depends-on): Update. + * modules/ctype (Depends-on): Update. + * modules/dirent (Depends-on): Update. + * modules/fcntl-h (Depends-on): Update. + * modules/glob (Depends-on): Update. + * modules/iconv-h (Depends-on): Update. + * modules/inttypes-incomplete (Depends-on): Update. + * modules/langinfo (Depends-on): Update. + * modules/locale (Depends-on): Update. + * modules/math (Depends-on): Update. + * modules/netdb (Depends-on): Update. + * modules/poll-h (Depends-on): Update. + * modules/pty (Depends-on): Update. + * modules/search (Depends-on): Update. + * modules/signal (Depends-on): Update. + * modules/spawn (Depends-on): Update. + * modules/stdio (Depends-on): Update. + * modules/stdlib (Depends-on): Update. + * modules/string (Depends-on): Update. + * modules/strings (Depends-on): Update. + * modules/sys_file (Depends-on): Update. + * modules/sys_ioctl (Depends-on): Update. + * modules/sys_select (Depends-on): Update. + * modules/sys_socket (Depends-on): Update. + * modules/sys_stat (Depends-on): Update. + * modules/sys_time (Depends-on): Update. + * modules/sys_times (Depends-on): Update. + * modules/sys_utsname (Depends-on): Update. + * modules/sys_wait (Depends-on): Update. + * modules/termios (Depends-on): Update. + * modules/time (Depends-on): Update. + * modules/unistd (Depends-on): Update. + * modules/wchar (Depends-on): Update. + * modules/wctype-h (Depends-on): Update. + * MODULES.html.sh (Support for building libraries and executables): + Update. + 2011-07-12 Bruno Haible Rename module 'unused-parameter' to 'snippet/unused-parameter'. diff --git a/MODULES.html.sh b/MODULES.html.sh index 575a5a7486..6bfaf66b4e 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -3459,7 +3459,7 @@ func_all_modules () func_module relocatable-prog func_module relocatable-prog-wrapper func_module relocatable-script - func_module warn-on-use + func_module snippet/warn-on-use func_module warnings func_end_table diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h new file mode 100644 index 0000000000..c14fb274fd --- /dev/null +++ b/build-aux/snippet/warn-on-use.h @@ -0,0 +1,109 @@ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2011 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 . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + This macro is useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. However, one of the reasons that a function is a + portability trap is if it has the wrong signature. Declaring + FUNCTION with a different signature in C is a compilation error, so + this macro must use the same type as any existing declaration so + that programs that avoid the problematic FUNCTION do not fail to + compile merely because they included a header that poisoned the + function. But this implies that _GL_WARN_ON_USE is only safe to + use if FUNCTION is known to already have a declaration. Use of + this macro implies that there must not be any other macro hiding + the declaration of FUNCTION; but undefining FUNCTION first is part + of the poisoning process anyway (although for symbols that are + provided only via a macro, the result is a compilation error rather + than a warning containing "literal string"). Also note that in + C++, it is only safe to use if FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static inline char ***rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") + is like _GL_WARN_ON_USE (function, "string"), except that the function is + declared with the given prototype, consisting of return type, parameters, + and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h deleted file mode 100644 index c14fb274fd..0000000000 --- a/build-aux/warn-on-use.h +++ /dev/null @@ -1,109 +0,0 @@ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2011 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 . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - This macro is useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. However, one of the reasons that a function is a - portability trap is if it has the wrong signature. Declaring - FUNCTION with a different signature in C is a compilation error, so - this macro must use the same type as any existing declaration so - that programs that avoid the problematic FUNCTION do not fail to - compile merely because they included a header that poisoned the - function. But this implies that _GL_WARN_ON_USE is only safe to - use if FUNCTION is known to already have a declaration. Use of - this macro implies that there must not be any other macro hiding - the declaration of FUNCTION; but undefining FUNCTION first is part - of the poisoning process anyway (although for symbols that are - provided only via a macro, the result is a compilation error rather - than a warning containing "literal string"). Also note that in - C++, it is only safe to use if FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static inline char ***rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that the function is - declared with the given prototype, consisting of return type, parameters, - and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif diff --git a/modules/arpa_inet b/modules/arpa_inet index 6fd3bd917c..6653ed4204 100644 --- a/modules/arpa_inet +++ b/modules/arpa_inet @@ -9,8 +9,8 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use sys_socket -warn-on-use configure.ac: gl_HEADER_ARPA_INET diff --git a/modules/ctype b/modules/ctype index fbbc541b22..ec000dc801 100644 --- a/modules/ctype +++ b/modules/ctype @@ -8,7 +8,7 @@ m4/ctype.m4 Depends-on: include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_CTYPE_H diff --git a/modules/dirent b/modules/dirent index e7e7b9b353..2e4fbee17c 100644 --- a/modules/dirent +++ b/modules/dirent @@ -10,7 +10,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_DIRENT_H diff --git a/modules/fcntl-h b/modules/fcntl-h index d3531e99b6..a687eebee0 100644 --- a/modules/fcntl-h +++ b/modules/fcntl-h @@ -11,8 +11,8 @@ extensions include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use unistd -warn-on-use configure.ac: gl_FCNTL_H diff --git a/modules/glob b/modules/glob index 2f67794eda..5a8b4aefe1 100644 --- a/modules/glob +++ b/modules/glob @@ -12,7 +12,7 @@ Depends-on: extensions snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use alloca [test -n "$GLOB_H"] d-type [test -n "$GLOB_H"] dirfd [test -n "$GLOB_H"] diff --git a/modules/iconv-h b/modules/iconv-h index 7240784f0b..e20b073872 100644 --- a/modules/iconv-h +++ b/modules/iconv-h @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_ICONV_H diff --git a/modules/inttypes-incomplete b/modules/inttypes-incomplete index 628a068164..d9d53ac874 100644 --- a/modules/inttypes-incomplete +++ b/modules/inttypes-incomplete @@ -9,8 +9,8 @@ Depends-on: include_next multiarch snippet/arg-nonnull +snippet/warn-on-use stdint -warn-on-use configure.ac: gl_INTTYPES_INCOMPLETE diff --git a/modules/langinfo b/modules/langinfo index 6b5a8725ab..2519fc5612 100644 --- a/modules/langinfo +++ b/modules/langinfo @@ -9,7 +9,7 @@ Depends-on: extensions include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_LANGINFO_H diff --git a/modules/locale b/modules/locale index 0aa8925afa..4c66c84e24 100644 --- a/modules/locale +++ b/modules/locale @@ -10,8 +10,8 @@ extensions include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use stddef -warn-on-use configure.ac: gl_LOCALE_H diff --git a/modules/math b/modules/math index 4f3f2289cb..bc3d34c355 100644 --- a/modules/math +++ b/modules/math @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_MATH_H diff --git a/modules/netdb b/modules/netdb index 75cfd8b6c6..b324866c1b 100644 --- a/modules/netdb +++ b/modules/netdb @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use sys_socket configure.ac: diff --git a/modules/poll-h b/modules/poll-h index ab21341d8e..7c03786e0c 100644 --- a/modules/poll-h +++ b/modules/poll-h @@ -9,7 +9,7 @@ Depends-on: extensions include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_POLL_H diff --git a/modules/pty b/modules/pty index beaa1ccd89..d523d142ca 100644 --- a/modules/pty +++ b/modules/pty @@ -8,7 +8,7 @@ m4/pty_h.m4 Depends-on: include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_PTY_H diff --git a/modules/search b/modules/search index 66cd19d0e3..7adddc144d 100644 --- a/modules/search +++ b/modules/search @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_SEARCH_H diff --git a/modules/signal b/modules/signal index 2e810ae09b..b8d96be102 100644 --- a/modules/signal +++ b/modules/signal @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use extensions configure.ac: diff --git a/modules/snippet/warn-on-use b/modules/snippet/warn-on-use new file mode 100644 index 0000000000..bd57028b24 --- /dev/null +++ b/modules/snippet/warn-on-use @@ -0,0 +1,36 @@ +Description: +A C macro for emitting a warning if a function is used. + +Applicability: +all + +Files: +build-aux/warn-on-use.h +m4/warn-on-use.m4 + +Depends-on: + +configure.ac: + +Makefile.am: +BUILT_SOURCES += warn-on-use.h +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t + +WARN_ON_USE_H=warn-on-use.h + +Include: + +License: +LGPLv2+ + +Maintainer: +Eric Blake diff --git a/modules/spawn b/modules/spawn index 12c28abacb..436a7fe8fa 100644 --- a/modules/spawn +++ b/modules/spawn @@ -10,7 +10,7 @@ include_next sched snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_SPAWN_H diff --git a/modules/stdio b/modules/stdio index 75a3c989ac..f8880df3f7 100644 --- a/modules/stdio +++ b/modules/stdio @@ -9,8 +9,8 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use stddef -warn-on-use configure.ac: gl_STDIO_H diff --git a/modules/stdlib b/modules/stdlib index ae51e9fd47..380f13b6db 100644 --- a/modules/stdlib +++ b/modules/stdlib @@ -10,9 +10,9 @@ _Noreturn include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use stddef unistd -warn-on-use configure.ac: gl_STDLIB_H diff --git a/modules/string b/modules/string index afa4f3ca29..a78508cdeb 100644 --- a/modules/string +++ b/modules/string @@ -10,8 +10,8 @@ extensions include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use stddef -warn-on-use configure.ac: gl_HEADER_STRING_H diff --git a/modules/strings b/modules/strings index ef1e13cb60..631cabbae9 100644 --- a/modules/strings +++ b/modules/strings @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_HEADER_STRINGS_H diff --git a/modules/sys_file b/modules/sys_file index 71df037547..509c1da099 100644 --- a/modules/sys_file +++ b/modules/sys_file @@ -7,7 +7,7 @@ m4/sys_file_h.m4 Depends-on: include_next -warn-on-use +snippet/warn-on-use configure.ac: gl_HEADER_SYS_FILE_H diff --git a/modules/sys_ioctl b/modules/sys_ioctl index 4fa807ff5b..a008f212ac 100644 --- a/modules/sys_ioctl +++ b/modules/sys_ioctl @@ -8,8 +8,8 @@ m4/sys_ioctl_h.m4 Depends-on: include_next snippet/c++defs +snippet/warn-on-use unistd -warn-on-use configure.ac: gl_SYS_IOCTL_H diff --git a/modules/sys_select b/modules/sys_select index 3d579f9ef8..49a03606ad 100644 --- a/modules/sys_select +++ b/modules/sys_select @@ -10,8 +10,8 @@ Depends-on: include_next signal snippet/c++defs +snippet/warn-on-use sys_time -warn-on-use configure.ac: gl_HEADER_SYS_SELECT diff --git a/modules/sys_socket b/modules/sys_socket index 5bcde53738..df0844bf99 100644 --- a/modules/sys_socket +++ b/modules/sys_socket @@ -12,9 +12,9 @@ errno include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use socklen sys_uio -warn-on-use configure.ac: gl_HEADER_SYS_SOCKET diff --git a/modules/sys_stat b/modules/sys_stat index 3bb367bf38..531562c98d 100644 --- a/modules/sys_stat +++ b/modules/sys_stat @@ -10,8 +10,8 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use time -warn-on-use configure.ac: gl_HEADER_SYS_STAT_H diff --git a/modules/sys_time b/modules/sys_time index 1d271bc569..18700e8300 100644 --- a/modules/sys_time +++ b/modules/sys_time @@ -9,7 +9,7 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_HEADER_SYS_TIME_H diff --git a/modules/sys_times b/modules/sys_times index 5d289d1349..66a36f135d 100644 --- a/modules/sys_times +++ b/modules/sys_times @@ -8,7 +8,7 @@ m4/sys_times_h.m4 Depends-on: include_next snippet/arg-nonnull -warn-on-use +snippet/warn-on-use configure.ac: gl_SYS_TIMES_H diff --git a/modules/sys_utsname b/modules/sys_utsname index 8e6ed6aaf4..82aa31bdf4 100644 --- a/modules/sys_utsname +++ b/modules/sys_utsname @@ -8,7 +8,7 @@ m4/sys_utsname_h.m4 Depends-on: include_next snippet/arg-nonnull -warn-on-use +snippet/warn-on-use configure.ac: gl_SYS_UTSNAME_H diff --git a/modules/sys_wait b/modules/sys_wait index 2159e55bee..a270d914cf 100644 --- a/modules/sys_wait +++ b/modules/sys_wait @@ -8,7 +8,7 @@ m4/sys_wait_h.m4 Depends-on: include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_SYS_WAIT_H diff --git a/modules/termios b/modules/termios index 60e9b44336..facebebde9 100644 --- a/modules/termios +++ b/modules/termios @@ -8,7 +8,7 @@ m4/termios_h.m4 Depends-on: include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_TERMIOS_H diff --git a/modules/time b/modules/time index 34d749a7c0..8e946fcffc 100644 --- a/modules/time +++ b/modules/time @@ -10,7 +10,7 @@ extensions include_next snippet/arg-nonnull snippet/c++defs -warn-on-use +snippet/warn-on-use stddef configure.ac: diff --git a/modules/unistd b/modules/unistd index fa69a8b7b2..6c8ea1e406 100644 --- a/modules/unistd +++ b/modules/unistd @@ -9,8 +9,8 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use stddef -warn-on-use configure.ac: gl_UNISTD_H diff --git a/modules/warn-on-use b/modules/warn-on-use deleted file mode 100644 index f0ee83b866..0000000000 --- a/modules/warn-on-use +++ /dev/null @@ -1,35 +0,0 @@ -Description: -A C macro for emitting a warning if a function is used. - -Applicability: -all - -Files: -build-aux/warn-on-use.h -m4/warn-on-use.m4 - -Depends-on: - -configure.ac: - -Makefile.am: -BUILT_SOURCES += warn-on-use.h -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -Include: - -License: -LGPLv2+ - -Maintainer: -Eric Blake diff --git a/modules/wchar b/modules/wchar index 04ff3459dc..abaf6b7be6 100644 --- a/modules/wchar +++ b/modules/wchar @@ -10,8 +10,8 @@ Depends-on: include_next snippet/arg-nonnull snippet/c++defs +snippet/warn-on-use stddef -warn-on-use configure.ac: gl_WCHAR_H diff --git a/modules/wctype-h b/modules/wctype-h index 08c66c6c6f..58491192c0 100644 --- a/modules/wctype-h +++ b/modules/wctype-h @@ -9,7 +9,7 @@ m4/wint_t.m4 Depends-on: include_next snippet/c++defs -warn-on-use +snippet/warn-on-use configure.ac: gl_WCTYPE_H