Re: [HACKERS] Patch for VS.Net 2005's strxfrm() bug

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: William ZHANG <uniware(at)zedware(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Patch for VS.Net 2005's strxfrm() bug
Date: 2006-07-26 17:15:45
Message-ID: 200607261715.k6QHFjP28100@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Patch attached and applied. Thanks.

---------------------------------------------------------------------------

Hiroshi Saito wrote:
> Hi.
>
> "William ZHANG" <uniware(at)zedware(dot)org> wrote in message news:ea5fm1$2q6i$1(at)news(dot)hub(dot)org(dot)(dot)(dot)
> > When I tried to compile pgsql-8.2devel with VS.Net 2005 and do regression
> > tests,
> > I found the problem. It's a bug inVS.Net 2005:
> > http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99694
> >
>
> + /* http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99694 */
> + #if _MSC_VER == 1400
> + {
> + char x[1];
> +
> + xfrmlen = strxfrm(x, val, 0);
> + }
> + #else
> xfrmlen = strxfrm(NULL, val, 0);
> + #endif
>
>
> Hmm, It seems to be the bug of very unpleasant Microsoft.:D
> I think that the following is desirable as an evasion measure to add.
>
> #if defined(_MSC_VER) && _MSC_VER == 1400
>
> To be sure, it was only VS2005.
>
> Regards,
> Hiroshi Saito
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/bjm/diff text/x-diff 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2006-07-26 17:23:45 Re: Better name/syntax for "online" index creation
Previous Message Bruce Momjian 2006-07-26 17:14:58 Re: [HACKERS] Patch for VS.Net 2005's strxfrm() bug

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-07-26 17:35:34 Re: [PATCH] Provide 8-byte transaction IDs to user level
Previous Message Bruce Momjian 2006-07-26 17:14:58 Re: [HACKERS] Patch for VS.Net 2005's strxfrm() bug