ruby-changes:7214
From: usa <ko1@a...>
Date: Thu, 21 Aug 2008 00:50:42 +0900 (JST)
Subject: [ruby-changes:7214] Ruby:r18733 (trunk): * strftime.c: win32 support.
usa 2008-08-21 00:50:21 +0900 (Thu, 21 Aug 2008) New Revision: 18733 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18733 Log: * strftime.c: win32 support. Modified files: trunk/ChangeLog trunk/strftime.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18732) +++ ChangeLog (revision 18733) @@ -1,3 +1,7 @@ +Thu Aug 21 00:49:50 2008 NAKAMURA Usaku <usa@r...> + + * strftime.c: win32 support. + Thu Aug 21 00:20:05 2008 Shugo Maeda <shugo@r...> * strftime.c: new file. Index: strftime.c =================================================================== --- strftime.c (revision 18732) +++ strftime.c (revision 18733) @@ -57,8 +57,10 @@ #endif #if defined(TM_IN_SYS_TIME) || !defined(GAWK) && !defined(_WIN32_WCE) #include <sys/types.h> +#if HAVE_SYS_TIME_H #include <sys/time.h> #endif +#endif /* defaults: season to taste */ #define SYSV_EXT 1 /* stuff in System V ascftime routine */ @@ -94,13 +96,11 @@ #undef strchr /* avoid AIX weirdness */ -#ifndef __STDC__ +#if !defined __STDC__ && !defined _WIN32 #define const /**/ -extern void tzset(); static int weeknumber(); adddecl(static int iso8601wknum();) #else -extern void tzset(void); static int weeknumber(const struct tm *timeptr, int firstweekday); adddecl(static int iso8601wknum(const struct tm *timeptr);) #endif @@ -117,12 +117,9 @@ #define range(low, item, hi) max(low, min(item, hi)) -#ifdef __CYGWIN__ +#if defined __CYGWIN__ || defined __WIN32__ || defined _WIN32 #define DLL_IMPORT __declspec(dllimport) #endif -#ifdef __WIN32__ -#define DLL_IMPORT __declspec(dllimport) -#endif #ifndef DLL_IMPORT #define DLL_IMPORT #endif @@ -191,7 +188,9 @@ #ifndef HAVE_TM_ZONE #ifndef HAVE_TM_NAME struct timeval tv; +#ifdef HAVE_TIMEZONE struct timezone zone; +#endif /* HAVE_TIMEZONE */ #endif /* HAVE_TM_NAME */ #endif /* HAVE_TM_ZONE */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/