1 |
/* MAX_THREADS removed by Steve Underwood 1999/12/10 */ |
2 |
|
3 |
#ifdef HAVE_CONFIG_H |
4 |
# include <config.h> |
5 |
#endif |
6 |
|
7 |
#ifdef HAVE_BYTESWAP_H |
8 |
# include <byteswap.h> |
9 |
#endif |
10 |
|
11 |
#ifdef HAVE_SYS_TYPES_H |
12 |
# include <sys/types.h> |
13 |
#endif |
14 |
|
15 |
#ifdef HAVE_SYS_ENDIAN_H |
16 |
# include <sys/endian.h> |
17 |
#endif |
18 |
|
19 |
#ifdef HAVE_MACHINE_ENDIAN_H |
20 |
# include <machine/endian.h> |
21 |
#endif |
22 |
|
23 |
#ifdef HAVE_ENDIAN_H |
24 |
# include <endian.h> |
25 |
#endif |
26 |
|
27 |
#include "win32_comp.h" |
28 |
|
29 |
#ifdef USE_LTDL |
30 |
# include <ltdl.h> |
31 |
#else |
32 |
# ifdef HAVE_DLFCN_H |
33 |
# ifndef WIN32 |
34 |
# include <dlfcn.h> |
35 |
# endif |
36 |
# endif |
37 |
# define lt_dlexit() 0 |
38 |
# define lt_dlinit() 0 |
39 |
# define lt_dlclose(x) dlclose(x) |
40 |
# define lt_dlsym(x,y) dlsym(x,y) |
41 |
# define lt_dlhandle void* |
42 |
# define lt_ptr_t void* |
43 |
# ifndef WIN32 |
44 |
# define lt_dlerror dlerror |
45 |
# else |
46 |
# define lt_dlerror() 0 |
47 |
# endif |
48 |
#endif |
49 |
|
50 |
#ifdef STDC_HEADERS |
51 |
# include <string.h> |
52 |
# include <stdlib.h> |
53 |
# include <stdio.h> |
54 |
# include <ctype.h> |
55 |
#endif |
56 |
|
57 |
#ifdef HAVE_DIRENT_H |
58 |
# include <dirent.h> |
59 |
#endif |
60 |
|
61 |
#ifdef HAVE_STRINGS_H |
62 |
# include <strings.h> |
63 |
#endif |
64 |
|
65 |
#ifdef HAVE_UNISTD_H |
66 |
# include <unistd.h> |
67 |
#endif |
68 |
|
69 |
#ifdef HAVE_LIBPTHREAD |
70 |
# include <pthread.h> |
71 |
#endif |
72 |
|
73 |
#if SIZEOF_UNSIGNED_LONG_INT == 4 |
74 |
typedef unsigned long word32; |
75 |
typedef signed long sword32; |
76 |
#elif SIZEOF_UNSIGNED_INT == 4 |
77 |
typedef unsigned int word32; |
78 |
typedef signed int sword32; |
79 |
#else |
80 |
# error "Cannot find a 32 bit integer in your system, sorry." |
81 |
#endif |
82 |
|
83 |
#if SIZEOF_UNSIGNED_INT == 2 |
84 |
typedef unsigned int word16; |
85 |
#elif SIZEOF_UNSIGNED_SHORT_INT == 2 |
86 |
typedef unsigned short word16; |
87 |
#else |
88 |
# error "Cannot find a 16 bit integer in your system, sorry." |
89 |
#endif |
90 |
|
91 |
#if SIZEOF_UNSIGNED_CHAR == 1 |
92 |
typedef unsigned char byte; |
93 |
#else |
94 |
# error "Cannot find an 8 bit char in your system, sorry." |
95 |
#endif |
96 |
|
97 |
#ifndef HAVE_MEMMOVE |
98 |
# ifdef HAVE_BCOPY |
99 |
# define memmove(d, s, n) bcopy ((s), (d), (n)) |
100 |
# else |
101 |
# error "Neither memmove nor bcopy exists on your system." |
102 |
# endif |
103 |
#endif |
104 |
|