Commit | Line | Data |
---|---|---|
0f2d19dd JB |
1 | /* classes: h_files */ |
2 | ||
0527e687 DH |
3 | #ifndef SCM__SCM_H |
4 | #define SCM__SCM_H | |
5 | ||
6 | /* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc. | |
7 | * | |
0f2d19dd JB |
8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2, or (at your option) | |
11 | * any later version. | |
0527e687 | 12 | * |
0f2d19dd JB |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
0527e687 | 17 | * |
0f2d19dd JB |
18 | * You should have received a copy of the GNU General Public License |
19 | * along with this software; see the file COPYING. If not, write to | |
82892bed JB |
20 | * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
21 | * Boston, MA 02111-1307 USA | |
0f2d19dd JB |
22 | * |
23 | * As a special exception, the Free Software Foundation gives permission | |
24 | * for additional uses of the text contained in its release of GUILE. | |
25 | * | |
26 | * The exception is that, if you link the GUILE library with other files | |
27 | * to produce an executable, this does not by itself cause the | |
28 | * resulting executable to be covered by the GNU General Public License. | |
29 | * Your use of that executable is in no way restricted on account of | |
30 | * linking the GUILE library code into it. | |
31 | * | |
32 | * This exception does not however invalidate any other reasons why | |
33 | * the executable file might be covered by the GNU General Public License. | |
34 | * | |
35 | * This exception applies only to the code released by the | |
36 | * Free Software Foundation under the name GUILE. If you copy | |
37 | * code from other Free Software Foundation releases into a copy of | |
38 | * GUILE, as the General Public License permits, the exception does | |
39 | * not apply to the code that you add in this way. To avoid misleading | |
40 | * anyone as to the status of such modified files, you must delete | |
41 | * this exception notice from them. | |
42 | * | |
43 | * If you write modifications of your own for GUILE, it is your choice | |
44 | * whether to permit this exception to apply to your modifications. | |
82892bed | 45 | * If you do not wish that, delete this exception notice. */ |
0527e687 | 46 | |
0f2d19dd JB |
47 | \f |
48 | ||
a0599745 | 49 | #include "libguile/__scm.h" |
20e6290e | 50 | |
176067df JB |
51 | /* "What's the difference between _scm.h and __scm.h?" |
52 | ||
53 | _scm.h is not installed; it's only visible to the libguile sources | |
54 | themselves. | |
55 | ||
56 | __scm.h is installed, and is #included by <libguile.h>. If both | |
57 | the client and libguile need some piece of information, and it | |
58 | doesn't fit well into the header file for any particular module, it | |
59 | should go in __scm.h. */ | |
60 | ||
61 | ||
462a6f1f | 62 | |
20e6290e JB |
63 | /* Include headers for those files central to the implementation. The |
64 | rest should be explicitly #included in the C files themselves. */ | |
a0599745 MD |
65 | #include "libguile/error.h" /* Everyone signals errors. */ |
66 | #include "libguile/print.h" /* Everyone needs to print. */ | |
67 | #include "libguile/pairs.h" /* Everyone conses. */ | |
68 | #include "libguile/list.h" /* Everyone makes lists. */ | |
69 | #include "libguile/gc.h" /* Everyone allocates. */ | |
70 | #include "libguile/gsubr.h" /* Everyone defines global functions. */ | |
71 | #include "libguile/procs.h" /* Same. */ | |
72 | #include "libguile/numbers.h" /* Everyone deals with fixnums. */ | |
73 | #include "libguile/symbols.h" /* For length, chars, values, miscellany. */ | |
74 | #include "libguile/boolean.h" /* Everyone wonders about the truth. */ | |
75 | #ifdef USE_THREADS | |
76 | #include "libguile/threads.h" /* The cooperative thread package does | |
7bfd3b9e | 77 | switching at async ticks. */ |
1764973d | 78 | #endif |
a0599745 | 79 | #include "libguile/snarf.h" /* Everyone snarfs. */ |
86d31dfe MV |
80 | #include "libguile/variable.h" |
81 | #include "libguile/modules.h" | |
0f2d19dd | 82 | |
e1a191a8 GH |
83 | /* SCM_SYSCALL retries system calls that have been interrupted (EINTR). |
84 | However this can be avoided if the operating system can restart | |
85 | system calls automatically. We assume this is the case if | |
86 | sigaction is available and SA_RESTART is defined; they will be used | |
87 | when installing signal handlers. | |
88 | */ | |
89 | ||
08b8c694 | 90 | #ifdef HAVE_RESTARTABLE_SYSCALLS |
e1a191a8 GH |
91 | #define SCM_SYSCALL(line) line |
92 | #endif | |
93 | ||
94 | #ifndef SCM_SYSCALL | |
0f2d19dd JB |
95 | #ifdef vms |
96 | # ifndef __GNUC__ | |
97 | # include <ssdef.h> | |
98 | # define SCM_SYSCALL(line) do{errno = 0;line;} \ | |
99 | while(EVMSERR==errno && (vaxc$errno>>3)==(SS$_CONTROLC>>3)) | |
100 | # endif /* ndef __GNUC__ */ | |
101 | #endif /* def vms */ | |
e1a191a8 | 102 | #endif /* ndef SCM_SYSCALL */ |
0f2d19dd JB |
103 | |
104 | #ifndef SCM_SYSCALL | |
105 | # ifdef EINTR | |
106 | # if (EINTR > 0) | |
107 | # define SCM_SYSCALL(line) do{errno = 0;line;}while(EINTR==errno) | |
108 | # endif /* (EINTR > 0) */ | |
109 | # endif /* def EINTR */ | |
110 | #endif /* ndef SCM_SYSCALL */ | |
111 | ||
112 | #ifndef SCM_SYSCALL | |
e1a191a8 | 113 | # define SCM_SYSCALL(line) line; |
0f2d19dd JB |
114 | #endif /* ndef SCM_SYSCALL */ |
115 | ||
82893676 | 116 | #if !defined (MSDOS) && !defined (__MINGW32__) |
0f2d19dd JB |
117 | # ifdef ARM_ULIB |
118 | extern volatile int errno; | |
119 | # else | |
120 | extern int errno; | |
121 | # endif /* def ARM_ULIB */ | |
82893676 | 122 | #endif /* ndef MSDOS && ndef __MINGW32__*/ |
0f2d19dd JB |
123 | |
124 | \f | |
125 | ||
e412e180 | 126 | #ifndef min |
462a6f1f | 127 | #define min(A,B) ((A) <= (B) ? (A) : (B)) |
e412e180 MD |
128 | #endif |
129 | #ifndef max | |
462a6f1f | 130 | #define max(A,B) ((A) >= (B) ? (A) : (B)) |
e412e180 | 131 | #endif |
462a6f1f | 132 | |
0527e687 | 133 | #endif /* SCM__SCM_H */ |
89e00824 ML |
134 | |
135 | /* | |
136 | Local Variables: | |
137 | c-file-style: "gnu" | |
138 | End: | |
139 | */ |