summaryrefslogtreecommitdiff
path: root/lib/string.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-08-21 00:54:18 +0200
committerBruno Haible <bruno@clisp.org>2020-08-21 01:18:07 +0200
commitf57bc6d11afae19deb915709bb9a2de66bcdeeac (patch)
treeb3cd68268d231a655e8bd9f06a0984dbed2c1850 /lib/string.in.h
parentbb2e34896a96a94ca7f29798a9020f630ef6ad70 (diff)
downloadgnulib-f57bc6d11afae19deb915709bb9a2de66bcdeeac.tar.gz
sigabbrev_np: New module.
* lib/string.in.h (sigabbrev_np): New declaration. * lib/sigabbrev_np.c: New file. * m4/sigabbrev_np.m4: New file. * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigabbrev_np is declared. (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGABBREV_NP, HAVE_SIGABBREV_NP. * modules/string (Makefile.am): Substitute GNULIB_SIGABBREV_NP, HAVE_SIGABBREV_NP. * modules/sigabbrev_np: New file. * tests/test-string-c++.cc: Verify the signature of sigabbrev_np. * doc/glibc-functions/sigabbrev_np.texi: Mention the new module.
Diffstat (limited to 'lib/string.in.h')
-rw-r--r--lib/string.in.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h
index 4c88a373f8..20da813866 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1045,6 +1045,21 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
# endif
#endif
+/* Return an abbreviation string for the signal number SIG. */
+#if @GNULIB_SIGABBREV_NP@
+# if ! @HAVE_SIGABBREV_NP@
+_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig));
+# endif
+_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig));
+_GL_CXXALIASWARN (sigabbrev_np);
+#elif defined GNULIB_POSIXCHECK
+# undef sigabbrev_np
+# if HAVE_RAW_DECL_SIGABBREV_NP
+_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - "
+ "use gnulib module sigabbrev_np for portability");
+# endif
+#endif
+
#if @GNULIB_STRSIGNAL@
# if @REPLACE_STRSIGNAL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)