You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.8 KiB

24 years ago
24 years ago
27 years ago
24 years ago
24 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1998-2003 Zend Technologies Ltd. (http://www.zend.com) |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 2.00 of the Zend license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.zend.com/license/2_00.txt. |
  11. | If you did not receive a copy of the Zend license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@zend.com so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Andi Gutmans <andi@zend.com> |
  16. | Zeev Suraski <zeev@zend.com> |
  17. +----------------------------------------------------------------------+
  18. */
  19. /* $Id$ */
  20. #define ZEND_API
  21. #define ZEND_DLEXPORT
  22. #define ZEND_DLIMPORT
  23. #ifndef NETWARE
  24. @TOP@
  25. #endif
  26. #undef uint
  27. #undef ulong
  28. /* Define if you want to enable memory limit support */
  29. #define MEMORY_LIMIT 0
  30. #ifndef NETWARE
  31. @BOTTOM@
  32. #endif
  33. #ifdef HAVE_STDLIB_H
  34. # include <stdlib.h>
  35. #endif
  36. #ifdef HAVE_SYS_TYPES_H
  37. # include <sys/types.h>
  38. #endif
  39. #ifdef HAVE_IEEEFP_H
  40. # include <ieeefp.h>
  41. #endif
  42. #ifdef HAVE_STRING_H
  43. # include <string.h>
  44. #else
  45. # include <strings.h>
  46. #endif
  47. #if ZEND_BROKEN_SPRINTF
  48. int zend_sprintf(char *buffer, const char *format, ...);
  49. #else
  50. # define zend_sprintf sprintf
  51. #endif
  52. #include <math.h>
  53. #ifndef zend_isnan
  54. #ifdef HAVE_ISNAN
  55. #define zend_isnan(a) isnan(a)
  56. #elif defined(NAN)
  57. #define zend_isnan(a) (((a)==NAN)?1:0)
  58. #elif defined(HAVE_FPCLASS)
  59. #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
  60. #else
  61. #define zend_isnan(a) 0
  62. #endif
  63. #endif
  64. #ifdef HAVE_ISINF
  65. #define zend_isinf(a) isinf(a)
  66. #elif defined(INFINITY)
  67. /* Might not work, but is required by ISO C99 */
  68. #define zend_isinf(a) (((a)==INFINITY)?1:0)
  69. #elif defined(HAVE_FPCLASS)
  70. #define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
  71. #else
  72. #define zend_isinf(a) 0
  73. #endif
  74. #ifdef HAVE_FINITE
  75. #define zend_finite(a) finite(a)
  76. #elif defined(HAVE_ISFINITE) || defined(isfinite)
  77. #define zend_finite(a) isfinite(a)
  78. #elif defined(fpclassify)
  79. #define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
  80. #else
  81. #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
  82. #endif
  83. /*
  84. * Local variables:
  85. * tab-width: 4
  86. * c-basic-offset: 4
  87. * indent-tabs-mode: t
  88. * End:
  89. */