This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ 16074] Document that mmap() returns MAP_FAILED on error

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[1] 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  <>
> +
> +    * 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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]