about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-05-23 20:38:51 -0400
committerRich Felker <dalias@aerifal.cx>2013-05-23 20:38:51 -0400
commit5e642b5a2395893873affa2a121a694943b3f4e0 (patch)
tree8b54f0a6648160b91d42a3ad800c070bfaccf5ba
parent05453b37fc0343e53bc7f332047e901b3e1abb84 (diff)
downloadmusl-5e642b5a2395893873affa2a121a694943b3f4e0.tar.gz
musl-5e642b5a2395893873affa2a121a694943b3f4e0.tar.xz
musl-5e642b5a2395893873affa2a121a694943b3f4e0.zip
change underlying type of clock_t to be uniform and match ABI
previously we were using an unsigned type on 32-bit systems so that
subtraction would be well-defined when it wrapped, but since wrapping
is non-conforming anyway (when clock() overflows, it has to return -1)
the only use of unsigned would be to buy a little bit more time before
overflow. this does not seem worth having the type vary per-arch
(which leads to more arch-specific bugs) or disagree with the ABI musl
(mostly) follows.
-rwxr-xr-xarch/arm/bits/alltypes.h.sh2
-rwxr-xr-xarch/i386/bits/alltypes.h.sh2
-rwxr-xr-xarch/microblaze/bits/alltypes.h.sh2
-rwxr-xr-xarch/mips/bits/alltypes.h.sh2
-rwxr-xr-xarch/powerpc/bits/alltypes.h.sh2
5 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/bits/alltypes.h.sh b/arch/arm/bits/alltypes.h.sh
index c1db1a0c..62e0327c 100755
--- a/arch/arm/bits/alltypes.h.sh
+++ b/arch/arm/bits/alltypes.h.sh
@@ -104,7 +104,7 @@ TYPEDEF unsigned long long fsfilcnt_t;
 
 TYPEDEF void * timer_t;
 TYPEDEF int clockid_t;
-TYPEDEF unsigned long clock_t;
+TYPEDEF long clock_t;
 
 TYPEDEF struct { unsigned long __bits[128/sizeof(long)]; } sigset_t;
 TYPEDEF struct __siginfo siginfo_t;
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh
index aec73731..76c50ec1 100755
--- a/arch/i386/bits/alltypes.h.sh
+++ b/arch/i386/bits/alltypes.h.sh
@@ -117,7 +117,7 @@ TYPEDEF unsigned long long fsfilcnt_t;
 
 TYPEDEF void * timer_t;
 TYPEDEF int clockid_t;
-TYPEDEF unsigned long clock_t;
+TYPEDEF long clock_t;
 
 TYPEDEF struct { unsigned long __bits[128/sizeof(long)]; } sigset_t;
 TYPEDEF struct __siginfo siginfo_t;
diff --git a/arch/microblaze/bits/alltypes.h.sh b/arch/microblaze/bits/alltypes.h.sh
index 23f12d8e..268321a1 100755
--- a/arch/microblaze/bits/alltypes.h.sh
+++ b/arch/microblaze/bits/alltypes.h.sh
@@ -104,7 +104,7 @@ TYPEDEF unsigned long long fsfilcnt_t;
 
 TYPEDEF void * timer_t;
 TYPEDEF int clockid_t;
-TYPEDEF unsigned long clock_t;
+TYPEDEF long clock_t;
 
 TYPEDEF struct { unsigned long __bits[128/sizeof(long)]; } sigset_t;
 TYPEDEF struct __siginfo siginfo_t;
diff --git a/arch/mips/bits/alltypes.h.sh b/arch/mips/bits/alltypes.h.sh
index 23f12d8e..268321a1 100755
--- a/arch/mips/bits/alltypes.h.sh
+++ b/arch/mips/bits/alltypes.h.sh
@@ -104,7 +104,7 @@ TYPEDEF unsigned long long fsfilcnt_t;
 
 TYPEDEF void * timer_t;
 TYPEDEF int clockid_t;
-TYPEDEF unsigned long clock_t;
+TYPEDEF long clock_t;
 
 TYPEDEF struct { unsigned long __bits[128/sizeof(long)]; } sigset_t;
 TYPEDEF struct __siginfo siginfo_t;
diff --git a/arch/powerpc/bits/alltypes.h.sh b/arch/powerpc/bits/alltypes.h.sh
index 7d3cdc36..5fe05e27 100755
--- a/arch/powerpc/bits/alltypes.h.sh
+++ b/arch/powerpc/bits/alltypes.h.sh
@@ -104,7 +104,7 @@ TYPEDEF unsigned long long fsfilcnt_t;
 
 TYPEDEF void * timer_t;
 TYPEDEF int clockid_t;
-TYPEDEF unsigned long clock_t;
+TYPEDEF long clock_t;
 
 TYPEDEF struct { unsigned long __bits[128/sizeof(long)]; } sigset_t;
 TYPEDEF struct __siginfo siginfo_t;