0
在编译OSX 10.6.5上的C程序时,我收到了一些警告,这似乎非常关键。在OSX上编译ctime和time警告
extras.c:15: warning: implicit declaration of function ‘time’
extras.c: In function ‘outlog’:
extras.c:363: warning: implicit declaration of function ‘ctime’
相应的线路如下:
行13-15:
RANDNUMGEN = gsl_rng_alloc(gsl_rng_taus);
long t1;
(void) time(&t1);
线360-363:
if (LOG==NULL) { LOG=stdout;}
TVAL = time(NULL);
char* TIMESTRING = ctime(&TVAL);
我相信该计划最初是为写Linux,所以我想知道time
和ctime
之间是否有差别wo平台?