From: Bruno Haible Date: Sat, 5 Jun 2021 15:07:06 +0000 (+0200) Subject: lib-symbol-visibility: Make configure check work for newer GCC. X-Git-Tag: v1.0~2853 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c3549ab805260a7679bc6459612904a3cf3b8ab1;p=gnulib.git lib-symbol-visibility: Make configure check work for newer GCC. Reported by Ozkan Sezer in . * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each declaration in the test program. --- diff --git a/ChangeLog b/ChangeLog index 77e2c0038b..4b121fb0fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-06-05 Bruno Haible + + lib-symbol-visibility: Make configure check work for newer GCC. + Reported by Ozkan Sezer in + . + * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each + declaration in the test program. + 2021-06-05 Bruno Haible vasnprintf: Don't leak memory when memory allocation fails. diff --git a/m4/visibility.m4 b/m4/visibility.m4 index 8f27a122df..d161bd7f72 100644 --- a/m4/visibility.m4 +++ b/m4/visibility.m4 @@ -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) {} ]], [[]])],