From 00dc3157e5aad8ca5b8f76153d46ef2c24eab964 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sat, 26 Feb 2005 06:00:20 -0800 Subject: [PATCH] [svn] iFixes for compilation under MingW. By Gisle Vanem. --- src/ChangeLog | 5 +++++ src/mswindows.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c80da5a5..9c250660 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-02-26 Gisle Vanem + + * utils.c: Use the nnnLL syntax under GCC. Define struct_stat to + struct _stati64 under __MINGW32__ as well as under MS VC. + 2005-02-26 Hrvoje Niksic * utils.c: Use the nnnI64 syntax for __int64 constants under all diff --git a/src/mswindows.h b/src/mswindows.h index 0b795af4..08f0c84d 100644 --- a/src/mswindows.h +++ b/src/mswindows.h @@ -83,7 +83,12 @@ so, delete this exception statement from your version. */ /* Define a wgint type under Windows. */ typedef __int64 wgint; #define SIZEOF_WGINT 8 + +#ifdef __GNUC__ +#define WGINT_MAX 9223372036854775807LL +#else #define WGINT_MAX 9223372036854775807I64 +#endif #define str_to_wgint str_to_int64 __int64 str_to_int64 (const char *, char **, int); @@ -99,7 +104,7 @@ __int64 str_to_int64 (const char *, char **, int); # define fstat(fd, buf) _fstati64 (fd, buf) #endif -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__MINGW32__) # define struct_stat struct _stati64 #elif defined(__BORLANDC__) # define struct_stat struct stati64 -- 2.39.2