Re: Rename StrNCpy to avoid conflictions on win32

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rename StrNCpy to avoid conflictions on win32
Date: 2009-09-07 09:36:24
Message-ID: 9837222c0909070236w7bb305fmb1a6fe5f6d531df@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 7, 2009 at 04:40, Itagaki
Takahiro<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)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 Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-09-07 10:28:16 Re: Rename StrNCpy to avoid conflictions on win32
Previous Message Peter Eisentraut 2009-09-07 07:53:57 Re: Triggers on columns