more possible dead ports cleanup
more possible dead ports cleanup
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
I think a few more things could removed/simplified after the recent round of port removal: - Remove definition of offsetof() in c.h - (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.) - 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. 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 suggest we do the first 2 (or 3) now, and leave the last 2 for future cleanups.
Re: more possible dead ports cleanup
От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Sun, May 6, 2012 at 9:04 AM, Peter Eisentraut 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
Re: more possible dead ports cleanup
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On mån, 2012-05-07 at 10:50 -0400, Robert Haas wrote: > > - (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. I decided to keep it because it was used not so long ago, so maybe it still has value.