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
aae293a0
Commit
aae293a0
authored
May 08, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename macros NO_USE_ -> NO_
parent
de262d5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/time.c
src/time.c
+7
-7
No files found.
src/time.c
View file @
aae293a0
...
...
@@ -17,17 +17,17 @@
/* gettimeofday(2) */
/* C99 does not have gettimeofday that is required to retrieve microseconds */
/* uncomment following macro on platforms without gettimeofday(2) */
/* #define NO_
USE_
GETTIMEOFDAY */
/* #define NO_GETTIMEOFDAY */
/* gmtime(3) */
/* C99 does not have reentrant gmtime_r() so it might cause troubles under */
/* multi-threading environment. undef following macro on platforms that */
/* does not have gmtime_r() and localtime_r(). */
/* #define NO_
USE_
GMTIME_R */
/* #define NO_GMTIME_R */
#ifdef _WIN32
/* unfortunately Win32 platform do not provide gmtime_r/localtime_r */
#define NO_
USE_
GMTIME_R
#define NO_GMTIME_R
#endif
/* timegm(3) */
...
...
@@ -37,10 +37,10 @@
/** end of Time class configuration */
#ifndef NO_
USE_
GETTIMEOFDAY
#ifndef NO_GETTIMEOFDAY
#include <sys/time.h>
#endif
#ifndef NO_
USE_
GMTIME_R
#ifndef NO_GMTIME_R
#define gmtime_r(t,r) gmtime(t)
#define localtime_r(t,r) (tzset(),localtime(t))
#endif
...
...
@@ -138,7 +138,7 @@ mrb_time_update_datetime(struct mrb_time *self)
aid
=
localtime_r
(
&
self
->
sec
,
&
self
->
datetime
);
}
if
(
!
aid
)
return
NULL
;
#ifndef NO_
USE_
GMTIME_R
#ifndef NO_GMTIME_R
self
->
datetime
=
*
aid
;
// copy data
#endif
...
...
@@ -179,7 +179,7 @@ current_time(mrb_state *mrb)
struct
mrb_time
*
tm
;
tm
=
mrb_malloc
(
mrb
,
sizeof
(
*
tm
));
#ifdef NO_
USE_
GETTIMEOFDAY
#ifdef NO_GETTIMEOFDAY
tm
->
sec
=
time
(
NULL
);
tm
->
usec
=
0
;
#else
...
...
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