34 |
/* --- MACROS FOR PORTABILITY --- */ |
/* --- MACROS FOR PORTABILITY --- */ |
35 |
|
|
36 |
|
|
37 |
|
/* Saves on those hard to debug '\0' typos.... */ |
38 |
|
#define LT_EOS_CHAR '\0' |
39 |
|
|
40 |
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, |
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, |
41 |
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at |
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at |
42 |
the end of C declarations. */ |
the end of C declarations. */ |
85 |
# define LT_CONC(s,t) s/**/t |
# define LT_CONC(s,t) s/**/t |
86 |
#endif |
#endif |
87 |
|
|
88 |
|
/* LT_STRLEN can be used safely on NULL pointers. */ |
89 |
|
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) |
90 |
|
|
91 |
|
|
92 |
|
|
194 |
/* --- MEMORY HANDLING --- */ |
/* --- MEMORY HANDLING --- */ |
195 |
|
|
196 |
|
|
197 |
/* Pointers to memory management functions to be used by libltdl. */ |
/* By default, the realloc function pointer is set to our internal |
198 |
|
realloc implementation which iself uses lt_dlmalloc and lt_dlfree. |
199 |
|
libltdl relies on a featureful realloc, but if you are sure yours |
200 |
|
has the right semantics then you can assign it directly. Generally, |
201 |
|
it is safe to assign just a malloc() and a free() function. */ |
202 |
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); |
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); |
203 |
|
LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); |
204 |
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); |
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); |
205 |
|
|
206 |
|
|