machine.h 3.7 KB

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