aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ia64/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ia64/fpu')
-rw-r--r--sysdeps/ia64/fpu/libm_error.c8
-rw-r--r--sysdeps/ia64/fpu/libm_support.h39
-rw-r--r--sysdeps/ia64/fpu/s_matherrf.c5
-rw-r--r--sysdeps/ia64/fpu/s_matherrl.c5
4 files changed, 18 insertions, 39 deletions
diff --git a/sysdeps/ia64/fpu/libm_error.c b/sysdeps/ia64/fpu/libm_error.c
index a9307dd4b5..34d1466e09 100644
--- a/sysdeps/ia64/fpu/libm_error.c
+++ b/sysdeps/ia64/fpu/libm_error.c
@@ -91,11 +91,19 @@
#include <stdio.h>
#include <stdlib.h>
#include "libm_support.h"
+#include <math-svid-compat.h>
#ifdef _LIBC
# define pmatherr matherr
# define pmatherrf matherrf
# define pmatherrl matherrl
+# if LIBM_SVID_COMPAT
+compat_symbol_reference (libm, matherrf, matherrf, GLIBC_2_2_3);
+compat_symbol_reference (libm, matherrl, matherrl, GLIBC_2_2_3);
+# else
+# define matherrf(EXC) ((void) (EXC), 0)
+# define matherrl(EXC) ((void) (EXC), 0)
+# endif
#else
_LIB_VERSION_TYPE
#if defined( __POSIX__ )
diff --git a/sysdeps/ia64/fpu/libm_support.h b/sysdeps/ia64/fpu/libm_support.h
index dc9c0a2648..4e7a66799d 100644
--- a/sysdeps/ia64/fpu/libm_support.h
+++ b/sysdeps/ia64/fpu/libm_support.h
@@ -83,6 +83,8 @@
#ifndef __LIBM_SUPPORT_H_INCLUDED__
#define __LIBM_SUPPORT_H_INCLUDED__
+#include <math-svid-compat.h>
+
#ifndef _LIBC
#if !(defined(_WIN32) || defined(_WIN64))
# pragma const_seg(".rodata") /* place constant data in text (code) section */
@@ -156,36 +158,8 @@ struct exceptionl
#endif
extern int MATHERR_F(struct exceptionf*);
-extern int MATHERR_D(struct EXC_DECL_D*);
extern int matherrl(struct exceptionl*);
-#ifndef _LIBC
-// Add code to support _LIB_VERSIONIMF
-typedef enum
-{
- _IEEE_ = -1, // IEEE-like behavior
- _SVID_, // SysV, Rel. 4 behavior
- _XOPEN_, // Unix98
- _POSIX_, // Posix
- _ISOC_ // ISO C9X
-} _LIB_VERSION_TYPE;
-#endif
-
-// This is a run-time variable and may affect
-// floating point behavior of the libm functions
-
-#if !defined( LIBM_BUILD )
-#if defined( _DLL )
-extern _LIB_VERSION_TYPE __declspec(dllimport) _LIB_VERSIONIMF;
-#else
-extern _LIB_VERSION_TYPE _LIB_VERSIONIMF;
-#endif /* _DLL */
-#else
-extern int (*pmatherrf)(struct exceptionf*);
-extern int (*pmatherr)(struct EXC_DECL_D*);
-extern int (*pmatherrl)(struct exceptionl*);
-#endif /* LIBM_BUILD */
-
/* memory format definitions (LITTLE_ENDIAN only) */
#if !(defined(SIZE_INT_32) || defined(SIZE_INT_64))
@@ -1031,15 +1005,6 @@ struct ker80 {
#endif
-/* error codes */
-
-#define DOMAIN 1 /* argument domain error */
-#define SING 2 /* argument singularity */
-#define OVERFLOW 3 /* overflow range error */
-#define UNDERFLOW 4 /* underflow range error */
-#define TLOSS 5 /* total loss of precision */
-#define PLOSS 6 /* partial loss of precision */
-
/* */
#define VOLATILE_32 /*volatile*/
diff --git a/sysdeps/ia64/fpu/s_matherrf.c b/sysdeps/ia64/fpu/s_matherrf.c
index a47d4b89a2..5808c04573 100644
--- a/sysdeps/ia64/fpu/s_matherrf.c
+++ b/sysdeps/ia64/fpu/s_matherrf.c
@@ -13,8 +13,10 @@
#include <math.h>
#include <math_private.h>
+#include <math-svid-compat.h>
#include "libm_support.h"
+#if LIBM_SVID_COMPAT
int
weak_function
__matherrf(struct exceptionf *x)
@@ -23,4 +25,5 @@ __matherrf(struct exceptionf *x)
if(x->arg1!=x->arg1) return 0;
return n;
}
-weak_alias (__matherrf, matherrf)
+compat_symbol (libm, __matherrf, matherrf, GLIBC_2_2_3);
+#endif
diff --git a/sysdeps/ia64/fpu/s_matherrl.c b/sysdeps/ia64/fpu/s_matherrl.c
index 6fe92d7739..dc64b31e50 100644
--- a/sysdeps/ia64/fpu/s_matherrl.c
+++ b/sysdeps/ia64/fpu/s_matherrl.c
@@ -13,8 +13,10 @@
#include <math.h>
#include <math_private.h>
+#include <math-svid-compat.h>
#include "libm_support.h"
+#if LIBM_SVID_COMPAT
int
weak_function
__matherrl(struct exceptionl *x)
@@ -23,4 +25,5 @@ __matherrl(struct exceptionl *x)
if(x->arg1!=x->arg1) return 0;
return n;
}
-weak_alias (__matherrl, matherrl)
+compat_symbol (libm, __matherrl, matherrl, GLIBC_2_2_3);
+#endif