This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

conformtest: Fix sys/mman.h expectations for UNIX98


The conformtest expectations for sys/mman.h have some symbols
conditioned on #ifndef POSIX, but the symbols in question are also not
in XPG3, XPG4 or UNIX98, so the conditions need adjusting accordingly.

This patch adjusts those conditions, and those on some other optional
symbols that are also not mentioned in UNIX98.

Tested x86_64, where it removes 6 failures from each of XPG3, XPG4,
UNIX98.

(There are more symbols listed in the expectations that are correct
for POSIX (1996) but not in XPG3/XPG4, so those will need further
conditioning later.)

2012-11-07  Joseph Myers  <joseph@codesourcery.com>

	* conform/sys/mman.h-data [!POSIX] (POSIX_MADV_NORMAL): Change
	condition to [!POSIX && !XPG3 && !XPG4 && !UNIX98].
	[!POSIX] (POSIX_MADV_SEQUENTIAL): Likewise.
	[!POSIX] (POSIX_MADV_RANDOM): Likewise.
	[!POSIX] (POSIX_MADV_WILLNEED): Likewise.
	[!POSIX] (POSIX_MADV_DONTNEED): Likewise.
	[!POSIX] (posix_madvise): Likewise.
	(POSIX_TYPED_MEM_ALLOCATE): Condition on [!POSIX && !XPG3 && !XPG4
	&& !UNIX98].
	(POSIX_TYPED_MEM_ALLOCATE_CONTIG): Likewise.
	(POSIX_TYPED_MEM_MAP_ALLOCATABLE): Likewise.
	(mode_t): Likewise.
	(posix_mem_offset): Likewise.
	(posix_typed_mem_get_info): Likewise.
	(posix_typed_mem_open): Likewise.

diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data
index 21be6ff..62f8f4b 100644
--- a/conform/data/sys/mman.h-data
+++ b/conform/data/sys/mman.h-data
@@ -17,25 +17,31 @@ constant MCL_FUTURE
 
 constant MAP_FAILED
 
-#ifndef POSIX
+# if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 constant POSIX_MADV_NORMAL
 constant POSIX_MADV_SEQUENTIAL
 constant POSIX_MADV_RANDOM
 constant POSIX_MADV_WILLNEED
 constant POSIX_MADV_DONTNEED
-#endif
 
 optional-constant POSIX_TYPED_MEM_ALLOCATE
 optional-constant POSIX_TYPED_MEM_ALLOCATE_CONTIG
 optional-constant POSIX_TYPED_MEM_MAP_ALLOCATABLE
 
-type size_t
-type off_t
 type mode_t
 
 optional-type {struct posix_typedmem_info}
 optional-element {struct posix_typedmem_info} size_t posix_tmi_length
 
+function int posix_madvise (void*, size_t, int)
+optional-function int posix_mem_offset (const void*, size_t, off_t*, size_t*, int*)
+optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info*)
+optional-function int posix_typed_mem_open (const char*, int, int)
+# endif
+
+type size_t
+type off_t
+
 function int mlock (const void*, size_t)
 function int mlockall (int)
 function {void*} mmap (void*, size_t, int, int, int, off_t)
@@ -44,12 +50,6 @@ function int msync (void*, size_t, int)
 function int munlock (const void*, size_t)
 function int munlockall (void)
 function int munmap (void*, size_t)
-#ifndef POSIX
-function int posix_madvise (void*, size_t, int)
-#endif
-optional-function int posix_mem_offset (const void*, size_t, off_t*, size_t*, int*)
-optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info*)
-optional-function int posix_typed_mem_open (const char*, int, int)
 function int shm_open (const char*, int, mode_t)
 function int shm_unlink (const char*)
 

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]