1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
Files
glibc/conform/data/sys/mman.h-data
Collin Funk d18213c699 conform: Add initial support for C23.
Hi Joseph,

As we discussed, this patch just makes C23 include every check that is
performed by C11.

I tested the commit by adding the ISO23 Make and Python variables to be
the same as ISO11.  So the only difference was compiling with -DISO23
instead of -DISO11.  And changed the temporary directories to instead
use the format f'/tmp/glibc-{self.standard}-{self.header}'.  Then I used
a shell script to run 'cmp' on each file in the ISO11 and ISO23
directories for each header to make sure they were the same.

-- 8< --

Make C23 checks include every test that is performed by C11.  Done by
running the following command:

find conform -name '*.h-data' | xargs sed -i \
  -e 's| !defined ISO11| !defined ISO11 \&\& !defined ISO23|g' \
  -e 's| defined ISO11| defined ISO11 \|\| defined ISO23|g' \
  -e 's|ifdef ISO11|if defined ISO11 \|\| defined ISO23|g' \
  -e 's|ifndef ISO11|if !defined ISO11 \&\& !defined ISO23|g'

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
2025-04-10 18:39:05 +00:00

65 lines
1.6 KiB
Plaintext

#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined XPG4
constant PROT_READ
constant PROT_WRITE
constant PROT_EXEC
constant PROT_NONE
constant MAP_SHARED
constant MAP_PRIVATE
constant MAP_FIXED
constant MS_ASYNC
constant MS_SYNC
constant MS_INVALIDATE
constant MCL_CURRENT
constant MCL_FUTURE
constant MAP_FAILED
# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant POSIX_MADV_NORMAL
constant POSIX_MADV_SEQUENTIAL
constant POSIX_MADV_RANDOM
constant POSIX_MADV_WILLNEED
constant POSIX_MADV_DONTNEED
optional-constant POSIX_TYPED_MEM_ALLOCATE
optional-constant POSIX_TYPED_MEM_ALLOCATE_CONTIG
optional-constant POSIX_TYPED_MEM_MAP_ALLOCATABLE
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
# ifndef POSIX
type size_t
type off_t
# endif
function int mlock (const void*, size_t)
function int mlockall (int)
function {void*} mmap (void*, size_t, int, int, int, off_t)
function int mprotect (void*, size_t, int)
function int msync (void*, size_t, int)
function int munlock (const void*, size_t)
function int munlockall (void)
function int munmap (void*, size_t)
function int shm_open (const char*, int, mode_t)
function int shm_unlink (const char*)
allow shm_*
allow MAP_*
allow MCL_*
allow MS_*
allow PROT_*
allow *_t
#endif