machine.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /* machine.h. Generated automatically by configure. */
  2. /* Any machine specific stuff goes here */
  3. /* Add details necessary for your own installation here! */
  4. /* This is for use with "configure" -- if you are not using configure
  5. then use machine.van for the "vanilla" version of machine.h */
  6. /* Note special macros: ANSI_C (ANSI C syntax)
  7. SEGMENTED (segmented memory machine e.g. MS-DOS)
  8. MALLOCDECL (declared if malloc() etc have
  9. been declared) */
  10. /* #undef const */
  11. /* #undef MALLOCDECL */
  12. #define NOT_SEGMENTED 1
  13. /* #undef HAVE_COMPLEX_H */
  14. #define HAVE_MALLOC_H 1
  15. #define STDC_HEADERS 1
  16. #define HAVE_BCOPY 1
  17. #define HAVE_BZERO 1
  18. #define CHAR0ISDBL0 1
  19. /* #undef WORDS_BIGENDIAN */
  20. #define U_INT_DEF 1
  21. #define VARARGS 1
  22. /* for basic or larger versions */
  23. #define COMPLEX 1
  24. #define SPARSE 1
  25. /* for loop unrolling */
  26. /* #undef VUNROLL */
  27. /* #undef MUNROLL */
  28. /* for segmented memory */
  29. #ifndef NOT_SEGMENTED
  30. #define SEGMENTED
  31. #endif
  32. /* if the system has malloc.h */
  33. #ifdef HAVE_MALLOC_H
  34. #define MALLOCDECL 1
  35. #include <malloc.h>
  36. #endif
  37. /* any compiler should have this header */
  38. /* if not, change it */
  39. #include <stdio.h>
  40. /* Check for ANSI C memmove and memset */
  41. #ifdef STDC_HEADERS
  42. /* standard copy & zero functions */
  43. #define MEM_COPY(from,to,size) memmove((to),(from),(size))
  44. #define MEM_ZERO(where,size) memset((where),'\0',(size))
  45. #ifndef ANSI_C
  46. #define ANSI_C 1
  47. #endif
  48. #endif
  49. /* standard headers */
  50. #ifdef ANSI_C
  51. #include <stdlib.h>
  52. #include <stddef.h>
  53. #include <string.h>
  54. #include <float.h>
  55. #endif
  56. /* if have bcopy & bzero and no alternatives yet known, use them */
  57. #ifdef HAVE_BCOPY
  58. #ifndef MEM_COPY
  59. /* nonstandard copy function */
  60. #define MEM_COPY(from,to,size) bcopy((char *)(from),(char *)(to),(int)(size))
  61. #endif
  62. #endif
  63. #ifdef HAVE_BZERO
  64. #ifndef MEM_ZERO
  65. /* nonstandard zero function */
  66. #define MEM_ZERO(where,size) bzero((char *)(where),(int)(size))
  67. #endif
  68. #endif
  69. /* if the system has complex.h */
  70. #ifdef HAVE_COMPLEX_H
  71. #include <complex.h>
  72. #endif
  73. /* If prototypes are available & ANSI_C not yet defined, then define it,
  74. but don't include any header files as the proper ANSI C headers
  75. aren't here */
  76. #define HAVE_PROTOTYPES 1
  77. #ifdef HAVE_PROTOTYPES
  78. #ifndef ANSI_C
  79. #define ANSI_C 1
  80. #endif
  81. #endif
  82. /* floating point precision */
  83. /* you can choose single, double or long double (if available) precision */
  84. #define FLOAT 1
  85. #define DOUBLE 2
  86. #define LONG_DOUBLE 3
  87. /* #undef REAL_FLT */
  88. /* #undef REAL_DBL */
  89. /* if nothing is defined, choose double precision */
  90. #ifndef REAL_DBL
  91. #ifndef REAL_FLT
  92. #define REAL_DBL 1
  93. #endif
  94. #endif
  95. /* single precision */
  96. #ifdef REAL_FLT
  97. #define Real float
  98. #define LongReal float
  99. #define REAL FLOAT
  100. #define LONGREAL FLOAT
  101. #endif
  102. /* double precision */
  103. #ifdef REAL_DBL
  104. #define Real double
  105. #define LongReal double
  106. #define REAL DOUBLE
  107. #define LONGREAL DOUBLE
  108. #endif
  109. /* machine epsilon or unit roundoff error */
  110. /* This is correct on most IEEE Real precision systems */
  111. #ifdef DBL_EPSILON
  112. #if REAL == DOUBLE
  113. #define MACHEPS DBL_EPSILON
  114. #elif REAL == FLOAT
  115. #define MACHEPS FLT_EPSILON
  116. #elif REAL == LONGDOUBLE
  117. #define MACHEPS LDBL_EPSILON
  118. #endif
  119. #endif
  120. #define F_MACHEPS 1.19209e-07
  121. #define D_MACHEPS 2.22045e-16
  122. #ifndef MACHEPS
  123. #if REAL == DOUBLE
  124. #define MACHEPS D_MACHEPS
  125. #elif REAL == FLOAT
  126. #define MACHEPS F_MACHEPS
  127. #elif REAL == LONGDOUBLE
  128. #define MACHEPS D_MACHEPS
  129. #endif
  130. #endif
  131. /* #undef M_MACHEPS */
  132. /********************
  133. #ifdef DBL_EPSILON
  134. #define MACHEPS DBL_EPSILON
  135. #endif
  136. #ifdef M_MACHEPS
  137. #ifndef MACHEPS
  138. #define MACHEPS M_MACHEPS
  139. #endif
  140. #endif
  141. ********************/
  142. #define M_MAX_INT 2147483647
  143. #ifdef M_MAX_INT
  144. #ifndef MAX_RAND
  145. #define MAX_RAND ((double)(M_MAX_INT))
  146. #endif
  147. #endif
  148. /* for non-ANSI systems */
  149. #ifndef HUGE_VAL
  150. #define HUGE_VAL HUGE
  151. #endif
  152. #ifdef ANSI_C
  153. //extern int isatty(int); // Needed to comment this out to get rid of compiler error (MWB)
  154. #endif