Re: BSD gettext - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: BSD gettext
Date
Msg-id 200105241430.f4OEU1Q08169@candle.pha.pa.us
Whole thread Raw
In response to Re: BSD gettext  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BSD gettext
List pgsql-hackers
> 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
 


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: Plans for solving the VACUUM problem
Next
From: Bruce Momjian
Date:
Subject: Re: Smaller access privilege changes