about summary refs log tree commit diff
path: root/math/math.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-08-24 10:33:57 -0700
committerUlrich Drepper <drepper@redhat.com>2009-08-24 10:33:57 -0700
commit7b943af6cf2bfd4b94be271877a10128c32d03da (patch)
tree61e48476a7cfc36f79a21c828aebda8157d606ef /math/math.h
parentef72d5f1b95fe91b032de0ad1ee777d7cf4fb49f (diff)
downloadglibc-7b943af6cf2bfd4b94be271877a10128c32d03da.tar.gz
glibc-7b943af6cf2bfd4b94be271877a10128c32d03da.tar.xz
glibc-7b943af6cf2bfd4b94be271877a10128c32d03da.zip
Define math_errhandling is possible.
Diffstat (limited to 'math/math.h')
-rw-r--r--math/math.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/math/math.h b/math/math.h
index c50b2e7b07..4e65678b8d 100644
--- a/math/math.h
+++ b/math/math.h
@@ -1,5 +1,5 @@
 /* Declarations for math functions.
-   Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006
+   Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -101,7 +101,7 @@ __BEGIN_DECLS
      && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
 #  ifdef __LDBL_COMPAT
 
-#   ifdef __USE_ISOC99 
+#   ifdef __USE_ISOC99
 extern float __nldbl_nexttowardf (float __x, long double __y)
 				  __THROW __attribute__ ((__const__));
 #    ifdef __REDIRECT_NTH
@@ -277,6 +277,13 @@ enum
 # define MATH_ERRNO	1	/* errno set by math functions.  */
 # define MATH_ERREXCEPT	2	/* Exceptions raised by math functions.  */
 
+/* By default all functions support both errno and exception handling.
+   In gcc's fast math mode and if inline functions are defined this
+   might not be true.  */
+# ifndef __FAST_MATH__
+#  define math_errhandling	(MATH_ERRNO | MATH_ERREXCEPT)
+# endif
+
 #endif /* Use ISO C99.  */
 
 #ifdef	__USE_MISC