From: Bruno Haible Date: Sun, 9 Aug 2009 14:39:05 +0000 (+0200) Subject: Fix a compilation error on deficient non-glibc systems with GCC 4. X-Git-Tag: v0.18~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae44ff362ab6a44ee09b4c0985d471e1f20c0e6;p=thirdparty%2Fgettext.git Fix a compilation error on deficient non-glibc systems with GCC 4. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 0eabe4f0a..756d3613c 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,11 @@ +2009-08-09 Bruno Haible + + Fix a compilation error on non-glibc systems that have gcc visibility + support but deficient *printf functions. + * printf.c (DLL_EXPORTED): Define to non-empty also when + HAVE_VISIBILITY is true. + Reported at . + 2009-06-06 Bruno Haible Interoperate with automake-1.11 provided --enable-silent-rules option. diff --git a/gettext-runtime/intl/printf.c b/gettext-runtime/intl/printf.c index 0088e5195..754851404 100644 --- a/gettext-runtime/intl/printf.c +++ b/gettext-runtime/intl/printf.c @@ -1,5 +1,5 @@ /* Formatted output to strings, using POSIX/XSI format strings with positions. - Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it @@ -60,7 +60,9 @@ char *alloca (); /* When building a DLL, we must export some functions. Note that because the functions are only defined for binary backward compatibility, we don't need to use __declspec(dllimport) in any case. */ -#if defined _MSC_VER && BUILDING_DLL +#if HAVE_VISIBILITY && BUILDING_DLL +# define DLL_EXPORTED __attribute__((__visibility__("default"))) +#elif defined _MSC_VER && BUILDING_DLL # define DLL_EXPORTED __declspec(dllexport) #else # define DLL_EXPORTED