> The HPUX man page for mmap documents its failure return value as "-1",
> so I hacked around this with
>
> #ifndef MAP_FAILED
> #define MAP_FAILED ((void *) (-1))
> #endif
>
> whereupon it built and passed the simple self-test you suggested.
> However, I think it's pretty foolish to depend on mmap for such
> little reason as this code does. I suggest ripping out the mmap
> usage and just reading the file with good old read(2).
Agreed. Let read() use mmap() internally if it wants to.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026