I'm be surprised to learn type long and time_t are 4-byte sized in this HP-UX 11.31(IA64). May I ask why?
My environment:
$ uname -a
HP-UX bdev1 B.11.31 U ia64 0999202893 unlimited-user license
$ cat /usr/include/sys/_time_t.h
......
# ifndef _TIME_T
# define _TIME_T
# ifdef _KERNEL
typedef int32_t time_t;
# else /* !_KERNEL */
_NAMESPACE_STD_START
typedef long time_t;
_NAMESPACE_STD_END
# endif /* !_KERNEL */
# endif /* _TIME_T */
My code:
$ cat sizeof.cpp
#include <iostream>
#include <ctime>
#define PRINT_SIZE(a) \
std::cout << #a << ": " << sizeof(a) << std::endl
int main(void)
{
PRINT_SIZE(long);
PRINT_SIZE(time_t);
return 0;
}
$ aCC sizeof.cpp
$ ./a.out
long: 4
time_t: 4
Anybody could help me to find a way making time_t to 64-bit by aCC?