summaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/inttypes.h7
-rw-r--r--sysdeps/generic/ldconfig.h2
-rw-r--r--sysdeps/generic/ldsodefs.h17
-rw-r--r--sysdeps/generic/math-tests.h6
-rw-r--r--sysdeps/generic/math_private.h12
-rw-r--r--sysdeps/generic/memusage.h1
-rw-r--r--sysdeps/generic/not-cancel.h8
-rw-r--r--sysdeps/generic/stdint.h13
8 files changed, 46 insertions, 20 deletions
diff --git a/sysdeps/generic/inttypes.h b/sysdeps/generic/inttypes.h
index dc97519056..95d781815b 100644
--- a/sysdeps/generic/inttypes.h
+++ b/sysdeps/generic/inttypes.h
@@ -40,11 +40,6 @@ typedef wchar_t __gwchar_t;
# define ____gwchar_t_defined 1
#endif
-
-/* The ISO C99 standard specifies that these macros must only be
- defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
-
# if __WORDSIZE == 64
# define __PRI64_PREFIX "l"
# define __PRIPTR_PREFIX "l"
@@ -267,8 +262,6 @@ typedef wchar_t __gwchar_t;
# define SCNuPTR __PRIPTR_PREFIX "u"
# define SCNxPTR __PRIPTR_PREFIX "x"
-#endif /* C++ && format macros */
-
__BEGIN_DECLS
diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h
index ca3f0e430f..d96089d492 100644
--- a/sysdeps/generic/ldconfig.h
+++ b/sysdeps/generic/ldconfig.h
@@ -19,6 +19,8 @@
#ifndef _LDCONFIG_H
#define _LDCONFIG_H
+#include <stdint.h>
+
#define FLAG_ANY -1
#define FLAG_TYPE_MASK 0x00ff
#define FLAG_LIBC4 0x0000
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 9944555dd3..3f44809802 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -26,6 +26,7 @@
#define __need_NULL
#include <stddef.h>
#include <string.h>
+#include <stdint.h>
#include <elf.h>
#include <dlfcn.h>
@@ -601,6 +602,12 @@ extern const struct rtld_global_ro _rtld_global_ro
#endif
#undef EXTERN
+#ifndef SHARED
+/* dl-support.c defines these and initializes them early on. */
+extern const ElfW(Phdr) *_dl_phdr;
+extern size_t _dl_phnum;
+#endif
+
#ifdef IS_IN_rtld
/* This is the initial value of GL(dl_error_catch_tsd).
A non-TLS libpthread will change it. */
@@ -633,6 +640,16 @@ extern char **_dl_argv
#endif
;
#ifdef IS_IN_rtld
+extern unsigned int _dl_skip_args attribute_hidden
+# ifndef DL_ARGV_NOT_RELRO
+ attribute_relro
+# endif
+ ;
+extern unsigned int _dl_skip_args_internal attribute_hidden
+# ifndef DL_ARGV_NOT_RELRO
+ attribute_relro
+# endif
+ ;
extern char **_dl_argv_internal attribute_hidden
# ifndef DL_ARGV_NOT_RELRO
attribute_relro
diff --git a/sysdeps/generic/math-tests.h b/sysdeps/generic/math-tests.h
index 76f738ee99..da8747a944 100644
--- a/sysdeps/generic/math-tests.h
+++ b/sysdeps/generic/math-tests.h
@@ -34,3 +34,9 @@
(sizeof (x) == sizeof (float) ? SNAN_TESTS_float \
: sizeof (x) == sizeof (double) ? SNAN_TESTS_double \
: SNAN_TESTS_long_double)
+
+/* Indicate whether to run tests involving type casts of sNaN values. These
+ are run unless overridden. */
+#ifndef SNAN_TESTS_TYPE_CAST
+# define SNAN_TESTS_TYPE_CAST 1
+#endif
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index 7661788e6d..9d6ecade68 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -371,6 +371,18 @@ extern float __x2y2m1f (float x, float y);
extern double __x2y2m1 (double x, double y);
extern long double __x2y2m1l (long double x, long double y);
+/* Compute the product of X + X_EPS, X + X_EPS + 1, ..., X + X_EPS + N
+ - 1, in the form R * (1 + *EPS) where the return value R is an
+ approximation to the product and *EPS is set to indicate the
+ approximate error in the return value. X is such that all the
+ values X + 1, ..., X + N - 1 are exactly representable, and X_EPS /
+ X is small enough that factors quadratic in it can be
+ neglected. */
+extern float __gamma_productf (float x, float x_eps, int n, float *eps);
+extern double __gamma_product (double x, double x_eps, int n, double *eps);
+extern long double __gamma_productl (long double x, long double x_eps,
+ int n, long double *eps);
+
#ifndef math_opt_barrier
# define math_opt_barrier(x) \
({ __typeof (x) __x = (x); __asm ("" : "+m" (__x)); __x; })
diff --git a/sysdeps/generic/memusage.h b/sysdeps/generic/memusage.h
index 849f6e6bf0..631287827a 100644
--- a/sysdeps/generic/memusage.h
+++ b/sysdeps/generic/memusage.h
@@ -18,6 +18,7 @@
#include <limits.h>
#include <atomic.h>
+#include <stdint.h>
#ifndef GETSP
# warning "GETSP is not defined for this architecture."
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index 66882442ca..d5e76d56c3 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -44,3 +44,11 @@
__fcntl (fd, cmd, val)
# define waitpid_not_cancel(pid, stat_loc, options) \
__waitpid (pid, stat_loc, options)
+#define pause_not_cancel() \
+ __pause ()
+#define nanosleep_not_cancel(requested_time, remaining) \
+ __nanosleep (requested_time, remaining)
+#define sigsuspend_not_cancel(set) \
+ __sigsuspend (set)
+
+#define NO_CANCELLATION 1
diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h
index 15f7508078..94c3203c84 100644
--- a/sysdeps/generic/stdint.h
+++ b/sysdeps/generic/stdint.h
@@ -141,10 +141,6 @@ typedef unsigned long long int uintmax_t;
#endif
-/* The ISO C99 standard specifies that in C++ implementations these
- macros should only be defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
-
# if __WORDSIZE == 64
# define __INT64_C(c) c ## L
# define __UINT64_C(c) c ## UL
@@ -278,13 +274,6 @@ typedef unsigned long long int uintmax_t;
# define WINT_MIN (0u)
# define WINT_MAX (4294967295u)
-#endif /* C++ && limit macros */
-
-
-/* The ISO C99 standard specifies that in C++ implementations these
- should only be defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
/* Signed. */
# define INT8_C(c) c
# define INT16_C(c) c
@@ -314,6 +303,4 @@ typedef unsigned long long int uintmax_t;
# define UINTMAX_C(c) c ## ULL
# endif
-#endif /* C++ && constant macros */
-
#endif /* stdint.h */