dovecot-1.1: HP-UX: pread() and pwrite() are broken, use our own...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 12 00:37:01 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/f3667be6ec9e
changeset: 7632:f3667be6ec9e
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 12 00:01:21 2008 +0300
description:
HP-UX: pread() and pwrite() are broken, use our own implementation.
diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
configure.in | 1 +
src/lib/compat.c | 6 ++----
src/lib/compat.h | 2 +-
diffs (46 lines):
diff -r 3bda11abf5e1 -r f3667be6ec9e configure.in
--- a/configure.in Wed Jun 11 23:55:36 2008 +0300
+++ b/configure.in Thu Jun 12 00:01:21 2008 +0300
@@ -613,6 +613,7 @@ case "$host_os" in
case "$host_os" in
hpux*)
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
+ AC_DEFINE(PREAD_BROKEN,, Defint if pread/pwrite implementation is broken)
;;
*)
;;
diff -r 3bda11abf5e1 -r f3667be6ec9e src/lib/compat.c
--- a/src/lib/compat.c Wed Jun 11 23:55:36 2008 +0300
+++ b/src/lib/compat.c Thu Jun 12 00:01:21 2008 +0300
@@ -107,7 +107,7 @@ ssize_t my_writev(int fd, const struct i
}
#endif
-#ifndef HAVE_PREAD
+#if !defined(HAVE_PREAD) || defined(PREAD_BROKEN)
ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
{
ssize_t ret;
@@ -149,9 +149,7 @@ ssize_t my_pwrite(int fd, const void *bu
return -1;
return ret;
}
-#endif
-
-#ifdef PREAD_WRAPPERS
+#elif defined(PREAD_WRAPPERS)
ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
{
diff -r 3bda11abf5e1 -r f3667be6ec9e src/lib/compat.h
--- a/src/lib/compat.h Wed Jun 11 23:55:36 2008 +0300
+++ b/src/lib/compat.h Thu Jun 12 00:01:21 2008 +0300
@@ -160,7 +160,7 @@ ssize_t my_writev(int fd, const struct i
ssize_t my_writev(int fd, const struct iovec *iov, int iov_len);
#endif
-#if !defined (HAVE_PREAD) || defined (PREAD_WRAPPERS)
+#if !defined(HAVE_PREAD) || defined(PREAD_WRAPPERS) || defined(PREAD_BROKEN)
# ifndef IN_COMPAT_C
# define pread my_pread
# define pwrite my_pwrite
More information about the dovecot-cvs
mailing list