about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-11-01 20:22:41 -0400
committerRich Felker <dalias@aerifal.cx>2019-11-02 18:30:56 -0400
commitb60fdf133c033d4ad6b04a8237f253563fae5928 (patch)
tree57b2e9aac0bc4b00c10415f16a6b34ce41d427c2
parentc71dbb24c947dc14f43960bfec4da670fccba580 (diff)
downloadmusl-b60fdf133c033d4ad6b04a8237f253563fae5928.tar.gz
musl-b60fdf133c033d4ad6b04a8237f253563fae5928.tar.xz
musl-b60fdf133c033d4ad6b04a8237f253563fae5928.zip
move time64 ioctl numbers to generic bits/ioctl.h
now that all 32-bit archs have 64-bit time types, the values for the
time-related ioctls can be shared. the mechanism for this is an
arch/generic version of the bits header. archs which don't use the
generic header still need to duplicate the definitions.

x32, which does not use the new time64 values of the macros, already
has its own overrides, so this commit does not affect it.
-rw-r--r--arch/arm/bits/ioctl_fix.h5
-rw-r--r--arch/generic/bits/ioctl.h5
-rw-r--r--arch/i386/bits/ioctl_fix.h4
-rw-r--r--arch/m68k/bits/ioctl_fix.h4
-rw-r--r--arch/microblaze/bits/ioctl_fix.h4
-rw-r--r--arch/or1k/bits/ioctl_fix.h4
6 files changed, 5 insertions, 21 deletions
diff --git a/arch/arm/bits/ioctl_fix.h b/arch/arm/bits/ioctl_fix.h
index dfa18866..ebb383da 100644
--- a/arch/arm/bits/ioctl_fix.h
+++ b/arch/arm/bits/ioctl_fix.h
@@ -1,7 +1,2 @@
 #undef FIOQSIZE
 #define FIOQSIZE 0x545e
-
-#undef SIOCGSTAMP
-#undef SIOCGSTAMPNS
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
diff --git a/arch/generic/bits/ioctl.h b/arch/generic/bits/ioctl.h
index d1a6c035..60ae8b85 100644
--- a/arch/generic/bits/ioctl.h
+++ b/arch/generic/bits/ioctl.h
@@ -104,7 +104,12 @@
 #define FIOGETOWN       0x8903
 #define SIOCGPGRP       0x8904
 #define SIOCATMARK      0x8905
+#if __LONG_MAX == 0x7fffffff
+#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
+#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
+#else
 #define SIOCGSTAMP      0x8906
 #define SIOCGSTAMPNS    0x8907
+#endif
 
 #include <bits/ioctl_fix.h>
diff --git a/arch/i386/bits/ioctl_fix.h b/arch/i386/bits/ioctl_fix.h
deleted file mode 100644
index 29c9d8ba..00000000
--- a/arch/i386/bits/ioctl_fix.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#undef SIOCGSTAMP
-#undef SIOCGSTAMPNS
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
diff --git a/arch/m68k/bits/ioctl_fix.h b/arch/m68k/bits/ioctl_fix.h
deleted file mode 100644
index 29c9d8ba..00000000
--- a/arch/m68k/bits/ioctl_fix.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#undef SIOCGSTAMP
-#undef SIOCGSTAMPNS
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
diff --git a/arch/microblaze/bits/ioctl_fix.h b/arch/microblaze/bits/ioctl_fix.h
deleted file mode 100644
index 29c9d8ba..00000000
--- a/arch/microblaze/bits/ioctl_fix.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#undef SIOCGSTAMP
-#undef SIOCGSTAMPNS
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
diff --git a/arch/or1k/bits/ioctl_fix.h b/arch/or1k/bits/ioctl_fix.h
deleted file mode 100644
index 29c9d8ba..00000000
--- a/arch/or1k/bits/ioctl_fix.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#undef SIOCGSTAMP
-#undef SIOCGSTAMPNS
-#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
-#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])