diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-07-10 15:29:31 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-07-10 15:29:31 +1000 |
commit | 32de198fd3d59033418ac0e05baaf16b17f5ce46 (patch) | |
tree | babe495cedfde02580f50931a50c5e6ef93929e8 /ctdb/lib/replace/replace.h | |
parent | 9fe446f2315a23f635113a62d7e79e2fedda09e5 (diff) | |
download | samba-32de198fd3d59033418ac0e05baaf16b17f5ce46.tar.gz samba-32de198fd3d59033418ac0e05baaf16b17f5ce46.tar.xz samba-32de198fd3d59033418ac0e05baaf16b17f5ce46.zip |
update lib/replace from samba4
(This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
Diffstat (limited to 'ctdb/lib/replace/replace.h')
-rw-r--r-- | ctdb/lib/replace/replace.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/ctdb/lib/replace/replace.h b/ctdb/lib/replace/replace.h index b96356ac46..06173bd84b 100644 --- a/ctdb/lib/replace/replace.h +++ b/ctdb/lib/replace/replace.h @@ -13,7 +13,7 @@ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -21,8 +21,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _LIBREPLACE_REPLACE_H @@ -228,8 +227,12 @@ char *rep_dlerror(void); #ifndef HAVE_DLOPEN #define dlopen rep_dlopen +#ifdef DLOPEN_TAKES_UNSIGNED_FLAGS +void *rep_dlopen(const char *name, unsigned int flags); +#else void *rep_dlopen(const char *name, int flags); #endif +#endif #ifndef HAVE_DLSYM #define dlsym rep_dlsym @@ -258,6 +261,14 @@ int rep_socketpair(int d, int type, int protocol, int sv[2]); #endif #endif +#ifndef _DEPRECATED_ +#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) +#define _DEPRECATED_ __attribute__ ((deprecated)) +#else +#define _DEPRECATED_ +#endif +#endif + #ifndef HAVE_VASPRINTF #define vasprintf rep_vasprintf int rep_vasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); @@ -321,6 +332,12 @@ char *rep_strptime(const char *buf, const char *format, struct tm *tm); #ifndef RTLD_LAZY #define RTLD_LAZY 0 #endif +#ifndef RTLD_NOW +#define RTLD_NOW 0 +#endif +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif #ifndef HAVE_SECURE_MKSTEMP #define mkstemp(path) rep_mkstemp(path) @@ -332,6 +349,16 @@ int rep_mkstemp(char *temp); char *rep_mkdtemp(char *template); #endif +#ifndef HAVE_PREAD +#define pread rep_pread +ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset); +#endif + +#ifndef HAVE_PWRITE +#define pwrite rep_pwrite +ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset); +#endif + #ifdef HAVE_LIMITS_H #include <limits.h> #endif |