Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153426975
D56401.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D56401.diff
View Options
diff --git a/sys/arm/include/_types.h b/sys/arm/include/_types.h
--- a/sys/arm/include/_types.h
+++ b/sys/arm/include/_types.h
@@ -57,6 +57,7 @@
typedef __int32_t __register_t;
typedef __int32_t __segsz_t; /* segment size (in pages) */
typedef __int64_t __time_t; /* time()... */
+#define __SIZEOF_TIME_T 8
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
diff --git a/sys/arm64/include/_types.h b/sys/arm64/include/_types.h
--- a/sys/arm64/include/_types.h
+++ b/sys/arm64/include/_types.h
@@ -55,6 +55,7 @@
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __int64_t __time_t; /* time()... */
+#define __SIZEOF_TIME_T 8
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h
--- a/sys/powerpc/include/_types.h
+++ b/sys/powerpc/include/_types.h
@@ -66,6 +66,7 @@
typedef __int32_t __segsz_t; /* segment size (in pages) */
#endif
typedef __int64_t __time_t; /* time()... */
+#define __SIZEOF_TIME_T 8
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
diff --git a/sys/riscv/include/_types.h b/sys/riscv/include/_types.h
--- a/sys/riscv/include/_types.h
+++ b/sys/riscv/include/_types.h
@@ -51,6 +51,7 @@
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __int64_t __time_t; /* time()... */
+#define __SIZEOF_TIME_T 8
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
diff --git a/sys/sys/time.h b/sys/sys/time.h
--- a/sys/sys/time.h
+++ b/sys/sys/time.h
@@ -355,7 +355,7 @@
static __inline sbintime_t
tstosbt_sat(struct timespec _ts)
{
-#ifndef __i386__
+#if __SIZEOF_TIME_T > 4
if (_ts.tv_sec > SBT_MAX >> 32)
return (SBT_MAX);
if (_ts.tv_sec < -(SBT_MAX >> 32) - 1)
@@ -384,7 +384,7 @@
static __inline sbintime_t
tvtosbt_sat(struct timeval _tv)
{
-#ifndef __i386__
+#if __SIZEOF_TIME_T > 4
if (_tv.tv_sec > SBT_MAX >> 32)
return (SBT_MAX);
if (_tv.tv_sec < -(SBT_MAX >> 32) - 1)
diff --git a/sys/x86/include/_types.h b/sys/x86/include/_types.h
--- a/sys/x86/include/_types.h
+++ b/sys/x86/include/_types.h
@@ -71,10 +71,12 @@
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __int64_t __time_t; /* time()... */
+#define __SIZEOF_TIME_T 8
#else
typedef __int32_t __register_t;
typedef __int32_t __segsz_t;
typedef __int32_t __time_t;
+#define __SIZEOF_TIME_T 4
#endif
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 2:50 AM (12 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31746301
Default Alt Text
D56401.diff (2 KB)
Attached To
Mode
D56401: sys/time: rework saturation ifdef to avoid direct arch ref
Attached
Detach File
Event Timeline
Log In to Comment