__scm.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. /* classes: h_files */
  2. #ifndef __SCMH
  3. #define __SCMH
  4. /* Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2, or (at your option)
  9. * any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this software; see the file COPYING. If not, write to
  18. * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  19. * Boston, MA 02111-1307 USA
  20. *
  21. * As a special exception, the Free Software Foundation gives permission
  22. * for additional uses of the text contained in its release of GUILE.
  23. *
  24. * The exception is that, if you link the GUILE library with other files
  25. * to produce an executable, this does not by itself cause the
  26. * resulting executable to be covered by the GNU General Public License.
  27. * Your use of that executable is in no way restricted on account of
  28. * linking the GUILE library code into it.
  29. *
  30. * This exception does not however invalidate any other reasons why
  31. * the executable file might be covered by the GNU General Public License.
  32. *
  33. * This exception applies only to the code released by the
  34. * Free Software Foundation under the name GUILE. If you copy
  35. * code from other Free Software Foundation releases into a copy of
  36. * GUILE, as the General Public License permits, the exception does
  37. * not apply to the code that you add in this way. To avoid misleading
  38. * anyone as to the status of such modified files, you must delete
  39. * this exception notice from them.
  40. *
  41. * If you write modifications of your own for GUILE, it is your choice
  42. * whether to permit this exception to apply to your modifications.
  43. * If you do not wish that, delete this exception notice. */
  44. /* "What's the difference between _scm.h and __scm.h?"
  45. _scm.h is not installed; it's only visible to the libguile sources
  46. themselves.
  47. __scm.h is installed, and is #included by <libguile.h>. If both
  48. the client and libguile need some piece of information, and it
  49. doesn't fit well into the header file for any particular module, it
  50. should go in __scm.h. */
  51. /* {Supported Options}
  52. *
  53. * These may be defined or undefined.
  54. */
  55. /* Old async mechanism */
  56. /* #define GUILE_OLD_ASYNC_CLICK */
  57. /* #define GUILE_DEBUG_FREELIST */
  58. /* If the compile FLAG `SCM_CAUTIOUS' is #defined then the number of
  59. * arguments is always checked for application of closures. If the
  60. * compile FLAG `SCM_RECKLESS' is #defined then they are not checked.
  61. * Otherwise, number of argument checks for closures are made only when
  62. * the function position (whose value is the closure) of a combination is
  63. * not an ILOC or GLOC. When the function position of a combination is a
  64. * symbol it will be checked only the first time it is evaluated because
  65. * it will then be replaced with an ILOC or GLOC.
  66. */
  67. #undef SCM_RECKLESS
  68. #define SCM_CAUTIOUS
  69. /* After looking up a local for the first time, rewrite the
  70. * code graph, caching its position.
  71. */
  72. #define MEMOIZE_LOCALS
  73. /* All the number support there is.
  74. */
  75. #define BIGNUMS
  76. /* GC should relinquish empty cons-pair arenas. */
  77. /* cmm:FIXME look at this after done mangling the GC */
  78. /* #define GC_FREE_SEGMENTS */
  79. /* Provide a scheme-accessible count-down timer that
  80. * generates a pseudo-interrupt.
  81. */
  82. #define TICKS
  83. /* Use engineering notation when converting numbers strings?
  84. */
  85. #undef ENGNOT
  86. #undef SCM_CAREFUL_INTS
  87. /* {Unsupported Options}
  88. *
  89. * These must be defined as given here.
  90. */
  91. #define CCLO
  92. /* Guile Scheme supports the #f/() distinction; Guile Lisp won't. We
  93. have horrible plans for their unification. */
  94. #undef SICP
  95. /* Random options (not yet supported or in final form). */
  96. #define STACK_CHECKING
  97. #undef NO_CEVAL_STACK_CHECKING
  98. /* What did the configure script discover about the outside world? */
  99. #include "libguile/scmconfig.h"
  100. /* {Debugging Options}
  101. *
  102. * These compile time options determine whether to include code that is only
  103. * useful for debugging guile itself or C level extensions to guile. The
  104. * common prefix for all option macros of this kind is "SCM_DEBUG_". It is
  105. * guaranteed that a macro named SCM_DEBUG_XXX is defined to be either 0 or 1,
  106. * i. e. there is no need to test for the undefined case. This allows to use
  107. * these definitions comfortably in macro code, as in the following example:
  108. * #define FOO do { if (SCM_DEBUG_XXX) bar(); else baz(); } while (0)
  109. * Any sane compiler will remove the unused branch without any performance
  110. * penalty for the resulting code.
  111. *
  112. * Note: Some SCM_DEBUG_XXX options are not settable at configure time.
  113. * To change the value of such options you will have to edit this header
  114. * file or give suitable options to make, like:
  115. * make all CFLAGS="-DSCM_DEBUG_XXX=1 ..."
  116. */
  117. /* The value of SCM_DEBUG determines the default for most of the not yet
  118. * defined debugging options. This allows, for example, to enable most of the
  119. * debugging options by simply defining SCM_DEBUG as 1.
  120. */
  121. #ifndef SCM_DEBUG
  122. #define SCM_DEBUG 0
  123. #endif
  124. /* If SCM_DEBUG_CELL_ACCESSES is set to 1, cell accesses will perform
  125. * exhaustive parameter checking: It will be verified that cell parameters
  126. * actually point to a valid heap cell. Note: If this option is enabled,
  127. * guile will run about ten times slower than normally.
  128. */
  129. #ifndef SCM_DEBUG_CELL_ACCESSES
  130. #define SCM_DEBUG_CELL_ACCESSES SCM_DEBUG
  131. #endif
  132. /* If SCM_DEBUG_DEPRECATED is set to 1, deprecated code is not compiled. This
  133. * can be used by developers to get rid of references to deprecated code.
  134. */
  135. #ifndef SCM_DEBUG_DEPRECATED
  136. #define SCM_DEBUG_DEPRECATED SCM_DEBUG
  137. #endif
  138. /* If SCM_DEBUG_REST_ARGUMENT is set to 1, functions that take rest arguments
  139. * will check whether the rest arguments are actually passed as a proper list.
  140. * Otherwise, if SCM_DEBUG_REST_ARGUMENT is 0, functions that take rest
  141. * arguments will take it for granted that these are passed as a proper list.
  142. */
  143. #ifndef SCM_DEBUG_REST_ARGUMENT
  144. #define SCM_DEBUG_REST_ARGUMENT SCM_DEBUG
  145. #endif
  146. /* Use this for _compile time_ type checking only, since the compiled result
  147. * will be quite inefficient. The right way to make use of this option is to
  148. * do a 'make clean; make CFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=1', fix your
  149. * errors, and then do 'make clean; make'.
  150. */
  151. #ifndef SCM_DEBUG_TYPING_STRICTNESS
  152. #define SCM_DEBUG_TYPING_STRICTNESS 0
  153. #endif
  154. #ifdef HAVE_LONG_LONGS
  155. /* Some auto-generated .h files contain unused prototypes
  156. * that need these typedefs.
  157. */
  158. typedef long long long_long;
  159. typedef unsigned long long ulong_long;
  160. #endif /* HAVE_LONG_LONGS */
  161. /* Define
  162. *
  163. * SCM_CHAR_CODE_LIMIT == UCHAR_MAX + 1
  164. * SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
  165. * SCM_MOST_NEGATIVE_FIXNUM == SCM_SRS((long)LONG_MIN, 2)
  166. */
  167. #ifdef HAVE_LIMITS_H
  168. # include <limits.h>
  169. # ifdef UCHAR_MAX
  170. # define SCM_CHAR_CODE_LIMIT (UCHAR_MAX+1L)
  171. # else
  172. # define SCM_CHAR_CODE_LIMIT 256L
  173. # endif /* def UCHAR_MAX */
  174. # define SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
  175. # ifdef _UNICOS /* Stupid cray bug */
  176. # define SCM_MOST_NEGATIVE_FIXNUM ((long)LONG_MIN/4)
  177. # else
  178. # define SCM_MOST_NEGATIVE_FIXNUM SCM_SRS((long)LONG_MIN, 2)
  179. # endif /* UNICOS */
  180. #else
  181. # define SCM_CHAR_CODE_LIMIT 256L
  182. # define SCM_MOST_POSITIVE_FIXNUM ((long)((unsigned long)~0L>>3))
  183. # if (0 != ~0)
  184. # define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
  185. # else
  186. # define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM)
  187. # endif /* (0 != ~0) */
  188. #endif /* def HAVE_LIMITS_H */
  189. #ifdef STDC_HEADERS
  190. # include <stdlib.h>
  191. # ifdef AMIGA
  192. # include <stddef.h>
  193. # endif /* def AMIGA */
  194. # define scm_sizet size_t
  195. #else
  196. # ifdef _SIZE_T
  197. # define scm_sizet size_t
  198. # else
  199. # define scm_sizet unsigned int
  200. # endif /* def _SIZE_T */
  201. #endif /* def STDC_HEADERS */
  202. #include "libguile/tags.h"
  203. #ifdef vms
  204. # ifndef CHEAP_CONTINUATIONS
  205. typedef int jmp_buf[17];
  206. extern int setjump(jmp_buf env);
  207. extern int longjump(jmp_buf env, int ret);
  208. # define setjmp setjump
  209. # define longjmp longjump
  210. # else
  211. # include <setjmp.h>
  212. # endif
  213. #else /* ndef vms */
  214. # ifdef _CRAY1
  215. typedef int jmp_buf[112];
  216. extern int setjump(jmp_buf env);
  217. extern int longjump(jmp_buf env, int ret);
  218. # define setjmp setjump
  219. # define longjmp longjump
  220. # else /* ndef _CRAY1 */
  221. # include <setjmp.h>
  222. # endif /* ndef _CRAY1 */
  223. #endif /* ndef vms */
  224. /* James Clark came up with this neat one instruction fix for
  225. * continuations on the SPARC. It flushes the register windows so
  226. * that all the state of the process is contained in the stack.
  227. */
  228. #ifdef sparc
  229. # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3")
  230. #else
  231. # define SCM_FLUSH_REGISTER_WINDOWS /* empty */
  232. #endif
  233. /* If stack is not longword aligned then
  234. */
  235. /* #define SHORT_ALIGN */
  236. #ifdef THINK_C
  237. # define SHORT_ALIGN
  238. #endif
  239. #ifdef MSDOS
  240. # define SHORT_ALIGN
  241. #endif
  242. #ifdef atarist
  243. # define SHORT_ALIGN
  244. #endif
  245. #ifdef SHORT_ALIGN
  246. typedef short SCM_STACKITEM;
  247. #else
  248. typedef long SCM_STACKITEM;
  249. #endif
  250. #ifndef USE_THREADS
  251. #define SCM_THREAD_DEFER
  252. #define SCM_THREAD_ALLOW
  253. #define SCM_THREAD_REDEFER
  254. #define SCM_THREAD_SWITCHING_CODE
  255. #endif
  256. #ifdef GUILE_OLD_ASYNC_CLICK
  257. extern unsigned int scm_async_clock;
  258. #define SCM_ASYNC_TICK \
  259. do { \
  260. if (0 == --scm_async_clock) \
  261. scm_async_click (); \
  262. } while(0)
  263. #else
  264. extern int scm_asyncs_pending_p;
  265. #define SCM_ASYNC_TICK /*fixme* should change names */ \
  266. do { \
  267. if (scm_asyncs_pending_p) \
  268. scm_async_click (); \
  269. } while (0)
  270. #endif
  271. #ifdef SCM_CAREFUL_INTS
  272. #define SCM_CHECK_NOT_DISABLED \
  273. if (scm_ints_disabled) \
  274. fputs("ints already disabled\n", stderr); \
  275. #define SCM_CHECK_NOT_ENABLED \
  276. if (!scm_ints_disabled) \
  277. fputs("ints already enabled\n", stderr); \
  278. #else
  279. #define SCM_CHECK_NOT_DISABLED
  280. #define SCM_CHECK_NOT_ENABLED
  281. #endif
  282. /* Anthony Green writes:
  283. When the compiler sees...
  284. DEFER_INTS;
  285. [critical code here]
  286. ALLOW_INTS;
  287. ...it doesn't actually promise to keep the critical code within the
  288. boundries of the DEFER/ALLOW_INTS instructions. It may very well
  289. schedule it outside of the magic defined in those macros.
  290. However, GCC's volatile asm feature forms a barrier over which code is
  291. never moved. So if you add...
  292. asm ("");
  293. ...to each of the DEFER_INTS and ALLOW_INTS macros, the critical
  294. code will always remain in place. asm's without inputs or outputs
  295. are implicitly volatile. */
  296. #ifdef __GNUC__
  297. #define SCM_FENCE asm /* volatile */ ("")
  298. #else
  299. #define SCM_FENCE
  300. #endif
  301. #define SCM_DEFER_INTS \
  302. do { \
  303. SCM_FENCE; \
  304. SCM_CHECK_NOT_DISABLED; \
  305. SCM_THREAD_DEFER; \
  306. SCM_FENCE; \
  307. scm_ints_disabled = 1; \
  308. SCM_FENCE; \
  309. } while (0)
  310. #define SCM_ALLOW_INTS_ONLY \
  311. do { \
  312. SCM_THREAD_ALLOW; \
  313. scm_ints_disabled = 0; \
  314. } while (0)
  315. #define SCM_ALLOW_INTS \
  316. do { \
  317. SCM_FENCE; \
  318. SCM_CHECK_NOT_ENABLED; \
  319. SCM_THREAD_SWITCHING_CODE; \
  320. SCM_FENCE; \
  321. scm_ints_disabled = 0; \
  322. SCM_FENCE; \
  323. SCM_THREAD_ALLOW; \
  324. SCM_FENCE; \
  325. } while (0)
  326. #define SCM_REDEFER_INTS \
  327. do { \
  328. SCM_FENCE; \
  329. SCM_THREAD_REDEFER; \
  330. ++scm_ints_disabled; \
  331. SCM_FENCE; \
  332. } while (0)
  333. #define SCM_REALLOW_INTS \
  334. do { \
  335. SCM_FENCE; \
  336. SCM_THREAD_SWITCHING_CODE; \
  337. SCM_FENCE; \
  338. --scm_ints_disabled; \
  339. SCM_FENCE; \
  340. } while (0)
  341. #define SCM_TICK \
  342. do { \
  343. SCM_DEFER_INTS; \
  344. SCM_ALLOW_INTS; \
  345. SCM_ASYNC_TICK; \
  346. } while (0)
  347. /* Classification of critical sections
  348. *
  349. * When Guile moves to POSIX threads, it won't be possible to prevent
  350. * context switching. In fact, the whole idea of context switching is
  351. * bogus if threads are run by different processors. Therefore, we
  352. * must ultimately eliminate all critical sections or enforce them by
  353. * use of mutecis.
  354. *
  355. * All instances of SCM_DEFER_INTS and SCM_ALLOW_INTS should therefore
  356. * be classified and replaced by one of the delimiters below. If you
  357. * understand what this is all about, I'd like to encourage you to
  358. * help with this task. The set of classes below must of course be
  359. * incrementally augmented.
  360. *
  361. * MDJ 980419 <djurfeldt@nada.kth.se>
  362. */
  363. /* A sections
  364. *
  365. * Allocation of a cell with type tag in the CAR.
  366. *
  367. * With POSIX threads, each thread will have a private pool of free
  368. * cells. Therefore, this type of section can be removed. But! It
  369. * is important that the CDR is initialized first (with the CAR still
  370. * indicating a free cell) so that we can guarantee a consistent heap
  371. * at all times.
  372. */
  373. #ifdef SCM_POSIX_THREADS
  374. #define SCM_ENTER_A_SECTION
  375. #define SCM_EXIT_A_SECTION
  376. #else
  377. #define SCM_ENTER_A_SECTION SCM_DEFER_INTS
  378. #define SCM_EXIT_A_SECTION SCM_ALLOW_INTS
  379. #endif
  380. /** SCM_ASSERT
  381. **
  382. **/
  383. #ifdef SCM_RECKLESS
  384. #define SCM_ASSERT(_cond, _arg, _pos, _subr)
  385. #define SCM_ASSERT_TYPE(_cond, _arg, _pos, _subr)
  386. #define SCM_ASRTGO(_cond, _label)
  387. #else
  388. #define SCM_ASSERT(_cond, _arg, _pos, _subr) \
  389. if (!(_cond)) \
  390. scm_wta(_arg, (char *)(_pos), _subr)
  391. #define SCM_ASSERT_TYPE(_cond, _arg, _pos, _subr, _msg) \
  392. if (!(_cond)) \
  393. scm_wrong_type_arg_msg(_subr, _pos, _arg, _msg)
  394. #define SCM_ASRTGO(_cond, _label) \
  395. if (!(_cond)) \
  396. goto _label
  397. #endif
  398. /*
  399. * SCM_WTA_DISPATCH
  400. */
  401. /* Dirk:FIXME:: In all of the SCM_WTA_DISPATCH_* macros it is assumed that
  402. * 'gf' is zero if uninitialized. It would be cleaner if some valid SCM value
  403. * like SCM_BOOL_F or SCM_UNDEFINED was chosen.
  404. */
  405. extern SCM scm_call_generic_0 (SCM gf);
  406. #define SCM_WTA_DISPATCH_0(gf, arg, pos, subr) \
  407. return (SCM_UNPACK (gf) \
  408. ? scm_call_generic_0 ((gf)) \
  409. : scm_wta ((arg), (char *) (pos), (subr)))
  410. #define SCM_GASSERT0(cond, gf, arg, pos, subr) \
  411. if (!(cond)) SCM_WTA_DISPATCH_0((gf), (arg), (pos), (subr))
  412. extern SCM scm_call_generic_1 (SCM gf, SCM a1);
  413. #define SCM_WTA_DISPATCH_1(gf, a1, pos, subr) \
  414. return (SCM_UNPACK (gf) \
  415. ? scm_call_generic_1 ((gf), (a1)) \
  416. : scm_wta ((a1), (char *) (pos), (subr)))
  417. #define SCM_GASSERT1(cond, gf, a1, pos, subr) \
  418. if (!(cond)) SCM_WTA_DISPATCH_1((gf), (a1), (pos), (subr))
  419. extern SCM scm_call_generic_2 (SCM gf, SCM a1, SCM a2);
  420. #define SCM_WTA_DISPATCH_2(gf, a1, a2, pos, subr) \
  421. return (SCM_UNPACK (gf) \
  422. ? scm_call_generic_2 ((gf), (a1), (a2)) \
  423. : scm_wta ((pos) == SCM_ARG1 ? (a1) : (a2), (char *) (pos), (subr)))
  424. #define SCM_GASSERT2(cond, gf, a1, a2, pos, subr) \
  425. if (!(cond)) SCM_WTA_DISPATCH_2((gf), (a1), (a2), (pos), (subr))
  426. extern SCM scm_apply_generic (SCM gf, SCM args);
  427. #define SCM_WTA_DISPATCH_n(gf, args, pos, subr) \
  428. return (SCM_UNPACK (gf) \
  429. ? scm_apply_generic ((gf), (args)) \
  430. : scm_wta (scm_list_ref ((args), SCM_MAKINUM ((pos) - 1)), \
  431. (char *) (pos), \
  432. (subr)))
  433. #define SCM_GASSERTn(cond, gf, args, pos, subr) \
  434. if (!(cond)) SCM_WTA_DISPATCH_n((gf), (args), (pos), (subr))
  435. #ifndef SCM_MAGIC_SNARFER
  436. /* Let these macros pass through if
  437. we are snarfing; thus we can tell the
  438. difference between the use of an actual
  439. number vs. the use of one of these macros --
  440. actual numbers in SCM_VALIDATE_* and SCM_ASSERT
  441. constructs must match the formal argument name,
  442. but using SCM_ARG* avoids the test */
  443. #define SCM_ARGn 0
  444. #define SCM_ARG1 1
  445. #define SCM_ARG2 2
  446. #define SCM_ARG3 3
  447. #define SCM_ARG4 4
  448. #define SCM_ARG5 5
  449. #define SCM_ARG6 6
  450. #define SCM_ARG7 7
  451. /* #define SCM_ARGERR(X) ((X) < SCM_WNA \
  452. ? (char *)(X) \
  453. : "wrong type argument")
  454. */
  455. /* Following must match entry indexes in scm_errmsgs[].
  456. * Also, SCM_WNA must follow the last SCM_ARGn in sequence.
  457. */
  458. #define SCM_WNA 8
  459. /* #define SCM_OVSCM_FLOW 9 */
  460. #define SCM_OUTOFRANGE 10
  461. #define SCM_NALLOC 11
  462. /* #define SCM_STACK_OVFLOW 12 */
  463. /* #define SCM_EXIT 13 */
  464. #endif /* SCM_MAGIC_SNARFER */
  465. /* (...still matching scm_errmsgs) These
  466. * are signals. Signals may become errors
  467. * but are distinguished because they first
  468. * try to invoke a handler that can resume
  469. * the interrupted routine.
  470. */
  471. #define SCM_HUP_SIGNAL 14
  472. #define SCM_INT_SIGNAL 15
  473. #define SCM_FPE_SIGNAL 16
  474. #define SCM_BUS_SIGNAL 17
  475. #define SCM_SEGV_SIGNAL 18
  476. #define SCM_ALRM_SIGNAL 19
  477. #define SCM_GC_SIGNAL 20
  478. #define SCM_TICK_SIGNAL 21
  479. #define SCM_SIG_ORD(X) ((X) - SCM_HUP_SIGNAL)
  480. #define SCM_ORD_SIG(X) ((X) + SCM_HUP_SIGNAL)
  481. #define SCM_NUM_SIGS (SCM_SIG_ORD (SCM_TICK_SIGNAL) + 1)
  482. #if 0
  483. struct errdesc
  484. {
  485. char *msg;
  486. char *s_response;
  487. short parent_err;
  488. };
  489. extern struct errdesc scm_errmsgs[];
  490. #endif
  491. /* SCM_EXIT_SUCCESS is the default code to return from SCM if no errors
  492. * were encountered. SCM_EXIT_FAILURE is the default code to return from
  493. * SCM if errors were encountered. The return code can be explicitly
  494. * specified in a SCM program with (scm_quit <n>).
  495. */
  496. #ifndef SCM_EXIT_SUCCESS
  497. #ifdef vms
  498. #define SCM_EXIT_SUCCESS 1
  499. #else
  500. #define SCM_EXIT_SUCCESS 0
  501. #endif /* def vms */
  502. #endif /* ndef SCM_EXIT_SUCCESS */
  503. #ifndef SCM_EXIT_FAILURE
  504. #ifdef vms
  505. #define SCM_EXIT_FAILURE 2
  506. #else
  507. #define SCM_EXIT_FAILURE 1
  508. #endif /* def vms */
  509. #endif /* ndef SCM_EXIT_FAILURE */
  510. #endif /* __SCMH */
  511. /*
  512. Local Variables:
  513. c-file-style: "gnu"
  514. End:
  515. */