diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-06 11:31:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:17:44 -0500 |
commit | 3ca73facc59ed8a97abbc28c1b4bedde87e109a6 (patch) | |
tree | 6959d7d7e546cf8be7e57eb9bcd1cdfb1170b412 /source4/lib/replace/replace.h | |
parent | d093b28b55bac53c32cf3bf35424ca967b55bfc5 (diff) | |
download | samba-3ca73facc59ed8a97abbc28c1b4bedde87e109a6.tar.gz samba-3ca73facc59ed8a97abbc28c1b4bedde87e109a6.tar.xz samba-3ca73facc59ed8a97abbc28c1b4bedde87e109a6.zip |
r18160: - pread and pwrite replacements need to be non-static
- replacing rename() is pointless - all platforms have it (and the
#define of rename breaks some code)
- use system/locale.h in snprintf.c
- fix passwd.h for initgroups
- stdlib is in replace.h, not needed elsewhere
- fix the initgroups replacement
- fix mapping of dl functions to rep_*
(This used to be commit 57cd0ca176387d6a3acabf9fedeef4f2a3a3dad7)
Diffstat (limited to 'source4/lib/replace/replace.h')
-rw-r--r-- | source4/lib/replace/replace.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 38b4e08704a..90fd994ca5a 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -61,7 +61,6 @@ #include <strings.h> #endif - #ifndef HAVE_STRERROR extern char *sys_errlist[]; #define strerror(i) sys_errlist[i] @@ -121,11 +120,6 @@ size_t rep_strnlen(const char *s, size_t n); int rep_setenv(const char *name, const char *value, int overwrite); #endif -#ifndef HAVE_RENAME -#define rename rep_rename -int rep_rename(const char *zfrom, const char *zto); -#endif - #ifndef HAVE_STRCASESTR #define strcasestr rep_strcasestr char *rep_strcasestr(const char *haystack, const char *needle); @@ -148,13 +142,38 @@ unsigned long long int rep_strtoull(const char *str, char **endptr, int base); #ifndef HAVE_FTRUNCATE #define ftruncate rep_ftruncate -int rep_ftruncate(int f,long l); +int rep_ftruncate(int,off_t); +#endif + +#ifndef HAVE_INITGROUPS +#define ftruncate rep_ftruncate +int rep_initgroups(char *name, gid_t id); #endif #if !defined(HAVE_BZERO) && defined(HAVE_MEMSET) #define bzero(a,b) memset((a),'\0',(b)) #endif +#ifndef HAVE_DLERROR +#define dlerror rep_dlerror +char *rep_dlerror(void); +#endif + +#ifndef HAVE_DLOPEN +#define dlopen rep_dlopen +void *rep_dlopen(const char *name, int flags); +#endif + +#ifndef HAVE_DLSYM +#define dlsym rep_dlsym +void *rep_dlsym(void *handle, const char *symbol); +#endif + +#ifndef HAVE_DLCLOSE +#define dlclose rep_dlclose +int rep_dlclose(void *handle); +#endif + #ifndef PRINTF_ATTRIBUTE #if __GNUC__ >= 3 @@ -195,6 +214,7 @@ int rep_asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #ifndef HAVE_VA_COPY +#undef va_copy #ifdef HAVE___VA_COPY #define va_copy(dest, src) __va_copy(dest, src) #else |