| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#ifndef ECL_ECL_H |
| 15 |
#define ECL_ECL_H |
| 16 |
|
| 17 |
#include <sys/types.h> |
| 18 |
#ifdef __OpenBSD__ |
| 19 |
# include <pthread.h> |
| 20 |
#endif |
| 21 |
#include <stddef.h> |
| 22 |
#include <stdarg.h> |
| 23 |
#include <setjmp.h> |
| 24 |
#include <stdio.h> |
| 25 |
#include <stdbool.h> |
| 26 |
|
| 27 |
#if ( defined(_MSC_VER) && (_MSC_VER < 1800) ) || !defined(va_copy) |
| 28 |
#define va_copy(dst, src) \ |
| 29 |
((void) memcpy(&(dst), &(src), sizeof(va_list))) |
| 30 |
#endif |
| 31 |
|
| 32 |
#ifndef ECL_FIXNUM_BITS |
| 33 |
#include <ecl/config.h> |
| 34 |
#endif |
| 35 |
|
| 36 |
#ifdef ECL_BUILD |
| 37 |
#include <ecl/config-internal.h> |
| 38 |
#endif |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
#if defined(GBC_BOEHM_GENGC) |
| 48 |
#ifdef dlopen |
| 49 |
# undef dlopen |
| 50 |
#endif |
| 51 |
#ifdef dlclose |
| 52 |
# undef dlclose |
| 53 |
#endif |
| 54 |
#endif |
| 55 |
|
| 56 |
#if defined(ECL_MS_WINDOWS_HOST) |
| 57 |
# ifndef WIN32_LEAN_AND_MEAN |
| 58 |
# define WIN32_LEAN_AND_MEAN 1 |
| 59 |
# include <windows.h> |
| 60 |
# undef WIN32_LEAN_AND_MEAN |
| 61 |
# else |
| 62 |
# include <windows.h> |
| 63 |
# endif |
| 64 |
# ifdef ECL_THREADS |
| 65 |
typedef HANDLE pthread_t; |
| 66 |
typedef HANDLE pthread_mutex_t; |
| 67 |
typedef HANDLE pthread_cond_t; |
| 68 |
# undef ERROR |
| 69 |
# ifdef GBC_BOEHM |
| 70 |
# define CreateThread GC_CreateThread |
| 71 |
# endif |
| 72 |
# else |
| 73 |
# error "The Windows ports cannot be built without threads." |
| 74 |
# endif |
| 75 |
#endif |
| 76 |
|
| 77 |
#ifdef ECL_SSE2 |
| 78 |
#include <xmmintrin.h> |
| 79 |
#include <emmintrin.h> |
| 80 |
#endif |
| 81 |
|
| 82 |
#include <ecl/object.h> |
| 83 |
#include <ecl/external.h> |
| 84 |
#include <ecl/cons.h> |
| 85 |
#include <ecl/stacks.h> |
| 86 |
#include <ecl/number.h> |
| 87 |
#include <ecl/legacy.h> |
| 88 |
#include <ecl/impl/math_fenv.h> |
| 89 |
|
| 90 |
typedef void (*ecl_init_function_t)(cl_object block); |
| 91 |
|
| 92 |
#endif |