> 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
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to