w-mckinnon 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. From bmck@bnr.ca Mon Aug 28 10:57:50 1995
  2. Received: from bnr.ca (x400gate.bnr.ca [192.58.194.73]) by gluttony.isc.tamu.edu (8.6.11/8.6.11) with SMTP id KAA05152 for <des@isc.tamu.edu>; Mon, 28 Aug 1995 10:57:42 -0500
  3. X400-Received:
  4. by mta bnr.ca in /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 28 Aug 1995 11:55:55 -0400
  5. X400-Received:
  6. by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 28 Aug 1995 10:04:07 -0400
  7. X400-Received:
  8. by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 28 Aug 1995 09:30:00 -0400
  9. Date: Mon, 28 Aug 1995 09:30:00 -0400
  10. X400-Originator: /dd.id=1736981/g=bill/i=b/s=mckinnon/@bnr.ca
  11. X400-MTS-Identifier:
  12. [/PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/;bcars735.b.396:28.07.95.14.04.07]
  13. X400-Content-Type: P2-1984 (2)
  14. Content-Identifier: Re: Meschach ...
  15. From: "bill (b.) mckinnon" <bmck@bnr.ca>
  16. Sender: "bill (b.) mckinnon" <bmck@bnr.ca>
  17. Message-ID: <"13392 Mon Aug 28 10:04:17 1995"@bnr.ca>
  18. To: des@isc.tamu.edu
  19. Subject: Re: Meschach v.1.2b
  20. Content-Length: 6245
  21. X-Lines: 267
  22. Status: RO
  23. In message "Meschach v.1.2b", you write:
  24. > Dear Bill,
  25. >
  26. > Thank you for your message. Please accept my apologies for the
  27. > delayed response... We are glad to have you as a Meschach user.
  28. > We would also be glad to hear of your suggestions for fixing and improving
  29. > Meschach. We have had reports of problems with HP machines.
  30. >
  31. > Yours,
  32. > David Stewart
  33. >
  34. David ...
  35. No problem on the delay. I understand the problem ... ;-)
  36. I'm using HP-UX 9.01 on an HP700s. I started with the "GCC" version of
  37. "machine.h" and "makefile". After running "./configure", the "machine.h"
  38. file which is generated "#include'd <malloc.h>" before <stdio.h> (which
  39. the HP version of "cc" does not like). My amended version of "machine.h"
  40. is included below; the differences start around line 68.
  41. Also, the "cc" compiler seems to require "-Aa" to be put in the CFLAGS in the
  42. makefile (this option forces ANSI compatibility). Otherwise, the library and
  43. its entries are created, but the functions do not seem be accessible from
  44. code. Also, the ".o" files which are created without the "-Aa" are on the
  45. order of ~400 bytes ... a bit small from my experience. With the "-Aa", the
  46. object files are 1K or 2Kbytes. Several "redefinitions of macro HUGE_VAL"
  47. also occur at compilation which don't seem to be a problem.
  48. These changes seem to generate the "meschach.a" library ok. Let me know if I
  49. can help further.
  50. Bill McKinnon
  51. ---------- machine.h ------------
  52. /* machine.h. Generated automatically by configure. */
  53. /* Any machine specific stuff goes here */
  54. /* Add details necessary for your own installation here! */
  55. /* RCS id: $Id: machine.h.in,v 1.2 1994/03/13 23:07:30 des Exp $ */
  56. /* This is for use with "configure" -- if you are not using configure
  57. then use machine.van for the "vanilla" version of machine.h */
  58. /* Note special macros: ANSI_C (ANSI C syntax)
  59. SEGMENTED (segmented memory machine e.g. MS-DOS)
  60. MALLOCDECL (declared if malloc() etc have
  61. been declared) */
  62. #define const
  63. /* #undef MALLOCDECL */
  64. #define NOT_SEGMENTED 1
  65. #define HAVE_MEMORY_H 1
  66. /* #undef HAVE_COMPLEX_H */
  67. #define HAVE_MALLOC_H 1
  68. #define STDC_HEADERS 1
  69. #define HAVE_BCOPY 1
  70. #define HAVE_BZERO 1
  71. #define CHAR0ISDBL0 1
  72. #define WORDS_BIGENDIAN 1
  73. /* #undef U_INT_DEF */
  74. #define VARARGS 1
  75. /* #undef HAVE_PROTOTYPES */
  76. /* #undef HAVE_PROTOTYPES_IN_STRUCT */
  77. /* for inclusion into C++ files */
  78. #ifdef __cplusplus
  79. #define ANSI_C 1
  80. #ifndef HAVE_PROTOTYPES
  81. #define HAVE_PROTOTYPES 1
  82. #endif
  83. #ifndef HAVE_PROTOTYPES_IN_STRUCT
  84. #define HAVE_PROTOTYPES_IN_STRUCT 1
  85. #endif
  86. #endif /* __cplusplus */
  87. /* example usage: VEC *PROTO(v_get,(int dim)); */
  88. #ifdef HAVE_PROTOTYPES
  89. #define PROTO(name,args) name args
  90. #else
  91. #define PROTO(name,args) name()
  92. #endif /* HAVE_PROTOTYPES */
  93. #ifdef HAVE_PROTOTYPES_IN_STRUCT
  94. /* PROTO_() is to be used instead of PROTO() in struct's and typedef's */
  95. #define PROTO_(name,args) name args
  96. #else
  97. #define PROTO_(name,args) name()
  98. #endif /* HAVE_PROTOTYPES_IN_STRUCT */
  99. /* for basic or larger versions */
  100. #define COMPLEX 1
  101. #define SPARSE 1
  102. /* for loop unrolling */
  103. /* #undef VUNROLL */
  104. /* #undef MUNROLL */
  105. /* for segmented memory */
  106. #ifndef NOT_SEGMENTED
  107. #define SEGMENTED
  108. #endif
  109. <<<<<<<<<<<<<<<<<< differences start here --- BMcK >>>>>>>>>>>>>>>>>>>>>
  110. /* any compiler should have this header */
  111. /* if not, change it */
  112. #include <stdio.h>
  113. /* Check for ANSI C memmove and memset */
  114. #ifdef STDC_HEADERS
  115. /* standard copy & zero functions */
  116. #define MEM_COPY(from,to,size) memmove((to),(from),(size))
  117. #define MEM_ZERO(where,size) memset((where),'\0',(size))
  118. #ifndef ANSI_C
  119. #define ANSI_C 1
  120. #endif
  121. #endif
  122. /* standard headers */
  123. #ifdef ANSI_C
  124. #include <stdlib.h>
  125. #include <stddef.h>
  126. #include <string.h>
  127. #include <float.h>
  128. #endif
  129. /* if the system has malloc.h */
  130. #ifdef HAVE_MALLOC_H
  131. #define MALLOCDECL 1
  132. #include <malloc.h>
  133. #endif
  134. <<<<<<<<<<<<<<<<< end of differences --- BMcK >>>>>>>>>>>>>>>>>>>
  135. /* if have bcopy & bzero and no alternatives yet known, use them */
  136. #ifdef HAVE_BCOPY
  137. #ifndef MEM_COPY
  138. /* nonstandard copy function */
  139. #define MEM_COPY(from,to,size) bcopy((char *)(from),(char *)(to),(int)(size))
  140. #endif
  141. #endif
  142. #ifdef HAVE_BZERO
  143. #ifndef MEM_ZERO
  144. /* nonstandard zero function */
  145. #define MEM_ZERO(where,size) bzero((char *)(where),(int)(size))
  146. #endif
  147. #endif
  148. /* if the system has complex.h */
  149. #ifdef HAVE_COMPLEX_H
  150. #include <complex.h>
  151. #endif
  152. /* If prototypes are available & ANSI_C not yet defined, then define it,
  153. but don't include any header files as the proper ANSI C headers
  154. aren't here */
  155. #ifdef HAVE_PROTOTYPES
  156. #ifndef ANSI_C
  157. #define ANSI_C 1
  158. #endif
  159. #endif
  160. /* floating point precision */
  161. /* you can choose single, double or long double (if available) precision */
  162. #define FLOAT 1
  163. #define DOUBLE 2
  164. #define LONG_DOUBLE 3
  165. /* #undef REAL_FLT */
  166. /* #undef REAL_DBL */
  167. /* if nothing is defined, choose double precision */
  168. #ifndef REAL_DBL
  169. #ifndef REAL_FLT
  170. #define REAL_DBL 1
  171. #endif
  172. #endif
  173. /* single precision */
  174. #ifdef REAL_FLT
  175. #define Real float
  176. #define LongReal float
  177. #define REAL FLOAT
  178. #define LONGREAL FLOAT
  179. #endif
  180. /* double precision */
  181. #ifdef REAL_DBL
  182. #define Real double
  183. #define LongReal double
  184. #define REAL DOUBLE
  185. #define LONGREAL DOUBLE
  186. #endif
  187. /* machine epsilon or unit roundoff error */
  188. /* This is correct on most IEEE Real precision systems */
  189. #ifdef DBL_EPSILON
  190. #if REAL == DOUBLE
  191. #define MACHEPS DBL_EPSILON
  192. #elif REAL == FLOAT
  193. #define MACHEPS FLT_EPSILON
  194. #elif REAL == LONGDOUBLE
  195. #define MACHEPS LDBL_EPSILON
  196. #endif
  197. #endif
  198. #define F_MACHEPS 1.19209e-07
  199. #define D_MACHEPS 2.22045e-16
  200. #ifndef MACHEPS
  201. #if REAL == DOUBLE
  202. #define MACHEPS D_MACHEPS
  203. #elif REAL == FLOAT
  204. #define MACHEPS F_MACHEPS
  205. #elif REAL == LONGDOUBLE
  206. #define MACHEPS D_MACHEPS
  207. #endif
  208. #endif
  209. /* #undef M_MACHEPS */
  210. /********************
  211. #ifdef DBL_EPSILON
  212. #define MACHEPS DBL_EPSILON
  213. #endif
  214. #ifdef M_MACHEPS
  215. #ifndef MACHEPS
  216. #define MACHEPS M_MACHEPS
  217. #endif
  218. #endif
  219. ********************/
  220. #define M_MAX_INT 2147483647
  221. #ifdef M_MAX_INT
  222. #ifndef MAX_RAND
  223. #define MAX_RAND ((double)(M_MAX_INT))
  224. #endif
  225. #endif
  226. /* for non-ANSI systems */
  227. #ifndef HUGE_VAL
  228. #define HUGE_VAL HUGE
  229. #else
  230. #ifndef HUGE
  231. #define HUGE HUGE_VAL
  232. #endif
  233. #endif
  234. #ifdef ANSI_C
  235. extern int isatty(int);
  236. #endif