pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix potentially-unportable code in contrib/adminpack.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix potentially-unportable code in contrib/adminpack.
@ 2018-04-15 17:02 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-04-15 17:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potentially-unportable code in contrib/adminpack.

Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3a2d6365984d2cd98ee03467cd901785941cf772

Modified Files
--------------
contrib/adminpack/adminpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix potentially-unportable code in contrib/adminpack.
@ 2018-04-15 17:02 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-04-15 17:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potentially-unportable code in contrib/adminpack.

Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/16d3dbe2f30ab40a78873029d33aeed2765fa0d0

Modified Files
--------------
contrib/adminpack/adminpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix potentially-unportable code in contrib/adminpack.
@ 2018-04-15 17:02 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-04-15 17:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potentially-unportable code in contrib/adminpack.

Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/65f2e868b262ff4480cb10d063ccd9b689a0a77f

Modified Files
--------------
contrib/adminpack/adminpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix potentially-unportable code in contrib/adminpack.
@ 2018-04-15 17:02 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-04-15 17:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potentially-unportable code in contrib/adminpack.

Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f29eff7ac500e5d75a3c1991ba0a4fa09946e6b7

Modified Files
--------------
contrib/adminpack/adminpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix potentially-unportable code in contrib/adminpack.
@ 2018-04-15 17:02 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-04-15 17:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potentially-unportable code in contrib/adminpack.

Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e6b71727afc148f90967f4d7ca5cb29891ba2c6c

Modified Files
--------------
contrib/adminpack/adminpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix potentially-unportable code in contrib/adminpack.
@ 2018-04-15 17:02 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-04-15 17:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potentially-unportable code in contrib/adminpack.

Spelling access(2)'s second argument as "2" is just horrid.
POSIX makes no promises as to the numeric values of W_OK and related
macros.  Even if it accidentally works as intended on every supported
platform, it's still unreadable and inconsistent with adjacent code.

In passing, don't spell "NULL" as "0" either.  Yes, that's legal C;
no, it's not project style.

Back-patch, just in case the unportability is real and not theoretical.
(Most likely, even if a platform had different bit assignments for
access()'s modes, there'd not be an observable behavior difference
here; but I'm being paranoid today.)

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9ed1c8ca2594e8ab523181bd011402a031bdcaaa

Modified Files
--------------
contrib/adminpack/adminpack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-04-15 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-15 17:02 pgsql: Fix potentially-unportable code in contrib/adminpack. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-15 17:02 pgsql: Fix potentially-unportable code in contrib/adminpack. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-15 17:02 pgsql: Fix potentially-unportable code in contrib/adminpack. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-15 17:02 pgsql: Fix potentially-unportable code in contrib/adminpack. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-15 17:02 pgsql: Fix potentially-unportable code in contrib/adminpack. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-15 17:02 pgsql: Fix potentially-unportable code in contrib/adminpack. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox