Re: ECPG interface: 7.4beta3 compile failure; CVS tip

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ECPG interface: 7.4beta3 compile failure; CVS tip
Date: 2003-09-18 18:44:25
Message-ID: 1063910665.18546.63.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2003-09-18 at 19:25, Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> > Line 138 begins the definition of strndup(). However, strndup() is also
> > declared in string.h, which is included by this file. If I rename this
> > function to estrndup() (and also where it is called, further down) the
> > compilation succeeds.
>
> Hm, is strndup defined as a macro in your string.h? I suspect it's not
> a good idea to be providing a local definition of something that might
> be considered a standard function.

/* Return a malloc'd copy of at most N bytes of STRING. The
resultant string is terminated even if no null terminator
appears before STRING[N]. */
#if defined __USE_GNU
extern char *strndup (__const char *__string, size_t __n)
__THROW __attribute_malloc__;
#endif

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Give, and it shall be given unto you; good measure,
pressed down, and shaken together, and running over,
shall men pour into your lap. For by your standard of
measure it will be measured to you in return."
Luke 6:38

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-18 19:08:48 Re: [HACKERS] Killing the backend to cancel a long waiting query
Previous Message Tom Lane 2003-09-18 18:25:39 Re: ECPG interface: 7.4beta3 compile failure; CVS tip compile failure