This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH][BZ 16074] Document that mmap() returns MAP_FAILED on error
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Fabrice Bauzac <libnoon at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 25 Oct 2013 13:56:29 +0530
- Subject: Re: [PATCH][BZ 16074] Document that mmap() returns MAP_FAILED on error
- Authentication-results: sourceware.org; auth=none
- References: <CAB6Q1a8H5dVfJnc_uQLTT2vKV7njBL9KoKkOu03S7dk9Bd2A+w at mail dot gmail dot com>
On Tue, Oct 22, 2013 at 03:24:28PM +0200, Fabrice Bauzac wrote:
> At the moment, the glibc manual documents mmap() as returning -1 on error.
> This is a problem because (1) it is cumbersome to test whether a void*
> return value is equal to an integer and (2) it is not portable.
> POSIX states that it returns MAP_FAILED on error as per
> I suggest that the manual should be changed to indicate that mmap()
> returns MAP_FAILED on error, which it does.
> Could you please review the patch?
Fabrice, thanks for the patch. I don't know if you have your
copyright assignment in place, but since this is a minor change, that
shouldn't be a problem. However, if you are thinking of contributing
regularly to glibc, I'd suggest getting your copyright assignment
done. The Contribution checklist page has information on that and
also more information on general patch submission guidelines.
> diff --git a/ChangeLog b/ChangeLog
> index 2027bd6..4912ffd 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2013-10-22 Fabrice Bauzac <firstname.lastname@example.org>
> + * manual/llio.texi (Memory-mapped I/O): Indicate that mmap returns
> + MAP_FAILED on error.
The ChangeLog entry needs a line with the bugzilla number in it. I
have made that change and pushed it.