comparison src/sysfloat.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 441bb1e64a06
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 /*
2 Copyright (C) 1995 Free Software Foundation, Inc.
3
4 This file is part of XEmacs.
5
6 XEmacs is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version.
10
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 /* Synched up with: Not really in FSF. */
22
23 /* Work around a problem that happens because math.h on hpux 7
24 defines two static variables--which, in Emacs, are not really static,
25 because `static' is defined as nothing. The problem is that they are
26 defined both in data.c and in floatfns.c.
27 These macros prevent the name conflict.
28
29 (Is it still necessary to define static to nothing on hpux7?
30 Removing that would be the best fix. -jwz)
31 */
32 # if defined (HPUX) && !defined (HPUX8)
33 # define _MAXLDBL THIS_FILENAME ## _maxldbl
34 # define _NMAXLDBL THIS_FILENAME ## _nmaxldbl
35 # endif
36
37 #ifdef MSDOS
38 /* These are redefined (correctly, but differently) in values.h. */
39 #undef INTBITS
40 #undef LONGBITS
41 #undef SHORTBITS
42 #endif
43
44 #include <math.h>
45
46 #ifdef NO_MATHERR
47 #undef HAVE_MATHERR
48 #endif
49
50 #ifdef HAVE_MATHERR
51 # ifdef FLOAT_CHECK_ERRNO
52 # undef FLOAT_CHECK_ERRNO
53 # endif
54 # ifdef FLOAT_CHECK_DOMAIN
55 # undef FLOAT_CHECK_DOMAIN
56 # endif
57 #endif
58
59 #ifndef NO_FLOAT_CHECK_ERRNO
60 #define FLOAT_CHECK_ERRNO
61 #endif
62
63 #ifdef FLOAT_CHECK_ERRNO
64 # include <errno.h>
65 #endif
66
67 /* Avoid traps on VMS from sinh and cosh.
68 All the other functions set errno instead. */
69
70 #ifdef VMS
71 #undef cosh
72 #undef sinh
73 #define cosh(x) ((exp(x)+exp(-x))*0.5)
74 #define sinh(x) ((exp(x)-exp(-x))*0.5)
75 #endif /* VMS */
76
77 #ifndef isnan
78 # define isnan(x) ((x) != (x))
79 #endif
80