Kouhei Sutou
null+****@clear*****
Wed Jul 25 11:47:03 JST 2018
Kouhei Sutou 2018-07-25 11:47:03 +0900 (Wed, 25 Jul 2018) New Revision: cb236c9bc1e267dedb1953dd972f3362b59f9bcc https://github.com/groonga/groonga/commit/cb236c9bc1e267dedb1953dd972f3362b59f9bcc Message: windows time: stop to use _mkgmtime() on 32bit MinGW It's not supported. Modified files: plugins/functions/time.c Modified: plugins/functions/time.c (+9 -2) =================================================================== --- plugins/functions/time.c 2018-07-25 11:26:28 +0900 (dab8435db) +++ plugins/functions/time.c 2018-07-25 11:47:03 +0900 (7fb3cdfce) @@ -31,7 +31,14 @@ #include <time.h> #ifdef WIN32 -# define timegm _mkgmtime +# if defined(__GNUC__) && defined(__i386__) + /* 32bit MinGW doesn't provide _mkgmtime(). */ +# else /* defined(__GNUC__) && defined(__i386__) */ +# define timegm _mkgmtime +# define HAVE_TIMEGM +# endif /* defined(__GNUC__) && defined(__i386__) */ +#else /* WIN32 */ +# define HAVE_TIMEGM #endif /* WIN32 */ typedef enum { @@ -541,7 +548,7 @@ func_time_format_iso8601(grn_ctx *ctx, int n_args, grn_obj **args, "%+03d:%02d", (int32_t)(tm.tm_gmtoff / 3600), abs(tm.tm_gmtoff % 3600)); -#else +#elif defined(HAVE_TIMEGM) /* HAVE_STRUCT_TM_TM_GMTOFF */ { time_t gmtoff = timegm(&tm) - time_sec; grn_text_printf(ctx, -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180725/48c55489/attachment-0001.htm