summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-22 11:52:54 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-22 12:39:34 +0100
commit7fc7ee9331d0539359ad88c527f59d5fdf212209 (patch)
treeca01addb3140c865f443226d6f9922ee0d8937fc /lib/replace
parentc5e242b1a39f0bb26c8c922f25cf7b072e5e834c (diff)
downloadsamba-7fc7ee9331d0539359ad88c527f59d5fdf212209.tar.gz
samba-7fc7ee9331d0539359ad88c527f59d5fdf212209.tar.bz2
samba-7fc7ee9331d0539359ad88c527f59d5fdf212209.zip
lib/replace: add defines to let the callers find out if pwrite and pread are thread/fork safe
metze
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/replace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index c3b0604a2c..688a7466c3 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -434,11 +434,17 @@ char *rep_mkdtemp(char *template);
#ifndef HAVE_PREAD
#define pread rep_pread
ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset);
+#define LIBREPLACE_PREAD_REPLACED 1
+#else
+#define LIBREPLACE_PREAD_NOT_REPLACED 1
#endif
#ifndef HAVE_PWRITE
#define pwrite rep_pwrite
ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset);
+#define LIBREPLACE_PWRITE_REPLACED 1
+#else
+#define LIBREPLACE_PWRITE_NOT_REPLACED 1
#endif
#if !defined(HAVE_INET_NTOA) || defined(REPLACE_INET_NTOA)