[pg-cvs] Patch for Linux mremap
Stelian Ionescu
sionescu at cddr.org
Thu Aug 6 09:24:40 UTC 2009
On Thu, 2009-08-06 at 14:56 +0900, John Fremlin wrote:
> Hi Stelian,
>
> http://www.opengroup.org/onlinepubs/000095399/functions/mmap.html
>
> Existing implementations of mmap() return the value -1 when
> unsuccessful. Since the casting of this value to type void *
> cannot be guaranteed by the ISO C standard to be distinct from a
> successful value, this volume of IEEE Std 1003.1-2001 defines
> the symbol MAP_FAILED, which a conforming implementation does
> not return as the result of a successful call.
>
> I guess whoever wrote the mmap wrapper didn't read the manpage as it
> assumes 0 is the bad value. :-(
>
> Here is a horrible hack for osicat. It should probably be changed to
> grovel for MAP_FAILED.
Done.
> [The bytemap project has had a correct(?) way of handling this for
> nearly a year (http://common-lisp.net/project/bytemap/) if anybody is
> interested in a tested cross-Lisp mmap.]
If you move the project repo into public_html/git/ it will be picked up
by gitweb at http://common-lisp.net/gitweb
--
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/osicat-devel/attachments/20090806/bbe80a4f/attachment.sig>
More information about the osicat-devel
mailing list