summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-06-21 17:41:53 +0100
committerNeil Jerram <neil@ossau.uklinux.net>2009-06-21 17:46:07 +0100
commit0367cb9d56601b627b361191d0a6e7e3892f1de7 (patch)
tree3bbc1b826365e7bb65efac32c6a358b9bb4f8ebe
parenta5cb5305027f5850db3f26a8094aea608a2db19c (diff)
downloadguile-0367cb9d56601b627b361191d0a6e7e3892f1de7.tar.gz
Fix MinGW build warning caused by tzname redeclaration
The warning is: stime.c:85: warning: `tzname' redeclared without dllimport attribute: previous dllimport ignored The second half of this section of #ifdefery implies that the MinGW build isn't going to reference a function called `tzname' anyway (because it's going to use `_tzname' instead). So why should a MinGW build want any declaration of `tzname' at all? As far as a declaration of `_tzname' is concerned, there are no more #includes after this, so we must have already got a declaration of `_tzname' from one of the preceding includes. * libguile/stime.c (tzname): Remove declaration in __MINGW32__ build. It isn't needed and causes a build warning.
-rw-r--r--libguile/stime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/stime.c b/libguile/stime.c
index bf5b9ff0c..31435c910 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -80,11 +80,12 @@
#include <crt_externs.h> /* for Darwin _NSGetEnviron */
#endif
+#if defined (__MINGW32__)
+# define tzname _tzname
+#else
#ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif
-#if defined (__MINGW32__)
-# define tzname _tzname
#endif
#if ! HAVE_DECL_STRPTIME