diff options
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r-- | source3/include/includes.h | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index 5da1c1d997..435810a1ba 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -434,8 +434,12 @@ /* * Define additional missing types */ -#ifndef HAVE_SIG_ATOMIC_T_TYPE -typedef int sig_atomic_t; +#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX) +typedef sig_atomic_t SIG_ATOMIC_T; +#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX) +typedef sig_atomic_t VOLATILE SIG_ATOMIC_T; +#else +typedef int VOLATILE SIG_ATOMIC_T; #endif #ifndef HAVE_SOCKLEN_T_TYPE @@ -696,6 +700,7 @@ extern int errno; #include "dlinklist.h" #include "../tdb/tdb.h" #include "../tdb/spinlock.h" +#include "../tdb/tdbutil.h" #include "talloc.h" #include "ads.h" #include "interfaces.h" @@ -748,10 +753,6 @@ extern int errno; #include "mangle.h" -#ifndef MAXCODEPAGELINES -#define MAXCODEPAGELINES 256 -#endif - /* * Type for wide character dirent structure. * Only d_name is defined by POSIX. @@ -942,6 +943,14 @@ size_t strlcat(char *d, const char *s, size_t bufsize); int ftruncate(int f,long l); #endif +#ifndef HAVE_STRNDUP +char *strndup(const char *s, size_t n); +#endif + +#ifndef HAVE_STRNLEN +size_t strnlen(const char *s, size_t n); +#endif + #ifndef HAVE_STRTOUL unsigned long strtoul(const char *nptr, char **endptr, int base); #endif @@ -993,9 +1002,9 @@ int vasprintf(char **ptr, const char *format, va_list ap); #define DEFAULT_SOCKET_OPTIONS "" #endif -/* Load header file for libdl stuff */ +/* Load header file for dynamic linking stuff */ -#ifdef HAVE_LIBDL +#ifdef HAVE_DLFCN_H #include <dlfcn.h> #endif @@ -1155,5 +1164,13 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #define slprintf snprintf #define vslprintf vsnprintf + +/* we need to use __va_copy() on some platforms */ +#ifdef HAVE_VA_COPY +#define VA_COPY(dest, src) __va_copy(dest, src) +#else +#define VA_COPY(dest, src) (dest) = (src) +#endif + #endif /* _INCLUDES_H */ |