Re: Re: patch for src/backend/main/main.ch - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Re: patch for src/backend/main/main.ch
Date
Msg-id 200101240151.UAA17405@candle.pha.pa.us
Whole thread Raw
In response to Re: Re: patch for src/backend/main/main.c  (Alfred Perlstein <bright@wintelcom.net>)
List pgsql-patches
See:

    ./utils/strdup.c

We use our own if configure does not find it.


> * Michael C. Thornburgh <zenomt@armory.com> [010123 17:33] wrote:
> >
> > that certainly works and is much cleaner, but strdup
> > may not be as ubiquitous as malloc & strncpy.
> > someone more versed in portability issues than i am
> > should speak to that.
>
> hmm:
>
> HISTORY
>      The strdup() function first appeared in 4.4BSD.
>
> however:
>
> http://www.abisource.com/mailinglists/abiword-dev/99/March/0038.html
>
>   "strdup is no in the ANSI standard"
>
> however:
>
> ~/pgcvs % find . -name "*.c" | xargs grep strdup | grep -v pstrdup | wc -l
>      563
>
>   (pstrdup() seems to be some internal postgresql function.)
>
> So I think anyone who wants to port should provide thier own
> function.
>
> --
> -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
> "I have the heart of a child; I keep it in a jar on my desk."
>


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Alfred Perlstein
Date:
Subject: Re: Re: patch for src/backend/main/main.c
Next
From: "Michael C. Thornburgh"
Date:
Subject: Re: Re: patch for src/backend/main/main.c