[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] pread: new module
From: |
Jim Meyering |
Subject: |
Re: [PATCH 1/2] pread: new module |
Date: |
Wed, 25 Nov 2009 17:07:30 +0100 |
Eric Blake wrote:
> Richard W.M. Jones <rjones <at> redhat.com> writes:
>> I'm guessing the problem is void * vs char *, unless the off_t types
>> also differ.
>
> The off_t types are fine. But the unistd.h header is indeed wrong; POSIX
> requires void*.
Thanks!
This should fix it:
>From 8def010e77c2bace5391a1cda45e158d9e0a3f7d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 25 Nov 2009 17:06:25 +0100
Subject: [PATCH] unistd.in.h: correct declaration of pread
* lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
Reported by Richard W.M. Jones.
---
ChangeLog | 4 ++++
lib/unistd.in.h | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 63af1d7..6128785 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-11-25 Jim Meyering <address@hidden>
+ unistd.in.h: correct declaration of pread
+ * lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
+ Reported by Richard W.M. Jones.
+
test-pread.sh: distribute the test script
* modules/pread-tests (Files): Include test-pread.sh.
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 13d1bba..ba178e5 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -673,7 +673,7 @@ extern int pipe2 (int fd[2], int flags);
set errno and return -1. 0 indicates EOF. See the POSIX:2001
specification <http://www.opengroup.org/susv3xsh/pread.html>. */
# if address@hidden@ || @REPLACE_PREAD@
- extern ssize_t pread (int fd, char *buf, size_t bufsize, off_t offset);
+ extern ssize_t pread (int fd, void *buf, size_t bufsize, off_t offset);
# endif
#elif defined GNULIB_POSIXCHECK
# undef pread
--
1.6.6.rc0.236.ge0b94
- [PATCH 1/2] pread: new module, Jim Meyering, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Richard W.M. Jones, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Eric Blake, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Jim Meyering, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Jim Meyering, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Jim Meyering, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Bruno Haible, 2009/11/25
- Re: [PATCH 1/2] pread: new module, Eric Blake, 2009/11/26
- Re: [PATCH 1/2] pread: new module, Jim Meyering, 2009/11/26
- Re: [PATCH 1/2] pread: new module, Bruno Haible, 2009/11/26
- Re: [PATCH 1/2] pread: new module, Jim Meyering, 2009/11/26