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