Re: BSD gettext

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BSD gettext
Date: 2001-05-24 14:30:01
Message-ID: 200105241430.f4OEU1Q08169@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-05-24 14:38:18 Re: Smaller access privilege changes
Previous Message Ryan Mahoney 2001-05-24 13:35:41 Re: Re: Shared memory for RH Linux 7.1