On Thu, Feb 16, 2023 at 6:34 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.mu...@gmail.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