unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
blob 04edfe85d4997bfa7cae88033ae3e54fffc00f58 2200 bytes (raw)
name: m4/warn-on-use.m4 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
# warn-on-use.m4 serial 9
dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
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)
# ---------------------------------------
# If the module 'posixcheck' is in use:
#
# 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.
#
# It is generally safe to assume declarations for functions declared
# in the intersection of C89 and C11 (such as printf) without
# needing gl_WARN_ON_USE_PREPARE.
AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[
  m4_ifdef([gl_POSIXCHECK],
    [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
    ])
])

debug log:

solving 04edfe85d4997 ...
found 04edfe85d4997 in https://yhetil.org/emacs-bugs/CAOqdjBe=-aWeu8Cs1MV7xjKr9FHC6Jy7B4fALXUQ0+KnaVNiUQ@mail.gmail.com/

applying [1/1] https://yhetil.org/emacs-bugs/CAOqdjBe=-aWeu8Cs1MV7xjKr9FHC6Jy7B4fALXUQ0+KnaVNiUQ@mail.gmail.com/
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
new file mode 100644
index 0000000000000..04edfe85d4997

Checking patch m4/warn-on-use.m4...
Applied patch m4/warn-on-use.m4 cleanly.

index at:
100644 04edfe85d4997bfa7cae88033ae3e54fffc00f58	m4/warn-on-use.m4

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).