diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fenv.h | 10 | ||||
-rw-r--r-- | include/netdb.h | 2 | ||||
-rw-r--r-- | include/pty.h | 6 | ||||
-rw-r--r-- | include/spawn.h | 1 | ||||
-rw-r--r-- | include/stdint.h | 8 | ||||
-rw-r--r-- | include/stdlib.h | 4 | ||||
-rw-r--r-- | include/sys/mount.h | 25 | ||||
-rw-r--r-- | include/unistd.h | 9 |
8 files changed, 62 insertions, 3 deletions
diff --git a/include/fenv.h b/include/fenv.h index 9ba384756..4b532c573 100644 --- a/include/fenv.h +++ b/include/fenv.h @@ -23,6 +23,7 @@ #define _FENV_H 1 #include <features.h> +#include <stdbool.h> /* Get the architecture dependend definitions. The following definitions are expected to be done: @@ -130,6 +131,15 @@ extern int fedisableexcept (int __excepts) __THROW; extern int fegetexcept (void) __THROW; #endif +/* Rounding mode context. This allows functions to set/restore rounding mode + only when the desired rounding mode is different from the current rounding + mode. */ +struct rm_ctx +{ + fenv_t env; + bool updated_status; +}; + __END_DECLS #endif /* fenv.h */ diff --git a/include/netdb.h b/include/netdb.h index a85797956..26c999e59 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -689,7 +689,7 @@ extern const char *gai_strerror (int __ecode) __THROW; extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, - socklen_t __servlen, unsigned int __flags); + socklen_t __servlen, int __flags); libc_hidden_proto(getnameinfo) #endif /* POSIX */ diff --git a/include/pty.h b/include/pty.h index f23a260ae..609ac2459 100644 --- a/include/pty.h +++ b/include/pty.h @@ -31,13 +31,15 @@ __BEGIN_DECLS attributes according to TERMP and WINP and return handles for both ends in AMASTER and ASLAVE. */ extern int openpty (int *__amaster, int *__aslave, char *__name, - struct termios *__termp, struct winsize *__winp) __THROW; + const struct termios *__termp, + const struct winsize *__winp) __THROW; libutil_hidden_proto(openpty) /* Create child process and establish the slave pseudo terminal as the child's controlling terminal. */ extern int forkpty (int *__amaster, char *__name, - struct termios *__termp, struct winsize *__winp) __THROW; + const struct termios *__termp, + const struct winsize *__winp) __THROW; __END_DECLS diff --git a/include/spawn.h b/include/spawn.h index 3de375b41..cf01639c1 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -103,6 +103,7 @@ int posix_spawnattr_init (posix_spawnattr_t *__attr) static inline int posix_spawnattr_destroy (posix_spawnattr_t *__attr) { + (void)__attr; return 0; } diff --git a/include/stdint.h b/include/stdint.h index 749f73697..5fedfb574 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -144,11 +144,19 @@ typedef unsigned long long int uintmax_t; # if __WORDSIZE == 64 +# ifndef __INT64_C # define __INT64_C(c) c ## L +# endif +# ifndef __UINT64_C # define __UINT64_C(c) c ## UL +# endif # else +# ifndef __INT64_C # define __INT64_C(c) c ## LL +# endif +# ifndef __UINT64_C # define __UINT64_C(c) c ## ULL +# endif # endif /* Limits of integral types. */ diff --git a/include/stdlib.h b/include/stdlib.h index d4e0b75e7..448c5e336 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -986,9 +986,13 @@ extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) __THROW __nonnull ((1)); +/* reallocarray() only provided by the malloc-standard implementation */ +#if defined(__MALLOC_STANDARD__) extern void *reallocarray (void *__ptr, size_t __m, size_t __n); #endif +#endif + #ifdef _LIBC extern int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) attribute_hidden; diff --git a/include/sys/mount.h b/include/sys/mount.h index c0e7b84f8..f9edbeba3 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -32,54 +32,79 @@ supported */ enum { +#undef MS_RDONLY MS_RDONLY = 1, /* Mount read-only. */ #define MS_RDONLY MS_RDONLY +#undef MS_NOSUID MS_NOSUID = 2, /* Ignore suid and sgid bits. */ #define MS_NOSUID MS_NOSUID +#undef MS_NODEV MS_NODEV = 4, /* Disallow access to device special files. */ #define MS_NODEV MS_NODEV +#undef MS_NOEXEC MS_NOEXEC = 8, /* Disallow program execution. */ #define MS_NOEXEC MS_NOEXEC +#undef MS_SYNCHRONOUS MS_SYNCHRONOUS = 16, /* Writes are synced at once. */ #define MS_SYNCHRONOUS MS_SYNCHRONOUS +#undef MS_REMOUNT MS_REMOUNT = 32, /* Alter flags of a mounted FS. */ #define MS_REMOUNT MS_REMOUNT +#undef MS_MANDLOCK MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ #define MS_MANDLOCK MS_MANDLOCK +#undef MS_DIRSYNC MS_DIRSYNC = 128, /* Directory modifications are synchronous. */ #define MS_DIRSYNC MS_DIRSYNC +#undef MS_NOATIME MS_NOATIME = 1024, /* Do not update access times. */ #define MS_NOATIME MS_NOATIME +#undef MS_NODIRATIME MS_NODIRATIME = 2048, /* Do not update directory access times. */ #define MS_NODIRATIME MS_NODIRATIME +#undef MS_BIND MS_BIND = 4096, /* Bind directory at different place. */ #define MS_BIND MS_BIND +#undef MS_MOVE MS_MOVE = 8192, #define MS_MOVE MS_MOVE +#undef MS_REC MS_REC = 16384, #define MS_REC MS_REC +#undef MS_SILENT MS_SILENT = 32768, #define MS_SILENT MS_SILENT +#undef MS_POSIXACL MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */ #define MS_POSIXACL MS_POSIXACL +#undef MS_UNBINDABLE MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */ #define MS_UNBINDABLE MS_UNBINDABLE +#undef MS_PRIVATE MS_PRIVATE = 1 << 18, /* Change to private. */ #define MS_PRIVATE MS_PRIVATE +#undef MS_SLAVE MS_SLAVE = 1 << 19, /* Change to slave. */ #define MS_SLAVE MS_SLAVE +#undef MS_SHARED MS_SHARED = 1 << 20, /* Change to shared. */ #define MS_SHARED MS_SHARED +#undef MS_RELATIME MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */ #define MS_RELATIME MS_RELATIME +#undef MS_KERNMOUNT MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */ #define MS_KERNMOUNT MS_KERNMOUNT +#undef MS_I_VERSION MS_I_VERSION = 1 << 23, /* Update inode I_version field. */ #define MS_I_VERSION MS_I_VERSION +#undef MS_STRICTATIME MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */ #define MS_STRICTATIME MS_STRICTATIME +#undef MS_ACTIVE MS_ACTIVE = 1 << 30, #define MS_ACTIVE MS_ACTIVE +#undef MS_NOUSER MS_NOUSER = 1 << 31 #define MS_NOUSER MS_NOUSER }; diff --git a/include/unistd.h b/include/unistd.h index d50e1e4d3..e45266f14 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -1250,6 +1250,15 @@ extern void swab (const void *__restrict __from, void *__restrict __to, extern char *ctermid (char *__s) __THROW; #endif +/* OpenBSD-compatible access to random bytes. + May be a cancellation point here, unlike in glibc/musl. */ +#ifdef _DEFAULT_SOURCE +# ifndef __getentropy_defined +extern int getentropy(void *__buf, size_t __len) __nonnull ((1)) __wur; +# define __getentropy_defined +# endif +#endif + __END_DECLS |