Try to make the :lurking-threads test more robust.
[sbcl.git] / src / runtime / undefineds.c
blob954312e9901d26bbfe5821eff3d764bd2aedd4cf
1 /*
2 * routines that must be linked into the core for Lisp to work
3 */
5 /*
6 * This software is part of the SBCL system. See the README file for
7 * more information.
9 * This software is derived from the CMU CL system, which was
10 * written at Carnegie Mellon University and released into the
11 * public domain. The software is in the public domain and is
12 * provided with absolutely no warranty. See the COPYING and CREDITS
13 * files for more information.
16 #ifdef sun
17 #ifndef MACH
18 #if !defined(SUNOS) && !defined(SOLARIS)
19 #define SUNOS
20 #endif
21 #endif
22 #endif
24 typedef int func();
26 extern func
27 #define F(x) x,
28 #if !(defined(irix) || defined(SOLARIS))
29 /* XXXfixme next line probably wrong; was previous behavior */
30 #define D(x) x,
31 #else
32 #define D(x)
33 #endif
34 #include "undefineds.h"
35 #undef F
36 #undef D
37 exit; /* just some function known to exist */
39 #if defined(SOLARIS) || defined(irix)
41 #ifdef irix
42 int errno; /* hack to be sure works with newer libc without having to redump */
43 /* causes libc to be relocated to match cmucl rather than vice
44 * versa */
45 #endif
47 extern int
48 #define F(x)
49 #define D(x) x,
50 #include "undefineds.h"
51 #undef F
52 #undef D
53 errno; /* a variable known to exist */
55 int reference_random_symbols(void) {
56 int a;
57 #define F(x) x();
58 #define D(x) a+=x;
59 #include "undefineds.h"
60 #undef F
61 #undef D
62 return a;
65 #else
67 func *reference_random_symbols[] = {
68 #define F(x) x,
69 /* XXXfixme Next line is probably wrong but was previous behavior. */
70 #define D(x) x,
71 #include "undefineds.h"
72 #undef F
73 #undef D
74 exit /* a function known to exist */
77 #endif