home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / sysfloat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-01  |  2.0 KB  |  78 lines

  1. /*
  2.    Copyright (C) 1995 Amdahl Corporation.
  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 the Free
  18. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Work around a problem that happens because math.h on hpux 7
  21.    defines two static variables--which, in Emacs, are not really static,
  22.    because `static' is defined as nothing.  The problem is that they are
  23.    defined both in data.c and in floatfns.c.
  24.    These macros prevent the name conflict.
  25.  
  26.    (Is it still necessary to define static to nothing on hpux7?
  27.    Removing that would be the best fix. -jwz)
  28.   */
  29. # if defined (HPUX) && !defined (HPUX8)
  30. #  define _MAXLDBL THIS_FILENAME ## _maxldbl
  31. #  define _NMAXLDBL THIS_FILENAME ## _nmaxldbl
  32. # endif
  33.  
  34. #ifdef MSDOS
  35. /* These are redefined (correctly, but differently) in values.h.  */
  36. #undef INTBITS
  37. #undef LONGBITS
  38. #undef SHORTBITS
  39. #endif
  40.  
  41. #include <math.h>
  42.  
  43. #ifdef NO_MATHERR
  44. #undef HAVE_MATHERR
  45. #endif
  46.  
  47. #ifdef HAVE_MATHERR
  48. # ifdef FLOAT_CHECK_ERRNO
  49. #  undef FLOAT_CHECK_ERRNO
  50. # endif
  51. # ifdef FLOAT_CHECK_DOMAIN
  52. #  undef FLOAT_CHECK_DOMAIN
  53. # endif
  54. #endif
  55.  
  56. #ifndef NO_FLOAT_CHECK_ERRNO
  57. #define FLOAT_CHECK_ERRNO
  58. #endif
  59.  
  60. #ifdef FLOAT_CHECK_ERRNO
  61. # include <errno.h>
  62. #endif
  63.  
  64. /* Avoid traps on VMS from sinh and cosh.
  65.    All the other functions set errno instead.  */
  66.  
  67. #ifdef VMS
  68. #undef cosh
  69. #undef sinh
  70. #define cosh(x) ((exp(x)+exp(-x))*0.5)
  71. #define sinh(x) ((exp(x)-exp(-x))*0.5)
  72. #endif /* VMS */
  73.  
  74. #ifndef isnan
  75. # define isnan(x) ((x) != (x))
  76. #endif
  77.  
  78.