mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
e358888d5e
commit
700b778cbb
1 changed files with 3 additions and 4 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue