[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] stpncpy and AIX

From: Bruno Haible
Subject: Re: [Bug-gnulib] stpncpy and AIX
Date: Thu, 25 Sep 2003 22:24:21 +0200
User-agent: KMail/1.5

Jim Meyering wrote:
> How does its behavior differ?

glibc's stpncpy (to, from, n) has the return value  to + n,
whereas in AIX the return value is                  to + max (n, 1) - 1

> What about having an autoconf test detect it

A possible test that invokes running a program can be made up by testing
the return value of a sample call. But it doesn't work with crosscompiling.

> and then compile the replacement function only if necessary?

Sure, that's what we do always.

> I'd rather not have to try to remember to use the gnu_ prefix
> in gnu_stpncpy.

Of course. The .m4 macro takes care of this. Like we do for fnmatch(),
getline(), getpass(), mbswidth().


reply via email to

[Prev in Thread] Current Thread [Next in Thread]