diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-15 10:35:28 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-15 10:35:28 +0000 |
commit | e90b65284812aaa5ff9e9935ce9bbad7791cbbcd (patch) | |
tree | 9e744d1dc2f93934a4b49166a37383d3cb2b2139 /source3/include/includes.h | |
parent | ec167dc9cc0ec2ee461837c25a371d2981744208 (diff) | |
download | samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.gz samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.tar.bz2 samba-e90b65284812aaa5ff9e9935ce9bbad7791cbbcd.zip |
updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
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 */ |