move time64 socket options from arch bits to top-level sys/socket.h
authorRich Felker <dalias@aerifal.cx>
Sat, 2 Nov 2019 00:11:08 +0000 (20:11 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 2 Nov 2019 22:30:56 +0000 (18:30 -0400)
now that all 32-bit archs have 64-bit time types, the values for the
time-related socket option macros can be treated as universal for
32-bit archs. the sys/socket.h mechanism for this predates
arch/generic and is instead in the top-level header.

x32, which does not use the new time64 values of the macros, already
has its own overrides, so this commit does not affect it.

arch/arm/bits/socket.h [deleted file]
arch/i386/bits/socket.h [deleted file]
arch/m68k/bits/socket.h [deleted file]
arch/microblaze/bits/socket.h [deleted file]
arch/mips/bits/socket.h
arch/mipsn32/bits/socket.h
arch/or1k/bits/socket.h [deleted file]
arch/powerpc/bits/socket.h
arch/sh/bits/socket.h [deleted file]
include/sys/socket.h

diff --git a/arch/arm/bits/socket.h b/arch/arm/bits/socket.h
deleted file mode 100644 (file)
index 4d1f645..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
diff --git a/arch/i386/bits/socket.h b/arch/i386/bits/socket.h
deleted file mode 100644 (file)
index 4d1f645..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
diff --git a/arch/m68k/bits/socket.h b/arch/m68k/bits/socket.h
deleted file mode 100644 (file)
index 4d1f645..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
diff --git a/arch/microblaze/bits/socket.h b/arch/microblaze/bits/socket.h
deleted file mode 100644 (file)
index 4d1f645..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
index 4ffc4d4a2b699fa19d2ab0c3bcb4d175a203e436..02fbb88b4d25f0e23f882e9d39d48a958f428dc9 100644 (file)
 #define SO_ACCEPTCONN   0x1009
 #define SO_PROTOCOL     0x1028
 #define SO_DOMAIN       0x1029
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
 
 #define SO_NO_CHECK     11
 #define SO_PRIORITY     12
index 4ffc4d4a2b699fa19d2ab0c3bcb4d175a203e436..02fbb88b4d25f0e23f882e9d39d48a958f428dc9 100644 (file)
 #define SO_ACCEPTCONN   0x1009
 #define SO_PROTOCOL     0x1028
 #define SO_DOMAIN       0x1029
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
 
 #define SO_NO_CHECK     11
 #define SO_PRIORITY     12
diff --git a/arch/or1k/bits/socket.h b/arch/or1k/bits/socket.h
deleted file mode 100644 (file)
index 4d1f645..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
index e5fa0f7ad129e01f9ce11fb4094afcfcee769035..b19ed42bfa9013cea272f2b85fa720ab4c7bb14b 100644 (file)
@@ -23,8 +23,3 @@
 #define SO_RCVBUFFORCE  33
 #define SO_PROTOCOL     38
 #define SO_DOMAIN       39
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
diff --git a/arch/sh/bits/socket.h b/arch/sh/bits/socket.h
deleted file mode 100644 (file)
index 4d1f645..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define SO_TIMESTAMP    63
-#define SO_TIMESTAMPNS  64
-#define SO_TIMESTAMPING 65
-#define SO_RCVTIMEO     66
-#define SO_SNDTIMEO     67
index 4ea7be1edc5a0253ffcf88d64123b11f6c7ed5bf..a1c0b01c147c69fce17928b5b72b32329b0b6209 100644 (file)
@@ -225,15 +225,26 @@ struct linger {
 #endif
 
 #ifndef SO_RCVTIMEO
+#if __LONG_MAX == 0x7fffffff
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
+#else
 #define SO_RCVTIMEO     20
 #define SO_SNDTIMEO     21
 #endif
+#endif
 
 #ifndef SO_TIMESTAMP
+#if __LONG_MAX == 0x7fffffff
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#else
 #define SO_TIMESTAMP    29
 #define SO_TIMESTAMPNS  35
 #define SO_TIMESTAMPING 37
 #endif
+#endif
 
 #define SO_SECURITY_AUTHENTICATION              22
 #define SO_SECURITY_ENCRYPTION_TRANSPORT        23