diff --git a/headers/build/HaikuBuildCompatibility.h b/headers/build/HaikuBuildCompatibility.h index 7a852d4db9..1eeaf7a77e 100644 --- a/headers/build/HaikuBuildCompatibility.h +++ b/headers/build/HaikuBuildCompatibility.h @@ -300,8 +300,13 @@ typedef struct { # define B_PRIdINO B_PRId64 # define B_PRIiINO B_PRIi64 /* time_t */ -# define B_PRIdTIME B_PRId32 -# define B_PRIiTIME B_PRIi32 +# if defined(__i386__) && !defined(__x86_64__) +# define B_PRIdTIME B_PRId32 +# define B_PRIiTIME B_PRIi32 +# else +# define B_PRIdTIME B_PRId64 +# define B_PRIiTIME B_PRIi64 +# endif #endif // !B_PRId8 diff --git a/headers/os/support/SupportDefs.h b/headers/os/support/SupportDefs.h index db1ce576f0..f2533bb89e 100644 --- a/headers/os/support/SupportDefs.h +++ b/headers/os/support/SupportDefs.h @@ -176,8 +176,13 @@ typedef generic_addr_t generic_size_t; #define B_PRIiINO B_PRIi64 /* time_t */ -#define B_PRIdTIME B_PRId32 -#define B_PRIiTIME B_PRIi32 +#if defined(__i386__) && !defined(__x86_64__) +# define B_PRIdTIME B_PRId32 +# define B_PRIiTIME B_PRIi32 +#else +# define B_PRIdTIME B_PRId64 +# define B_PRIiTIME B_PRIi64 +#endif /* bigtime_t */ #define B_PRIdBIGTIME B_PRId64 diff --git a/headers/posix/time.h b/headers/posix/time.h index 08abda28f2..8ee6a61dfa 100644 --- a/headers/posix/time.h +++ b/headers/posix/time.h @@ -13,10 +13,15 @@ struct sigevent; /* defined in */ typedef __haiku_int32 clock_t; -typedef __haiku_int32 time_t; typedef __haiku_int32 suseconds_t; typedef __haiku_uint32 useconds_t; +#if defined(__i386__) && !defined(__x86_64__) +typedef __haiku_int32 time_t; +#else +typedef __haiku_int64 time_t; +#endif + #define CLOCKS_PER_SEC 1000000 #define CLK_TCK CLOCKS_PER_SEC diff --git a/headers/private/fs_shell/fssh_api_wrapper.h b/headers/private/fs_shell/fssh_api_wrapper.h index b7dbcfa3fb..233f8b49f7 100644 --- a/headers/private/fs_shell/fssh_api_wrapper.h +++ b/headers/private/fs_shell/fssh_api_wrapper.h @@ -1615,8 +1615,13 @@ #define B_PRIdINO FSSH_B_PRIdINO #define B_PRIiINO FSSH_B_PRIiINO /* time_t */ -#define B_PRIdTIME FSSH_B_PRId32 -#define B_PRIiTIME FSSH_B_PRIi32 +#if defined(__i386__) && !defined(__x86_64__) +# define B_PRIdTIME FSSH_B_PRId32 +# define B_PRIiTIME FSSH_B_PRIi32 +#else +# define B_PRIdTIME FSSH_B_PRId64 +# define B_PRIiTIME FSSH_B_PRIi64 +#endif ////////////////////////////////////////////////////////////////////////////////