summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elf.h6
-rw-r--r--include/features.h12
-rw-r--r--include/fenv.h10
-rw-r--r--include/internal/time64_helpers.h5
-rw-r--r--include/spawn.h1
-rw-r--r--include/stdint.h8
-rw-r--r--include/stdio.h5
-rw-r--r--include/stdlib.h6
-rw-r--r--include/sys/cdefs.h14
-rw-r--r--include/sys/mount.h25
-rw-r--r--include/sys/uio.h19
-rw-r--r--include/ucontext.h4
-rw-r--r--include/unistd.h13
13 files changed, 119 insertions, 9 deletions
diff --git a/include/elf.h b/include/elf.h
index c2efa9978..1e7c89615 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -3588,8 +3588,12 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_XTENSA_TLSDESC_FN 50
#define R_XTENSA_TLSDESC_ARG 51
#define R_XTENSA_TLS_TPOFF 53
+#define R_XTENSA_SYM32 63
+#define R_XTENSA_FUNCDESC 68
+#define R_XTENSA_FUNCDESC_VALUE 69
+#define R_XTENSA_TLSDESC 72
/* Keep this the last entry. */
-#define R_XTENSA_NUM 54
+#define R_XTENSA_NUM 77
/* C6X specific relocs */
#define R_C6000_NONE 0
diff --git a/include/features.h b/include/features.h
index b5d4e79f2..1a4efb9db 100644
--- a/include/features.h
+++ b/include/features.h
@@ -140,6 +140,18 @@
# define __GNUC_PREREQ(maj, min) 0
#endif
+/* Convenience macro to test the version of clang.
+ Use like this:
+ #if __CLANG_PREREQ(3,2)
+ ... code requiring clang 3.2 or later ...
+ #endif */
+#if defined __clang__
+# define __CLANG_PREREQ(maj, min) \
+ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
+#else
+# define __CLANG_PREREQ(maj, min) 0
+#endif
+
/* Whether to use feature set F. */
#define __GLIBC_USE(F) __GLIBC_USE_ ## F
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/internal/time64_helpers.h b/include/internal/time64_helpers.h
index 2284aacd9..e2ed0f3bb 100644
--- a/include/internal/time64_helpers.h
+++ b/include/internal/time64_helpers.h
@@ -1,10 +1,15 @@
#ifndef _TIME64_HELPERS_H
#define _TIME64_HELPERS_H
+#include <linux/version.h>
#include <bits/types.h>
#include <time.h>
#include <stddef.h>
+#if defined(__UCLIBC_USE_TIME64__) && __TARGET_ARCH_BITS__ == 32 && LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
+#error 64bit time on 32bit targets is not supported on Linux < 5.1.0
+#endif
+
struct __ts64_struct {
__S64_TYPE tv_sec;
__S64_TYPE tv_nsec;
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/stdio.h b/include/stdio.h
index 0915da909..a48fa9b78 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -110,7 +110,10 @@ typedef __STDIO_fpos64_t fpos64_t;
#define SEEK_SET 0 /* Seek from beginning of file. */
#define SEEK_CUR 1 /* Seek from current position. */
#define SEEK_END 2 /* Seek from end of file. */
-
+#ifdef __USE_GNU
+# define SEEK_DATA 3 /* Seek to next data. */
+# define SEEK_HOLE 4 /* Seek to next hole. */
+#endif
#if defined __USE_SVID || defined __USE_XOPEN
/* Default path prefix for `mkstemp'. */
diff --git a/include/stdlib.h b/include/stdlib.h
index 8b1375184..448c5e336 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -606,7 +606,7 @@ libc_hidden_proto(unsetenv)
#ifdef __UCLIBC_DYNAMIC_ATEXIT__
# define __UCLIBC_MAX_ATEXIT INT_MAX
#else
-# define __UCLIBC_MAX_ATEXIT 20
+# define __UCLIBC_MAX_ATEXIT 32
#endif
@@ -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/cdefs.h b/include/sys/cdefs.h
index 5c4daebcd..656548c52 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -58,9 +58,15 @@
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ (2,8)
-# define __THROW throw ()
-# define __THROWNL throw ()
-# define __NTH(fct) __LEAF_ATTR fct throw ()
+/* Dynamic exception specification is deprecated since C++11, so
+ we only use it when compiling for an earlier standard. */
+# if __cplusplus < 201103UL
+# define __THROW throw ()
+# else
+# define __THROW noexcept
+# endif
+# define __THROWNL __THROW
+# define __NTH(fct) __LEAF_ATTR fct __THROW
# else
# define __THROW
# define __THROWNL
@@ -314,7 +320,7 @@
inline semantics, unless -fgnu89-inline is used.
For -std=gnu99, forcing gnu_inline attribute does not change behavior,
but may silence spurious warnings (such as in GCC 4.2). */
-#if !defined __cplusplus || __GNUC_PREREQ (4,3)
+#if !defined __cplusplus || __GNUC_PREREQ (4,3) || __CLANG_PREREQ(8,0)
# if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ || defined __cplusplus
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
# if __GNUC_PREREQ (4,3)
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/sys/uio.h b/include/sys/uio.h
index 330426fec..9e9708c0c 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -74,6 +74,25 @@ extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
__off64_t __offset) __wur;
#endif /* Use misc. */
+#ifdef __USE_GNU
+/* Read from another process' address space. */
+extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec,
+ unsigned long int __liovcnt,
+ const struct iovec *__rvec,
+ unsigned long int __riovcnt,
+ unsigned long int __flags)
+ __THROW;
+
+/* Write to another process' address space. */
+extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
+ unsigned long int __liovcnt,
+ const struct iovec *__rvec,
+ unsigned long int __riovcnt,
+ unsigned long int __flags)
+ __THROW;
+
+#endif
+
__END_DECLS
#endif /* sys/uio.h */
diff --git a/include/ucontext.h b/include/ucontext.h
index 4ce114ef1..76b4f375e 100644
--- a/include/ucontext.h
+++ b/include/ucontext.h
@@ -23,11 +23,11 @@
#include <features.h>
-#ifdef __UCLIBC_HAS_CONTEXT_FUNCS__
-
/* Get machine dependent definition of data structures. */
#include <sys/ucontext.h>
+#ifdef __UCLIBC_HAS_CONTEXT_FUNCS__
+
__BEGIN_DECLS
/* Get user context and store it in variable pointed to by UCP. */
diff --git a/include/unistd.h b/include/unistd.h
index 36cd5fcb5..e45266f14 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -316,6 +316,10 @@ libc_hidden_proto(faccessat)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Seek from end of file. */
+# ifdef __USE_GNU
+# define SEEK_DATA 3 /* Seek to next data. */
+# define SEEK_HOLE 4 /* Seek to next hole. */
+# endif
#endif
#if defined __USE_BSD && !defined L_SET
@@ -1246,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