[PATCH] D66758: compiler-rt: all FreeBSD CPU archs except i386 use 64-bit time_t
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 12:10:53 PDT 2019
dim accepted this revision.
dim added inline comments.
This revision is now accepted and ready to land.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h:117
-#if defined(__LP64___)
+#if !defined(__i386__)
typedef long long __sanitizer_time_t;
----------------
devnexen wrote:
> The original seemed correct to me but maybe @dim would have another opinion.
On -CURRENT, even on e.g. 32 bit PowerPC or 32 bit MIPS, we use `__int64_t` for `__time_t`:
```sys/arm/include/_types.h
93:typedef __int64_t __time_t; /* time()... */
sys/arm64/include/_types.h
79:typedef __int64_t __time_t; /* time()... */
sys/mips/include/_types.h
122:typedef __int64_t __time_t; /* time()... */
sys/powerpc/include/_types.h
112:typedef __int64_t __time_t; /* time()... */
sys/riscv/include/_types.h
79:typedef __int64_t __time_t; /* time()... */
sys/sparc64/include/_types.h
81:typedef __int64_t __time_t; /* time()... */
sys/x86/include/_types.h
108:typedef __int64_t __time_t; /* time()... */
117:typedef __int32_t __time_t;```
So unless we have int32_t/int64_t typedefs in these headers, the definition is ok like this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66758/new/
https://reviews.llvm.org/D66758
More information about the llvm-commits
mailing list