1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* dir.c (glob_helper): C99(gcc)-ism.

* time.c (find_time_t): GUESS macro needs the variable named ``result''
	  always.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2009-04-22 01:40:09 +00:00
parent d5704eb61a
commit 8da932fe46
3 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Wed Apr 22 10:38:47 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* dir.c (glob_helper): C99(gcc)-ism.
* time.c (find_time_t): GUESS macro needs the variable named ``result''
always.
Wed Apr 22 09:27:31 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* time.c (localtime_with_gmtoff): fixed cross function jump.

3
dir.c
View file

@ -1267,8 +1267,9 @@ glob_helper(
if (magical || recursive) {
struct dirent *dp;
DIR *dirp;
IF_HAVE_READDIR_R(struct dirent entry);
DIR *dirp = do_opendir(*path ? path : ".", flags);
dirp = do_opendir(*path ? path : ".", flags);
if (dirp == NULL) return 0;
while (READDIR(dirp, enc, &entry, dp)) {

2
time.c
View file

@ -1534,7 +1534,7 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp)
struct tm *tm, tm_lo, tm_hi;
int d, have_guess;
int find_dst;
IF_HAVE_GMTIME_R(struct tm result);
struct tm result;
#define GUESS(p) (utc_p ? gmtime_with_leapsecond(p, &result) : LOCALTIME(p, result))
find_dst = 0 < tptr->tm_isdst;