Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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: /bjm/diff
Description: text/x-diff (1.1 KB)

In response to

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group