commit 9d3dc8f000d6d9a74ddd112a71321a688593a328 parent 6ad518e9af4d7b5fc3497582746867d1716ff6a6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 24 Apr 2026 17:48:22 +0200 libc/time: Fix CLOCKS_PER_SEC definition This definition was already in the sys.h file but this is a libc visible macro, so it should be placed in a public header. A previous commit by mistake just added the external definition and created a redefinition, and it also mistook in the value for bsd system. Diffstat:
16 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/include/scc/bits/darwin/amd64/arch/time.h b/include/scc/bits/darwin/amd64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 100) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/darwin/sys.h b/include/scc/bits/darwin/sys.h @@ -10,7 +10,6 @@ #define O_APPEND 0x00000008 #define AT_FDCWD -100 -#define CLOCKS_PER_SEC ((clock_t) 1000000) #define RUSAGE_SELF 0 #define F_OK 0 diff --git a/include/scc/bits/dragonfly/amd64/arch/time.h b/include/scc/bits/dragonfly/amd64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 100) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/dragonfly/sys.h b/include/scc/bits/dragonfly/sys.h @@ -10,7 +10,6 @@ #define O_APPEND 0x00000008 #define AT_FDCWD -100 -#define CLOCKS_PER_SEC ((clock_t) 128) #define RUSAGE_SELF 0 #define F_OK 0 diff --git a/include/scc/bits/freebsd/amd64/arch/time.h b/include/scc/bits/freebsd/amd64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 100) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/freebsd/sys.h b/include/scc/bits/freebsd/sys.h @@ -10,7 +10,6 @@ #define O_APPEND 0x00000008 #define AT_FDCWD -100 -#define CLOCKS_PER_SEC ((clock_t) 100) #define RUSAGE_SELF 0 #define F_OK 0 diff --git a/include/scc/bits/linux/amd64/arch/time.h b/include/scc/bits/linux/amd64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 1000000) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/linux/arm/arch/time.h b/include/scc/bits/linux/arm/arch/time.h @@ -1,3 +1,5 @@ +#define CLOCKS_PER_SEC ((clock_t) 1000000) + #define _MAXYEAR 2037 #define _MINYEAR 1902 #define _TIME_MAX LONG_MAX diff --git a/include/scc/bits/linux/arm64/arch/time.h b/include/scc/bits/linux/arm64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 1000000) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/linux/i386/arch/time.h b/include/scc/bits/linux/i386/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 1000000) #define _MAXYEAR 2037 #define _MINYEAR 1902 diff --git a/include/scc/bits/linux/ppc/arch/time.h b/include/scc/bits/linux/ppc/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 1000000) #define _MAXYEAR 2037 #define _MINYEAR 1902 diff --git a/include/scc/bits/linux/sys.h b/include/scc/bits/linux/sys.h @@ -10,7 +10,6 @@ #define O_CREAT 0x00000040 #define AT_FDCWD -100 -#define CLOCKS_PER_SEC ((clock_t) 1000000) #define RUSAGE_SELF 0 #define F_OK 0 diff --git a/include/scc/bits/netbsd/amd64/arch/time.h b/include/scc/bits/netbsd/amd64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 100) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/netbsd/sys.h b/include/scc/bits/netbsd/sys.h @@ -10,7 +10,6 @@ #define O_APPEND 0x00000008 #define AT_FDCWD -100 -#define CLOCKS_PER_SEC ((clock_t) 100) #define RUSAGE_SELF 0 #define F_OK 0 diff --git a/include/scc/bits/openbsd/amd64/arch/time.h b/include/scc/bits/openbsd/amd64/arch/time.h @@ -1,4 +1,4 @@ -#define CLOCKS_PER_SEC 1000000 +#define CLOCKS_PER_SEC ((clock_t) 100) #define _MAXYEAR 99999 #define _MINYEAR -99999 diff --git a/include/scc/bits/openbsd/sys.h b/include/scc/bits/openbsd/sys.h @@ -10,7 +10,6 @@ #define O_APPEND 0x00000008 #define AT_FDCWD -100 -#define CLOCKS_PER_SEC ((clock_t) 100) #define RUSAGE_SELF 0 #define F_OK 0