On Mon, Sep 7, 2020 at 10:36 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > Excellent. I'd like to commit these soon, unless someone has a better
> > idea for how to name file_utils_febe.c.
>
> As long as it's in src/port or src/common, isn't it implicit that
> it's probably FE/BE common code?
>
> I think it'd make more sense to insert all this stuff into file_utils.c,
> and then just "#ifdef FRONTEND" the existing code there that doesn't work
> in backend. For one thing, that gives us a saner upgrade path whenever
> somebody gets ambitious enough to make that code work for the backend.
True. Ok, I committed the Unix patch that way. I know it works on
Linux, FreeBSD, macOS and Windows (without Juan José's patch), but
I'll have to check the build farm later to make sure HPUX, AIX and
Solaris are OK with this. It's remotely possible that one of them
defines DT_REG etc but doesn't have d_type; I'm hoping to get away
with not adding a configure check.
I'll wait a bit longer for comments on the Windows patch.