Newer
Older
/*
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain.
*/
/* Routines that must be linked into the core for lisp to work. */
#ifdef sun
#ifndef MACH
#define F(x) x,
#if !(defined(irix) || defined(SOLARIS))
/* XXXfixme next line probably wrong; was previous behavior */
#define D(x) x,
#else
#define D(x)
#endif
#undef F
#undef D
exit; /* just a random function known to exist */
#if defined(SOLARIS) || defined(irix)
#ifdef irix
int errno; /* hack to be sure works with newer libc without having to redump */
/* causes libc to be relocated to match cmucl rather than vice
versa */
extern int
#define F(x)
#define D(x) x,
#include "undefineds.h"
#undef F
#undef D
errno; /* a random variable known to exist */
int
reference_random_symbols(void)
{
int a;
#if defined(SOLARIS) && defined(__GNUC__)
/*
* For some reason, gcc 3.0 still deletes function calls here, even
* with -O0. I don't know why. So, we don't define the functions
* here, but define them in the table below.
*/
#define F(x)
#else
#define F(x) x(0);
#endif
#define D(x) a+=x;
#include "undefineds.h"
#undef F
#undef D
}
#if defined(SOLARIS) && defined(__GNUC__)
/*
* If we reference the functions here, gcc 3.0 will leave them in the
* object file. However, don't try to put the data symbols here. It
* will cause CMUCL to crash doing a get_timezone.
*/
func *reference_random_symbols_table[] = {
#define F(x) x,
#define D(x)
#include "undefineds.h"
#undef F
#undef D
exit /* a random function known to exist */
#else
#if defined(SVR4)
extern char *tzname[];
extern int daylight;
extern long altzone;
extern long timezone;
#endif
func *reference_random_symbols[] = {
#define F(x) x,
/* XXXfixme next line is probably wrong but was previous behavior */
#undef F
#undef D
exit /* a random function known to exist */