开发者

_USE_32BIT_TIME_T equivalent for gcc

on Visual studio I can force use of 32 bit time_t by d开发者_如何学Goeclaring _USE_32BIT_TIME_T is there a similar equivalent for gcc? or is it always 32 bit or is it always 64 bit?


The time_t type is not defined by gcc but rather by system library. On Linux, this is glibc, and it defines time_t in time.h header:

typedef __time_t time_t;

which is in turn defined in bits/types.h:

__STD_TYPE __TIME_T_TYPE __time_t;

(__STD_TYPE definition is not interesting),

__TIME_T_TYPE is defined in bits/typesizes.h:

#define __TIME_T_TYPE __SLONGWORD_TYPE

which is in turn defined in bits/types.h:

#define __SLONGWORD_TYPE long int

which is 32 bits on 32 bits system, 64 bits on 64 bits system. All these definitions are unconditional, so, no _USE_32BIT_TIME_T equivalent on glibc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜