summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-06-06 09:27:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:12 -0500
commit14846bf4f6f185f550570e6a524c265d585454ef (patch)
tree982981e3a5c4993b1a7aec799dd79f029115ba4c /source4/lib
parent7f2709b3979864cf948e94e18cf268b6f8ffc483 (diff)
downloadsamba-14846bf4f6f185f550570e6a524c265d585454ef.tar.gz
samba-14846bf4f6f185f550570e6a524c265d585454ef.tar.bz2
samba-14846bf4f6f185f550570e6a524c265d585454ef.zip
r23363: Activate rep_pread and rep_pwrite in lib/replace/replace.h.
This fixes the build on a SuSE 6.1. :-) I guess this had been merely forgotten. But beware: The implementations of rep_pread and rep_pwrite are not thread safe. Michael (This used to be commit e4955c729fdf0bd299df4dadc4b33e09fe4d336e)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/replace/replace.c8
-rw-r--r--source4/lib/replace/replace.h10
2 files changed, 18 insertions, 0 deletions
diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c
index 87e73d001c..b86da53caf 100644
--- a/source4/lib/replace/replace.c
+++ b/source4/lib/replace/replace.c
@@ -438,6 +438,10 @@ char *rep_mkdtemp(char *template)
}
#endif
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
#ifndef HAVE_PREAD
ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset)
{
@@ -448,6 +452,10 @@ ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset)
}
#endif
+/*****************************************************************
+ Watch out: this is not thread safe.
+*****************************************************************/
+
#ifndef HAVE_PWRITE
ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
{
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index f584cd42fa..62d480e20e 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -350,6 +350,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