]> Savannah Git Hosting - gnulib.git/commitdiff
libc-config: Enable __REDIRECT macro also on clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:06:58 +0000 (19:06 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:06:58 +0000 (19:06 +0200)
* lib/cdefs.h (__REDIRECT, __REDIRECT_NTH, __REDIRECT_NTHNL, __ASMNAME,
__ASMNAME2): Define on clang like on GCC.

ChangeLog
lib/cdefs.h

index 9bf0e78d483c67b6cb52d7c6fe6e5d8f35ee369e..a56da8343b272548034f1a64555a2af900c1f265 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       libc-config: Enable __REDIRECT macro also on clang.
+       * lib/cdefs.h (__REDIRECT, __REDIRECT_NTH, __REDIRECT_NTHNL, __ASMNAME,
+       __ASMNAME2): Define on clang like on GCC.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        regex: Use initializer shorthand syntax also with clang.
index 67ad180e76d2a3d474483396f7763d33760db4fb..74da73404b71db6b88a5b448d6e6e53402753772 100644 (file)
    Example:
    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
 
-#if defined __GNUC__ && __GNUC__ >= 2
+#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
 
 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
 # ifdef __cplusplus