Re: Rename StrNCpy to avoid conflictions on win32 - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Rename StrNCpy to avoid conflictions on win32
Date
Msg-id 9837222c0909070236w7bb305fmb1a6fe5f6d531df@mail.gmail.com
Whole thread Raw
In response to Rename StrNCpy to avoid conflictions on win32  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Rename StrNCpy to avoid conflictions on win32
List pgsql-hackers
On Mon, Sep 7, 2009 at 04:40, Itagaki
Takahiro<itagaki.takahiro@oss.ntt.co.jp> wrote:
> We define StrNCpy() macro in c.h, but it conflicts another macro
> defined in Microsoft SDKs:
>
>    C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\shlwapi.h(435)
>        : warning C4005: 'StrNCpy' : macro redefinition
>
> Can we rename StrNCpy() macro to another name? (ex. pg_strncpy)

+1.

> There might be some places to replace it to strlcpy() instead.

Can't comment on that without looking at the code, but it wouldn't surprise me.

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Triggers on columns
Next
From: Peter Eisentraut
Date:
Subject: Re: Rename StrNCpy to avoid conflictions on win32