binutils-gdb/gdb/gnulib/m4/warn-on-use.m4

46 lines
2.0 KiB
Plaintext
Raw Normal View History

gdb/ 2010-05-23 Pedro Alves <pedro@codesourcery.com> Update gnulib from latest git. (250b80067c1e1d8faa0c42fb572f721975b929c5) * gnulib/memcmp.c: Removed. * gnulib/memchr.valgrind: New. * gnulib/stddef.in.h: New. * gnulib/Makefile.am: Updated. * gnulib/memchr.c: Updated. * gnulib/memmem.c: Updated. * gnulib/stdint.in.h: Updated. * gnulib/str-two-way.h: Updated. * gnulib/string.in.h: Updated. * gnulib/wchar.in.h: Updated. * gnulib/extra/link-warning.h: Removed. * gnulib/extra/c++defs.h: New. * gnulib/extra/warn-on-use.h: New. * gnulib/extra/arg-nonnull.h: Updated. * gnulib/m4/extensions.m4: Updated. * gnulib/m4/gnulib-cache.m4: Updated. * gnulib/m4/gnulib-common.m4: Updated. * gnulib/m4/gnulib-comp.m4: Updated. * gnulib/m4/gnulib-tool.m4: Updated. * gnulib/m4/include_next.m4: Updated. * gnulib/m4/longlong.m4: Updated. * gnulib/m4/memchr.m4: Updated. * gnulib/m4/memmem.m4: Updated. * gnulib/m4/stdint.m4: Updated. * gnulib/m4/string_h.m4: Updated. * gnulib/m4/memcmp.m4: Removed. * gnulib/m4/onceonly_2_57.m4: Removed. * gnulib/m4/00gnulib.m4: New. * gnulib/m4/mmap-anon.m4: New. * gnulib/m4/multiarch.m4: New. * gnulib/m4/onceonly.m4: New. * gnulib/m4/stddef_h.m4: New. * gnulib/m4/warn-on-use.m4: New. * gnulib/m4/wchar.m4: Removed. * gnulib/m4/wchar_h.m4: New. * gnulib/m4/wchar_t.m4: New. * gnulib/m4/wint_t.m4: New. * aclocal.m4: Regenerate. * config.in: Likewise. * configure: Likewise. * gnulib/Makefile.in: Likewise. gdb/gdbserver/ 2010-05-23 Pedro Alves <pedro@codesourcery.com> * config.h, configure: Regenerate.
2010-05-23 02:57:01 +02:00
# warn-on-use.m4 serial 2
2011-01-01 16:34:07 +01:00
dnl Copyright (C) 2010, 2011 Free Software Foundation, Inc.
gdb/ 2010-05-23 Pedro Alves <pedro@codesourcery.com> Update gnulib from latest git. (250b80067c1e1d8faa0c42fb572f721975b929c5) * gnulib/memcmp.c: Removed. * gnulib/memchr.valgrind: New. * gnulib/stddef.in.h: New. * gnulib/Makefile.am: Updated. * gnulib/memchr.c: Updated. * gnulib/memmem.c: Updated. * gnulib/stdint.in.h: Updated. * gnulib/str-two-way.h: Updated. * gnulib/string.in.h: Updated. * gnulib/wchar.in.h: Updated. * gnulib/extra/link-warning.h: Removed. * gnulib/extra/c++defs.h: New. * gnulib/extra/warn-on-use.h: New. * gnulib/extra/arg-nonnull.h: Updated. * gnulib/m4/extensions.m4: Updated. * gnulib/m4/gnulib-cache.m4: Updated. * gnulib/m4/gnulib-common.m4: Updated. * gnulib/m4/gnulib-comp.m4: Updated. * gnulib/m4/gnulib-tool.m4: Updated. * gnulib/m4/include_next.m4: Updated. * gnulib/m4/longlong.m4: Updated. * gnulib/m4/memchr.m4: Updated. * gnulib/m4/memmem.m4: Updated. * gnulib/m4/stdint.m4: Updated. * gnulib/m4/string_h.m4: Updated. * gnulib/m4/memcmp.m4: Removed. * gnulib/m4/onceonly_2_57.m4: Removed. * gnulib/m4/00gnulib.m4: New. * gnulib/m4/mmap-anon.m4: New. * gnulib/m4/multiarch.m4: New. * gnulib/m4/onceonly.m4: New. * gnulib/m4/stddef_h.m4: New. * gnulib/m4/warn-on-use.m4: New. * gnulib/m4/wchar.m4: Removed. * gnulib/m4/wchar_h.m4: New. * gnulib/m4/wchar_t.m4: New. * gnulib/m4/wint_t.m4: New. * aclocal.m4: Regenerate. * config.in: Likewise. * configure: Likewise. * gnulib/Makefile.in: Likewise. gdb/gdbserver/ 2010-05-23 Pedro Alves <pedro@codesourcery.com> * config.h, configure: Regenerate.
2010-05-23 02:57:01 +02:00
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
# ---------------------------------------
# For each whitespace-separated element in the list of NAMES, define
# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
# even after being undefined as a macro.
#
# See warn-on-use.h for some hints on how to poison function names, as
# well as ideas on poisoning global variables and macros. NAMES may
# include global variables, but remember that only functions work with
# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single
# header, but if the replacement header pulls in other headers because
# some systems declare functions in the wrong header, then INCLUDES
# should do likewise.
#
# If you assume C89, then it is generally safe to assume declarations
# for functions declared in that standard (such as gets) without
# needing gl_WARN_ON_USE_PREPARE.
AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[
m4_foreach_w([gl_decl], [$2],
[AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
[Define to 1 if ]m4_defn([gl_decl])[ is declared even after
undefining macros.])])dnl
for gl_func in m4_flatten([$2]); do
AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
AC_CACHE_CHECK([whether $gl_func is declared without a macro],
gl_Symbol,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
[@%:@undef $gl_func
(void) $gl_func;])],
[AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
AS_VAR_IF(gl_Symbol, [yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
dnl shortcut - if the raw declaration exists, then set a cache
dnl variable to allow skipping any later AC_CHECK_DECL efforts
eval ac_cv_have_decl_$gl_func=yes])
AS_VAR_POPDEF([gl_Symbol])dnl
done
])