From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Dead code in ps_status.c |
Date: | 2023-02-16 06:16:14 |
Message-ID: | CA+hUKGJmfpS785ZbetM18AGhWjzJd9kSjE1wru7omyf-pOzCAg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 16, 2023 at 6:34 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > Therefore I think it is safe to drop the PS_USE_PS_STRING and
> > PS_USE_CHANGE_ARGV code branches, remove a bunch of outdated comments
> > and macro tests, and prune the defunct configure/meson probe.
>
> Seems reasonable. Patch passes an eyeball check.
Thanks for looking.
> > I guess (defined(sun) && !defined(BSD)) || defined(__svr5__) could be
> > changed to just defined(sun) (surely there are no other living
> > SysV-derived systems, and I think non-BSD Sun probably meant "Solaris
> > but not SunOS"), but I don't know so I didn't touch that.
>
> Hm, is "defined(sun)" true on any live systems at all?
My GCC compile farm account seems to have expired, or something, so I
couldn't check on wrasse's host (though whether wrasse is "live" is
debatable: Solaris 11.3 has reached EOL, it's just that the CPU is too
old to be upgraded, so it's not testing a real OS that anyone would
actually run PostgreSQL on). But from some googling[1], I think
__sun, __sun__ and sun should all be defined.
Ohh, but __svr5__ should not be. Solaris boxes define __svr4__, I was
confused by the two fives. __svr5__ was SCO/Unixware, another dead
OS[1], so I think we can just remove that one too. So, yeah, I think
we should replace (defined(sun) && !defined(BSD)) || defined(__svr5__)
with defined(__sun). (Hmph. We have all of __sun__, __sun and sun in
the tree.)
[1] https://stackoverflow.com/questions/16618604/solaris-and-preprocessor-macros
[2] https://en.wikipedia.org/wiki/UNIX_System_V#SVR5_/_UnixWare_7
From | Date | Subject | |
---|---|---|---|
Next Message | Hayato Kuroda (Fujitsu) | 2023-02-16 06:20:23 | RE: Time delayed LR (WAS Re: logical replication restrictions) |
Previous Message | Joel Jacobson | 2023-02-16 05:59:13 | Missing free_var() at end of accum_sum_final()? |