Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen. - Mailing list pgsql-committers

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.
Date
Msg-id 21088.1507667824@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementationof strlen.  (Andres Freund <andres@anarazel.de>)
Responses Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementationof strlen.  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
Andres Freund <andres@anarazel.de> writes:
> (there's definitely fixes to be made to where strnlen's replacement is
> located, but regardless, this needs to be fixed too)

Given that strnlen is standardized by POSIX, and has been for nigh a
decade, I think it'd be all right for us to treat it as a straight
port replacement function, a la strlcpy() for instance.  That is,
forget the pg_ prefix and just create a strnlen() function if the
platform has not got it.
        regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementationof strlen.
Next
From: Andres Freund
Date:
Subject: Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementationof strlen.