* 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 <bruno@clisp.org>
+
+ 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 <bruno@clisp.org>
Rename module 'unused-parameter' to 'snippet/unused-parameter'.
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
--- /dev/null
+/* 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 <http://www.gnu.org/licenses/>. */
+
+/* _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 <stdio.h>]],
+ [getline]) in configure.ac, which potentially defines
+ HAVE_RAW_DECL_GETLINE
+ - adding this code to a header that wraps the system <stdio.h>:
+ #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
+++ /dev/null
-/* 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 <http://www.gnu.org/licenses/>. */
-
-/* _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 <stdio.h>]],
- [getline]) in configure.ac, which potentially defines
- HAVE_RAW_DECL_GETLINE
- - adding this code to a header that wraps the system <stdio.h>:
- #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
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
sys_socket
-warn-on-use
configure.ac:
gl_HEADER_ARPA_INET
Depends-on:
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_CTYPE_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_DIRENT_H
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
unistd
-warn-on-use
configure.ac:
gl_FCNTL_H
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"]
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_ICONV_H
include_next
multiarch
snippet/arg-nonnull
+snippet/warn-on-use
stdint
-warn-on-use
configure.ac:
gl_INTTYPES_INCOMPLETE
extensions
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_LANGINFO_H
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
stddef
-warn-on-use
configure.ac:
gl_LOCALE_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_MATH_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
sys_socket
configure.ac:
extensions
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_POLL_H
Depends-on:
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_PTY_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_SEARCH_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
extensions
configure.ac:
--- /dev/null
+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
sched
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_SPAWN_H
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
stddef
-warn-on-use
configure.ac:
gl_STDIO_H
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
stddef
unistd
-warn-on-use
configure.ac:
gl_STDLIB_H
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
stddef
-warn-on-use
configure.ac:
gl_HEADER_STRING_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_HEADER_STRINGS_H
Depends-on:
include_next
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_HEADER_SYS_FILE_H
Depends-on:
include_next
snippet/c++defs
+snippet/warn-on-use
unistd
-warn-on-use
configure.ac:
gl_SYS_IOCTL_H
include_next
signal
snippet/c++defs
+snippet/warn-on-use
sys_time
-warn-on-use
configure.ac:
gl_HEADER_SYS_SELECT
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
socklen
sys_uio
-warn-on-use
configure.ac:
gl_HEADER_SYS_SOCKET
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
time
-warn-on-use
configure.ac:
gl_HEADER_SYS_STAT_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_HEADER_SYS_TIME_H
Depends-on:
include_next
snippet/arg-nonnull
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_SYS_TIMES_H
Depends-on:
include_next
snippet/arg-nonnull
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_SYS_UTSNAME_H
Depends-on:
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_SYS_WAIT_H
Depends-on:
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_TERMIOS_H
include_next
snippet/arg-nonnull
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
stddef
configure.ac:
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
stddef
-warn-on-use
configure.ac:
gl_UNISTD_H
+++ /dev/null
-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
include_next
snippet/arg-nonnull
snippet/c++defs
+snippet/warn-on-use
stddef
-warn-on-use
configure.ac:
gl_WCHAR_H
Depends-on:
include_next
snippet/c++defs
-warn-on-use
+snippet/warn-on-use
configure.ac:
gl_WCTYPE_H