summaryrefslogtreecommitdiff
path: root/ext/date/date_strftime.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 20:29:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 20:29:53 +0000
commit700b778cbb6b718069504cdfe2240c9c01176835 (patch)
tree6b5b195f3865a83246b189288f91f913b360883f /ext/date/date_strftime.c
parente358888d5e22344429ee7d5589b5053e0a817afd (diff)
time(3)'s argument and return value is time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_strftime.c')
-rw-r--r--ext/date/date_strftime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c
index 774d8ac..4774137 100644
--- a/ext/date/date_strftime.c
+++ b/ext/date/date_strftime.c
@@ -1134,6 +1134,7 @@ How nicer it depends on a compiler, of course, but always a tiny bit.
#ifndef NULL
#include <stdio.h>
#endif
+#include <time.h>
#include <sys/time.h>
#include <string.h>
@@ -1191,8 +1192,6 @@ main(argc, argv)
int argc;
char **argv;
{
- long time();
-
char *next;
char string[MAXTIME];
@@ -1201,11 +1200,11 @@ char **argv;
struct tm *tm;
- long clock;
+ time_t clock;
/* Call the function. */
- clock = time((long *) 0);
+ clock = time(NULL);
tm = localtime(&clock);
for (k = 0; next = array[k]; k++) {