[PATCH] simplify ldap URL construction
Jim Meyering
jim at meyering.net
Thu Apr 26 15:57:20 CEST 2012
Jim Meyering wrote:
> Werner Koch wrote:
>> On Wed, 25 Apr 2012 17:44, jim at meyering.net said:
>>> - strncpy( p, sep, slen );
>>> - p += slen;
>>> + p = stpncpy( p, sep, slen );
>>
>> Well, stpncpy is not portable. However it looks very useful.
>
> Good catch.
>
> But gnupg uses gnulib, and there's a stpncpy module to ensure
> that it's available.
gnulib's stpcpy module is also good to use, since some systems lack it:
[from doc/posix-functions/stpcpy.texi]
This function is missing on some platforms:
AIX 4.3.2
Cygwin 1.5.x
HP-UX 11
IRIX 6.5
Interix 3.5.
MSVC 9
Minix 3.1.8
NetBSD 5.0
OSF/1 5.1
OpenBSD 3.8
Solaris 10
mingw
More information about the Gnupg-devel
mailing list