Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
65678f11
Commit
65678f11
authored
Apr 14, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2058 from cremno/mruby-time-more-portable
mruby-time: two small changes for portability
parents
382aed8a
06a946ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mrbgems/mruby-time/src/time.c
mrbgems/mruby-time/src/time.c
+2
-2
No files found.
mrbgems/mruby-time/src/time.c
View file @
65678f11
...
@@ -86,7 +86,7 @@ gettimeofday(struct timeval *tv, void *tz)
...
@@ -86,7 +86,7 @@ gettimeofday(struct timeval *tv, void *tz)
#endif
#endif
#ifdef NO_GMTIME_R
#ifdef NO_GMTIME_R
#define gmtime_r(t,r) gmtime(t)
#define gmtime_r(t,r) gmtime(t)
#define localtime_r(t,r)
(tzset(),localtime(t)
)
#define localtime_r(t,r)
localtime(t
)
#endif
#endif
#ifndef USE_SYSTEM_TIMEGM
#ifndef USE_SYSTEM_TIMEGM
...
@@ -293,7 +293,7 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
...
@@ -293,7 +293,7 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
else
{
else
{
nowsecs
=
mktime
(
&
nowtime
);
nowsecs
=
mktime
(
&
nowtime
);
}
}
if
(
nowsecs
<
0
)
{
if
(
nowsecs
==
(
time_t
)
-
1
)
{
mrb_raise
(
mrb
,
E_ARGUMENT_ERROR
,
"Not a valid time."
);
mrb_raise
(
mrb
,
E_ARGUMENT_ERROR
,
"Not a valid time."
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment