From c3549ab805260a7679bc6459612904a3cf3b8ab1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 5 Jun 2021 17:07:06 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ m4/visibility.m4 | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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) {} ]], [[]])], -- 2.39.5