This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] S390: Fix sem.h conformance test failures.
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 07 Jul 2015 12:31:14 +0200
- Subject: [PATCH] S390: Fix sem.h conformance test failures.
- Authentication-results: sourceware.org; auth=none
Hi,
on s390 the following tests are failing:
FAIL: conform/UNIX98/sys/sem.h/conform
FAIL: conform/XOPEN2K/sys/sem.h/conform
FAIL: conform/XOPEN2K8/sys/sem.h/conform
FAIL: conform/XPG3/sys/sem.h/conform
FAIL: conform/XPG4/sys/sem.h/conform
The test out files report:
...
Testing for type of member sem_otime... FAIL
Member "sem_otime" does not have the correct type. Compiler message:
-----------------------------------------------------------------------
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:3:1: error:
unknown type name âtime_tâ
extern time_t b;
^
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:4:33: error:
conflicting types for âbâ
extern __typeof__ (a.sem_otime) b;
^
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:3:15: note:
previous declaration of âbâ was here
extern time_t b;
^
-----------------------------------------------------------------------
...
Testing for type of member sem_ctime... FAIL
Member "sem_ctime" does not have the correct type. Compiler message:
-----------------------------------------------------------------------
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:3:1: error:
unknown type name âtime_tâ
extern time_t b;
^
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:4:33: error:
conflicting types for âbâ
extern __typeof__ (a.sem_ctime) b;
^
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:3:15: note:
previous declaration of âbâ was here
extern time_t b;
^
-----------------------------------------------------------------------
...
Testing for type pid_t... FAIL
Type "pid_t" not available. Compiler message:
-----------------------------------------------------------------------
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:2:1: error:
unknown type name âpid_tâ
pid_t *a;
^
-----------------------------------------------------------------------
Testing for type time_t... FAIL
Type "time_t" not available. Compiler message:
-----------------------------------------------------------------------
conform/UNIX98/sys/sem.h/scratch/sys-sem.h-test.c:2:1: error:
unknown type name âtime_tâ
time_t *a;
^
-----------------------------------------------------------------------
This patch changes the s390 specific sem.h and includes sys/types.h
instead of bits/types.h. All other archs include sys/types.h, too.
Including bits/wordsize.h is obselete, because it is already inlcuded in
sys/types.h -> bits/types.h.
The conformance tests are passing now on s390/s390x.
Ok for commit?
Bye
Stefan
---
2015-07-07 Stefan Liebler <stli@linux.vnet.ibm.com>
* sysdeps/unix/sysv/linux/s390/bits/sem.h:
Include sys/types.h instead of bits/types.h.
Remove inclusion of bits/wordsize.h.
diff --git a/sysdeps/unix/sysv/linux/s390/bits/sem.h b/sysdeps/unix/sysv/linux/s390/bits/sem.h
index 9f8cd47..2e12eff 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/sem.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/sem.h
@@ -19,8 +19,7 @@
# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
#endif
-#include <bits/types.h>
-#include <bits/wordsize.h>
+#include <sys/types.h>
/* Flags for `semop'. */
#define SEM_UNDO 0x1000 /* undo the operation on exit */