machine.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. /* machine.h. Generated automatically by configure. */
  2. /* Modified by Billie Leung (cml@interaccess.com) 6th May, 1996
  3. for Watcom C compiler v.10.0 under MS-DOS */
  4. /* Any machine specific stuff goes here */
  5. /* Add details necessary for your own installation here! */
  6. /* RCS id: $Id: machine.h.in,v 1.3 1995/03/27 15:36:21 des Exp $ */
  7. /* This is for use with "configure" -- if you are not using configure
  8. then use machine.van for the "vanilla" version of machine.h */
  9. /* Note special macros: ANSI_C (ANSI C syntax)
  10. SEGMENTED (segmented memory machine e.g. MS-DOS)
  11. MALLOCDECL (declared if malloc() etc have
  12. been declared) */
  13. #ifndef _MACHINE_H
  14. #define _MACHINE_H 1
  15. #define const
  16. /* #undef MALLOCDECL */
  17. #define NOT_SEGMENTED 1
  18. #define HAVE_MEMORY_H 1
  19. /* #undef HAVE_COMPLEX_H */
  20. #define HAVE_MALLOC_H 1
  21. #define STDC_HEADERS 1
  22. #define HAVE_BCOPY 1
  23. #define HAVE_BZERO 1
  24. #define CHAR0ISDBL0 1
  25. #define WORDS_BIGENDIAN 1
  26. /* #undef U_INT_DEF */
  27. #define VARARGS 1
  28. #define HAVE_PROTOTYPES 1
  29. /* #undef HAVE_PROTOTYPES_IN_STRUCT */
  30. /* for inclusion into C++ files */
  31. #ifdef __cplusplus
  32. #define ANSI_C 1
  33. #ifndef HAVE_PROTOTYPES
  34. #define HAVE_PROTOTYPES 1
  35. #endif
  36. #ifndef HAVE_PROTOTYPES_IN_STRUCT
  37. #define HAVE_PROTOTYPES_IN_STRUCT 1
  38. #endif
  39. #endif /* __cplusplus */
  40. /* example usage: VEC *PROTO(v_get,(int dim)); */
  41. #ifdef HAVE_PROTOTYPES
  42. #define PROTO(name,args) name args
  43. #else
  44. #define PROTO(name,args) name()
  45. #endif /* HAVE_PROTOTYPES */
  46. #ifdef HAVE_PROTOTYPES_IN_STRUCT
  47. /* PROTO_() is to be used instead of PROTO() in struct's and typedef's */
  48. #define PROTO_(name,args) name args
  49. #else
  50. #define PROTO_(name,args) name()
  51. #endif /* HAVE_PROTOTYPES_IN_STRUCT */
  52. /* for basic or larger versions */
  53. #define COMPLEX 1
  54. #define SPARSE 1
  55. /* for loop unrolling */
  56. /* #undef VUNROLL */
  57. /* #undef MUNROLL */
  58. /* for segmented memory */
  59. #ifndef NOT_SEGMENTED
  60. #define SEGMENTED
  61. #endif
  62. /* if the system has malloc.h */
  63. #ifdef HAVE_MALLOC_H
  64. #define MALLOCDECL 1
  65. #include <malloc.h>
  66. #endif
  67. /* any compiler should have this header */
  68. /* if not, change it */
  69. #include <stdio.h>
  70. /* Check for ANSI C memmove and memset */
  71. #ifdef STDC_HEADERS
  72. /* standard copy & zero functions */
  73. #define MEM_COPY(from,to,size) memmove((to),(from),(size))
  74. #define MEM_ZERO(where,size) memset((where),'\0',(size))
  75. #ifndef ANSI_C
  76. #define ANSI_C 1
  77. #endif
  78. #endif
  79. /* standard headers */
  80. #ifdef ANSI_C
  81. #include <stdlib.h>
  82. #include <stddef.h>
  83. #include <string.h>
  84. #include <float.h>
  85. #endif
  86. /* if have bcopy & bzero and no alternatives yet known, use them */
  87. #ifdef HAVE_BCOPY
  88. #ifndef MEM_COPY
  89. /* nonstandard copy function */
  90. #define MEM_COPY(from,to,size) bcopy((char *)(from),(char *)(to),(int)(size))
  91. #endif
  92. #endif
  93. #ifdef HAVE_BZERO
  94. #ifndef MEM_ZERO
  95. /* nonstandard zero function */
  96. #define MEM_ZERO(where,size) bzero((char *)(where),(int)(size))
  97. #endif
  98. #endif
  99. /* if the system has complex.h */
  100. #ifdef HAVE_COMPLEX_H
  101. #include <complex.h>
  102. #endif
  103. /* If prototypes are available & ANSI_C not yet defined, then define it,
  104. but don't include any header files as the proper ANSI C headers
  105. aren't here */
  106. #ifdef HAVE_PROTOTYPES
  107. #ifndef ANSI_C
  108. #define ANSI_C 1
  109. #endif
  110. #endif
  111. /* floating point precision */
  112. /* you can choose single, double or long double (if available) precision */
  113. #define FLOAT 1
  114. #define DOUBLE 2
  115. #define LONG_DOUBLE 3
  116. /* #undef REAL_FLT */
  117. /* #undef REAL_DBL */
  118. /* if nothing is defined, choose double precision */
  119. #ifndef REAL_DBL
  120. #ifndef REAL_FLT
  121. #define REAL_DBL 1
  122. #endif
  123. #endif
  124. /* single precision */
  125. #ifdef REAL_FLT
  126. #define Real float
  127. #define LongReal float
  128. #define REAL FLOAT
  129. #define LONGREAL FLOAT
  130. #endif
  131. /* double precision */
  132. #ifdef REAL_DBL
  133. #define Real double
  134. #define LongReal double
  135. #define REAL DOUBLE
  136. #define LONGREAL DOUBLE
  137. #endif
  138. /* machine epsilon or unit roundoff error */
  139. /* This is correct on most IEEE Real precision systems */
  140. #ifdef DBL_EPSILON
  141. #if REAL == DOUBLE
  142. #define MACHEPS DBL_EPSILON
  143. #elif REAL == FLOAT
  144. #define MACHEPS FLT_EPSILON
  145. #elif REAL == LONGDOUBLE
  146. #define MACHEPS LDBL_EPSILON
  147. #endif
  148. #endif
  149. #define F_MACHEPS 1.19209e-07
  150. #define D_MACHEPS 2.22045e-16
  151. #ifndef MACHEPS
  152. #if REAL == DOUBLE
  153. #define MACHEPS D_MACHEPS
  154. #elif REAL == FLOAT
  155. #define MACHEPS F_MACHEPS
  156. #elif REAL == LONGDOUBLE
  157. #define MACHEPS D_MACHEPS
  158. #endif
  159. #endif
  160. /* #undef M_MACHEPS */
  161. /********************
  162. #ifdef DBL_EPSILON
  163. #define MACHEPS DBL_EPSILON
  164. #endif
  165. #ifdef M_MACHEPS
  166. #ifndef MACHEPS
  167. #define MACHEPS M_MACHEPS
  168. #endif
  169. #endif
  170. ********************/
  171. #define M_MAX_INT 2147483647
  172. #ifdef M_MAX_INT
  173. #ifndef MAX_RAND
  174. #define MAX_RAND ((double)(M_MAX_INT))
  175. #endif
  176. #endif
  177. /* for non-ANSI systems
  178. #ifndef HUGE_VAL
  179. #define HUGE_VAL HUGE
  180. #else
  181. */
  182. #ifndef HUGE
  183. #define HUGE HUGE_VAL
  184. #endif
  185. // #endif
  186. #ifdef ANSI_C
  187. extern int isatty(int);
  188. #endif
  189. #endif