]> Savannah Git Hosting - gnulib.git/commitdiff
lib-symbol-visibility: Make configure check work for newer GCC.
authorBruno Haible <bruno@clisp.org>
Sat, 5 Jun 2021 15:07:06 +0000 (17:07 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 5 Jun 2021 15:07:06 +0000 (17:07 +0200)
Reported by Ozkan Sezer <sezeroz@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00117.html>.

* m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each
declaration in the test program.

ChangeLog
m4/visibility.m4

index 77e2c0038be3eae264dfb1df14f2b3ed4e3a6ae5..4b121fb0fecabc00e56c2fed9a8ae2d2f7dfa4c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-06-05  Bruno Haible  <bruno@clisp.org>
+
+       lib-symbol-visibility: Make configure check work for newer GCC.
+       Reported by Ozkan Sezer <sezeroz@gmail.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00117.html>.
+       * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each
+       declaration in the test program.
+
 2021-06-05  Bruno Haible  <bruno@clisp.org>
 
        vasnprintf: Don't leak memory when memory allocation fails.
index 8f27a122df3f954a01ab6a477bd591e0c2de3185..d161bd7f72a0fd3c09ca58584f5fcba4959aa18e 100644 (file)
@@ -1,4 +1,4 @@
-# visibility.m4 serial 7
+# visibility.m4 serial 8
 dnl Copyright (C) 2005, 2008, 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,
@@ -59,6 +59,10 @@ AC_DEFUN([gl_VISIBILITY],
               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
               void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
               void dummyfunc (void) {}
             ]],
             [[]])],