S390: Fix sem.h conformance test failures.
Commit Message
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.
Comments
On Tue, 2015-07-07 at 12:31 +0200, Stefan Liebler wrote:
> 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.
LGTM.
@@ -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 */