From: Bruno Haible Date: Sun, 24 Aug 2003 17:39:36 +0000 (+0000) Subject: Fix for compilation with MSVC. X-Git-Tag: v0.13~314 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d358c626af756662477bb37e8826277062814651;p=thirdparty%2Fgettext.git Fix for compilation with MSVC. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index e80376242..2db8f9439 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -5,6 +5,8 @@ 2003-08-24 Bruno Haible + * error.h: Use ANSI C "..." declarations when compiling with MSVC, even + though it doesn't define __STDC__ by default. * error.c: Use when compiling with MSVC, even though it doesn't define __STDC__ by default. diff --git a/gettext-tools/lib/error.h b/gettext-tools/lib/error.h index b504ab288..5feacd020 100644 --- a/gettext-tools/lib/error.h +++ b/gettext-tools/lib/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. @@ -40,7 +40,7 @@ extern "C" { #endif -#if defined (__STDC__) && __STDC__ +#if (defined (__STDC__) && __STDC__) || defined _MSC_VER /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). @@ -56,20 +56,20 @@ extern void error_at_line (int status, int errnum, const char *fname, /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ -extern void (*error_print_progname) (void); +extern DLL_VARIABLE void (*error_print_progname) (void); #else void error (); void error_at_line (); -extern void (*error_print_progname) (); +extern DLL_VARIABLE void (*error_print_progname) (); #endif /* This variable is incremented each time `error' is called. */ -extern unsigned int error_message_count; +extern DLL_VARIABLE unsigned int error_message_count; /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ -extern int error_one_per_line; +extern DLL_VARIABLE int error_one_per_line; #ifdef __cplusplus }