[PATCH v2] sysv: linux: Add 64-bit time_t variant for shmctl
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Jul 10 17:49:01 GMT 2020
On 10/07/2020 14:13, Joseph Myers wrote:
> On Wed, 8 Jul 2020, Adhemerval Zanella via Libc-alpha wrote:
>
>> This is a small updated version that basically does:
>>
>> git mv include/sys/shm.h sysdeps/unix/sysv/linux/include/sys/shm.h
>>
>> It basically avoids a build failure on Hurd (since it does not provide
>> struct_shmid64_ds.h).
>
> The build failure for Hurd is still present if there are no previously
> installed headers (so "compilers" build with build-many-glibcs.py).
>
> https://sourceware.org/pipermail/libc-testresults/2020q3/006455.html
>
> In file included from programs/locarchive.c:40:
> ../include/sys/shm.h:1:15: fatal error: sys/shm.h: No such file or
> directory
> 1 | #include_next <sys/shm.h>
> | ^~~~~~~~~~~
>
> It's necessary to include the sysvipc/ path explicitly from include/,
> using #include_next won't work (or if it appears to work, will include a
> header from a previously installed glibc, not the one from the source
> tree). I think you should have bits/types/struct_shmid64_ds.h for Hurd,
> even if initially nothing actually uses that type for Hurd.
>
Would be better to just add a Hurd specific sys/{msg,sem,shm.h}.h that
includes sysvipc/sys/{msg,sem,shm}.h? I has the advantage of not tying any
possible sysvipc support hurd might add to an specific internal ABI (such
as to provide the time64 support) and make the Linux specific localized in
Linux sysdeps folders.
Something like:
diff --git a/sysdeps/hurd/include/sys/msg.h b/sysdeps/hurd/include/sys/msg.h
new file mode 100644
index 0000000000..0f8026dda1
--- /dev/null
+++ b/sysdeps/hurd/include/sys/msg.h
@@ -0,0 +1 @@
+#include <sysvipc/sys/msg.h>
diff --git a/sysdeps/hurd/include/sys/sem.h b/sysdeps/hurd/include/sys/sem.h
new file mode 100644
index 0000000000..b0fb201bd0
--- /dev/null
+++ b/sysdeps/hurd/include/sys/sem.h
@@ -0,0 +1 @@
+#include <sysvipc/sys/sem.h>
diff --git a/sysdeps/hurd/include/sys/shm.h b/sysdeps/hurd/include/sys/shm.h
new file mode 100644
index 0000000000..1878fcc5be
--- /dev/null
+++ b/sysdeps/hurd/include/sys/shm.h
@@ -0,0 +1 @@
+#include <sysvipc/sys/shm.h>
More information about the Libc-alpha
mailing list