Re: more possible dead ports cleanup - Mailing list pgsql-hackers

From Robert Haas
Subject Re: more possible dead ports cleanup
Date
Msg-id CA+TgmoYpVUSp8FH4XEduWJtwr=TzwNmbspOmuifW+0eda6Hk_A@mail.gmail.com
Whole thread Raw
In response to more possible dead ports cleanup  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: more possible dead ports cleanup
List pgsql-hackers
On Sun, May 6, 2012 at 9:04 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> I think a few more things could removed/simplified after the recent
> round of port removal:
>
> - Remove definition of offsetof() in c.h

I see no particular virtue to getting rid of this.

> - (Side point, the definition of endof() in the same place isn't used
> anywhere, and doesn't look safe to me, because it can go one past the
> end of memory.)

That I think we could remove.

> - Remove strtol, strtoul, strdup from libpgport.  I seem to recall these
> were for nextstep at some point.  Before we applied libpgport
> everywhere, we were actually already going fine without these in some
> parts of the source tree.

+1 for removing these and seeing if anyone complains.  We can always
put 'em back if there's a problem.

> Some more risky things that can only be tested at run time;
>
> - We could use fflush(NULL) in src/backend/postmaster/fork_process.c.
>
> - There is some business about realloc(NULL) not working in
> src/interfaces/libpq/fe-exec.c.

I doubt that either of these things is worth changing.  It seems
unlikely it would save anything material, and it might break again in
some future port.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: 9.2 Beta release notes
Next
From: Tom Lane
Date:
Subject: Re: "unexpected EOF" messages