This is an archive of the discontinued LLVM Phabricator instance.

compiler-rt: all FreeBSD CPU archs except i386 use 64-bit time_t
ClosedPublic

Authored by emaste on Aug 26 2019, 10:44 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

emaste created this revision.Aug 26 2019, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2019, 10:44 AM
Herald added a subscriber: dberris. · View Herald Transcript
devnexen added inline comments.Aug 27 2019, 1:01 AM
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
117 ↗(On Diff #217199)

The original seemed correct to me but maybe @dim would have another opinion.

dim accepted this revision.Aug 28 2019, 12:05 PM
dim added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
117 ↗(On Diff #217199)

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.

This revision is now accepted and ready to land.Aug 28 2019, 12:05 PM

You are right !

This revision was automatically updated to reflect the committed changes.