| From: | Magnus Hagander <magnus(at)hagander(dot)net> | 
|---|---|
| To: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Compile fail, alpha5 & gcc 4.3.3 in elog.c | 
| Date: | 2010-04-06 06:54:34 | 
| Message-ID: | n2z9837222c1004052354t98188bces6d59cf8669b59b55@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Tue, Apr 6, 2010 at 07:29, Takahiro Itagaki
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> > -   cygwin_conv_to_full_win32_path(cmdLine, buf);
>> > +   cygwin_conv_path(CCP_POSIX_TO_WIN_A, cmdLine, buf, sizeof(buf));
>>
>> Buildfarm member brown_bat didn't like this.  Seeing that that's the
>> *only* active cygwin buildfarm member, that's not a good percentage.
>
> Hmmm, but avoiding deprecated APIs would be good on the lastest cygwin.
> How about checking the version with #ifdef?
>
>  #ifdef __CYGWIN__
>        /* need to convert to windows path */
> +#if CYGWIN_VERSION_DLL_MAJOR >= 1007
>        cygwin_conv_path(CCP_POSIX_TO_WIN_A, cmdLine, buf, sizeof(buf));
> +#else
> +       cygwin_conv_to_full_win32_path(cmdLine, buf);
> +#endif
>        strcpy(cmdLine, buf);
>  #endif
That seems like the way to do it. Or if it's used in many places, use
a #define from one to the other - we don't want those #ifdef's all
over the place.
Seems cygwin may have deprecated that API a bit early :-), but there's
nothing we can do about that. If it's deprecated, they'll eventually
delete it...
-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2010-04-06 07:07:37 | Re: Quoting in recovery.conf | 
| Previous Message | Heikki Linnakangas | 2010-04-06 06:47:10 | Quoting in recovery.conf |