Re: Fix for win32 stat() problems - Mailing list pgsql-patches

From Tom Lane
Subject Re: Fix for win32 stat() problems
Date
Msg-id 24350.1207764886@sss.pgh.pa.us
Whole thread Raw
In response to Fix for win32 stat() problems  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Fix for win32 stat() problems  (Magnus Hagander <magnus@hagander.net>)
List pgsql-patches
Magnus Hagander <magnus@hagander.net> writes:
> + #ifndef WIN32
>           if (stat(xlogpath, &stat_buf) == 0)
> + #else
> +         if (pgwin32_safestat(xlogpath, &stat_buf) == 0)
> + #endif

Ick.  Please do this the way we normally do things when we have to
override broken Windows syscalls, that is put something like

    #define stat(...)  pgwin32_stat(...)

into the win32 port header file, so the calls don't have to be
nonstandard.

            regards, tom lane

pgsql-patches by date:

Previous
From: Magnus Hagander
Date:
Subject: Fix for win32 stat() problems
Next
From: Magnus Hagander
Date:
Subject: Re: Fix for win32 stat() problems