Re: [PATCHES] Patch for VS.Net 2005's strxfrm() bug - Mailing list pgsql-hackers

From Hiroshi Saito
Subject Re: [PATCHES] Patch for VS.Net 2005's strxfrm() bug
Date
Msg-id 012401c6b007$a1480870$01324d80@hiroshi5jz7dqj
Whole thread Raw
In response to Re: [PATCHES] Patch for VS.Net 2005's strxfrm() bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Patch for VS.Net 2005's strxfrm() bug
List pgsql-hackers
Hi.

"William ZHANG" <uniware@zedware.org> wrote in message news:ea5fm1$2q6i$1@news.hub.org...
> 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Forcing current WAL file to be archived
Next
From: Bruce Momjian
Date:
Subject: Re: Forcing current WAL file to be archived