在 /usr/include/iso/time_iso.h 中找到:
struct tm { /* see ctime(3) */
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
# grep "struct tm" /usr/include/sys/*.h
/usr/include/sys/lc_core.h:struct tm;
/usr/include/sys/lc_core.h: const struct tm *);
/usr/include/sys/lc_core.h: struct tm *);
/usr/include/sys/lc_core.h: struct tm *(*getdate)(_LC_time_t *, const char *);
/usr/include/sys/lc_core.h: const char *, const struct tm *);
/usr/include/sys/times.h:struct tms {
/usr/include/sys/times.h:struct tms32 {
/usr/include/sys/times.h:clock_t times(struct tms *);
# grep "struct tm" /usr/include/*.h
/usr/include/hbaapi.h:#include <time.h> /* Needed for struct tm */
/usr/include/hbaapi.h: struct tm build_date;
/usr/include/ima.h:typedef struct tm IMA_DATETIME;
/usr/include/png.h: * Two conversions are provided, both from time_t and struct tm. There
/usr/include/png.h:/* Convert from a struct tm to png_time */
/usr/include/png.h: struct tm FAR * ttime));
/usr/include/time.h:extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD,
/usr/include/time.h: struct tm *_RESTRICT_KYWD);
/usr/include/time.h:extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD,
/usr/include/time.h: struct tm *_RESTRICT_KYWD);
/usr/include/time.h:extern char *__strptime_dontzero(const char *, const char *, struct tm *);
/usr/include/time.h: struct tm *_RESTRICT_KYWD);
/usr/include/time.h:extern int ascftime(char *, const char *, const struct tm *);
/usr/include/time.h:extern struct tm *getdate(const char *);
/usr/include/time.h:extern struct tm *gmtime_r();
/usr/include/time.h:extern struct tm *localtime_r();
/usr/include/time.h:extern struct tm *getdate();
/usr/include/time.h:extern char *asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
/usr/include/time.h:extern char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD,
/usr/include/time.h:asctime_r(const struct tm *_RESTRICT_KYWD __tm, char *_RESTRICT_KYWD __buf)
/usr/include/time.h:extern char *asctime_r(const struct tm *, char *, int);
/usr/include/time.h: struct tm *__tm;
【 在 jiangjun2000 (%d) 的大作中提到: 】
: 你得找到struct tm的定义
--
FROM 121.31.118.*