mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2000-08-01 Ulrich Drepper <drepper@redhat.com> Joseph S. Myers <jsm28@cam.ac.uk> * math/tgmath.h: Make standard compliant. Don't ask how. 2000-07-04 H.J. Lu <hjl@gnu.org> * elf/Makefile ($(inst_slibdir)/$(rtld-version-installed-name)): Use $(do-install-program) instead of "$(INSTALL_PROGRAM) $< $@.new". ($(inst_slibdir)/$(rtld-installed-name)): Use $(make-shlib-link) only. 2000-07-30 Maciej W. Rozycki <macro@ds2.pg.gda.pl> * include/features.h (_XOPEN_SOURCE): Update the explanation. (__USE_LARGEFILE): Add an explanation. (_POSIX_C_SOURCE): Define to 2 only if _XOPEN_SOURCE < 500. (__USE_XOPEN2K): Define whenever _XOPEN_SOURCE >= 600. 2000-08-01 Ulrich Drepper <drepper@redhat.com> * libio/Makefile: Enable exception handling for genops, wgenops, fileops, and wfileops.
This commit is contained in:
@ -36,12 +36,31 @@
|
||||
|
||||
#if __GNUC_PREREQ (2, 7)
|
||||
|
||||
/* This is ugly but unless gcc gets appropriate builtins we have to do
|
||||
something like this. Don't ask how it works. */
|
||||
|
||||
/* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
|
||||
Allows for _Bool. Expands to an integer constant expression. */
|
||||
#define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
|
||||
|
||||
/* The tgmath real type for T, where E is 0 if T is an integer type and
|
||||
1 for a floating type. */
|
||||
#define __tgmath_real_type_sub(T, E) \
|
||||
__typeof__(*(0 ? (__typeof__(0 ? (double *)0 : (void *)(E)))0 \
|
||||
: (__typeof__(0 ? (T *)0 : (void *)(!(E))))0))
|
||||
|
||||
/* The tgmath real type of EXPR. */
|
||||
#define __tgmath_real_type(expr) \
|
||||
__tgmath_real_type_sub(__typeof__(expr), __floating_type(__typeof__(expr)))
|
||||
|
||||
|
||||
/* We have two kinds of generic macros: to support functions which are
|
||||
only defined on real valued parameters and those which are defined
|
||||
for complex functions as well. */
|
||||
# define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
|
||||
(__extension__ ({ __typeof__ (Val) __tgmres; \
|
||||
if (sizeof (Val) == sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type (Val) __tgmres; \
|
||||
if (sizeof (Val) == sizeof (double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
__tgmres = Fct (Val); \
|
||||
else if (sizeof (Val) == sizeof (float)) \
|
||||
__tgmres = Fct##f (Val); \
|
||||
@ -50,8 +69,9 @@
|
||||
__tgmres; }))
|
||||
|
||||
# define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
|
||||
(__extension__ ({ __typeof__ (Val1) __tgmres; \
|
||||
if (sizeof (Val1) == sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type (Val1) __tgmres; \
|
||||
if (sizeof (Val1) == sizeof (double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
__tgmres = Fct (Val1, Val2); \
|
||||
else if (sizeof (Val1) == sizeof (float)) \
|
||||
__tgmres = Fct##f (Val1, Val2); \
|
||||
@ -60,38 +80,44 @@
|
||||
__tgmres; }))
|
||||
|
||||
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
|
||||
(__extension__ ({ __typeof__ ((Val1) + (Val2)) __tgmres; \
|
||||
if (sizeof (Val1) > sizeof (double) \
|
||||
|| sizeof (Val2) > sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
|
||||
if ((sizeof (Val1) > sizeof (double) \
|
||||
|| sizeof (Val2) > sizeof (double)) \
|
||||
&& __builtin_classify_type (Val) == 8) \
|
||||
__tgmres = Fct##l (Val1, Val2); \
|
||||
else if (sizeof (Val1) == sizeof (double) \
|
||||
|| sizeof (Val2) == sizeof (double)) \
|
||||
|| sizeof (Val2) == sizeof (double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
__tgmres = Fct (Val1, Val2); \
|
||||
else \
|
||||
__tgmres = Fct (Val1, Val2); \
|
||||
__tgmres; }))
|
||||
|
||||
# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
|
||||
(__extension__ ({ __typeof__ ((Val1) + (Val2)) __tgmres; \
|
||||
if (sizeof (Val1) > sizeof (double) \
|
||||
|| sizeof (Val2) > sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
|
||||
if ((sizeof (Val1) > sizeof (double) \
|
||||
|| sizeof (Val2) > sizeof (double)) \
|
||||
&& __builtin_classify_type (Val) == 8) \
|
||||
__tgmres = Fct##l (Val1, Val2, Val3); \
|
||||
else if (sizeof (Val1) == sizeof (double) \
|
||||
|| sizeof (Val2) == sizeof (double)) \
|
||||
|| sizeof (Val2) == sizeof (double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
__tgmres = Fct (Val1, Val2, Val3); \
|
||||
else \
|
||||
__tgmres = Fct (Val1, Val2, Val3); \
|
||||
__tgmres; }))
|
||||
|
||||
# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
|
||||
(__extension__ ({ __typeof__ ((Val1) + (Val2) + (Val3)) __tgmres; \
|
||||
if (sizeof (Val1) > sizeof (double) \
|
||||
|| sizeof (Val2) > sizeof (double) \
|
||||
|| sizeof (Val3) > sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type ((Val1) + (Val2) + (Val3)) __tgmres;\
|
||||
if ((sizeof (Val1) > sizeof (double) \
|
||||
|| sizeof (Val2) > sizeof (double) \
|
||||
|| sizeof (Val3) > sizeof (double)) \
|
||||
&& __builtin_classify_type (Val) == 8) \
|
||||
__tgmres = Fct##l (Val1, Val2, Val3); \
|
||||
else if (sizeof (Val1) == sizeof (double) \
|
||||
|| sizeof (Val2) == sizeof (double) \
|
||||
|| sizeof (Val3) == sizeof (double)) \
|
||||
|| sizeof (Val3) == sizeof (double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
__tgmres = Fct (Val1, Val2, Val3); \
|
||||
else \
|
||||
__tgmres = Fct (Val1, Val2, Val3); \
|
||||
@ -100,15 +126,17 @@
|
||||
/* XXX This definition has to be changed as soon as the compiler understands
|
||||
the imaginary keyword. */
|
||||
# define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
|
||||
(__extension__ ({ __typeof__ (Val) __tgmres; \
|
||||
if (sizeof (__real__ (Val)) > sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type (Val) __tgmres; \
|
||||
if (sizeof (__real__ (Val)) > sizeof (double) \
|
||||
&& __builtin_classify_type (Val) == 8) \
|
||||
{ \
|
||||
if (sizeof (__real__ (Val)) == sizeof (Val)) \
|
||||
__tgmres = Fct##l (Val); \
|
||||
else \
|
||||
__tgmres = Cfct##l (Val); \
|
||||
} \
|
||||
else if (sizeof (__real__ (Val)) == sizeof (double)) \
|
||||
else if (sizeof (__real__ (Val)) == sizeof (double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
{ \
|
||||
if (sizeof (__real__ (Val)) == sizeof (Val)) \
|
||||
__tgmres = Fct (Val); \
|
||||
@ -127,8 +155,9 @@
|
||||
/* XXX This definition has to be changed as soon as the compiler understands
|
||||
the imaginary keyword. */
|
||||
# define __TGMATH_UNARY_IMAG_ONLY(Val, Fct) \
|
||||
(__extension__ ({ __typeof__ (Val) __tgmres; \
|
||||
if (sizeof (Val) == sizeof (__complex__ double)) \
|
||||
(__extension__ ({ __tgmath_real_type (Val) __tgmres; \
|
||||
if (sizeof (Val) == sizeof (__complex__ double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
__tgmres = Fct (Val); \
|
||||
else if (sizeof (Val) == sizeof (__complex__ float)) \
|
||||
__tgmres = Fct##f (Val); \
|
||||
@ -139,9 +168,10 @@
|
||||
/* XXX This definition has to be changed as soon as the compiler understands
|
||||
the imaginary keyword. */
|
||||
# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
|
||||
(__extension__ ({ __typeof__ ((Val1) + (Val2)) __tgmres; \
|
||||
if (sizeof (__real__ (Val1)) > sizeof (double) \
|
||||
|| sizeof (__real__ (Val2)) > sizeof (double)) \
|
||||
(__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
|
||||
if ((sizeof (__real__ (Val1)) > sizeof (double) \
|
||||
|| sizeof (__real__ (Val2)) > sizeof (double)) \
|
||||
&& __builtin_classify_type (Val) == 8) \
|
||||
{ \
|
||||
if (sizeof (__real__ (Val1)) == sizeof (Val1) \
|
||||
&& sizeof (__real__ (Val2)) == sizeof (Val2)) \
|
||||
@ -150,7 +180,8 @@
|
||||
__tgmres = Cfct##l (Val1, Val2); \
|
||||
} \
|
||||
else if (sizeof (__real__ (Val1)) == sizeof (double) \
|
||||
|| sizeof (__real__ (Val2)) == sizeof(double))\
|
||||
|| sizeof (__real__ (Val2)) == sizeof(double) \
|
||||
|| __builtin_classify_type (Val) != 8) \
|
||||
{ \
|
||||
if (sizeof (__real__ (Val1)) == sizeof (Val1) \
|
||||
&& sizeof (__real__ (Val2)) == sizeof (Val2)) \
|
||||
|
Reference in New Issue
Block a user