Re: dirname module calls AC_LIBOBJ unconditionally

2005-12-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Jim Meyering on 12/23/2005 5:05 AM:
> Eric Blake wrote:
> 
>>So experience in gnulib has shown that slightly different semantics,
>>with dir_name that always mallocs, and (when my patch from a
>>month ago is approved) base_name that mallocs and last_component
> 
> 
> As far as I know, we're still waiting for confirmation from the
> FSF that they have your copyright assignment papers.
> 

Yes, that is my understanding of the matter as well.  Hopefully it won't
be too much longer; I received word on Dec 19 that my employer disclaimer
is now on file at the FSF, but that my signature was still needed on
several per-project copyright assignments that were being mailed to me.
I'll continue to be patient with the matter.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDq/Rq84KuGfSFAYARAhFkAJ0czcNdXACEshdk2+9E86Y9G+rBiwCgxLbs
DadITwppjdFlBveG0EEX3nc=
=Jv3i
-END PGP SIGNATURE-


___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib


Re: dirname module calls AC_LIBOBJ unconditionally

2005-12-23 Thread Jim Meyering
[EMAIL PROTECTED] (Eric Blake) wrote:
> So experience in gnulib has shown that slightly different semantics,
> with dir_name that always mallocs, and (when my patch from a
> month ago is approved) base_name that mallocs and last_component

As far as I know, we're still waiting for confirmation from the
FSF that they have your copyright assignment papers.


___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib


Re: dirname module calls AC_LIBOBJ unconditionally

2005-12-22 Thread Eric Blake
> The gl_DIRNAME macro (in dirname.m4) calls AC_LIBOBJ([dirname])
> unconditionally, without testing for a working dirname implementation.

The dirname module provides dir_name and base_name, not
dirname and basename.  The reason for this is that POSIX
does not allow dirname() or basename() to malloc their results,
but allows the implementation to choose between modifying the
input string (not good for read-only input) or using static storage
(not threadsafe).  This means that basename() and dirname()
are inherently non-portable, even though they are standardized.

So experience in gnulib has shown that slightly different semantics,
with dir_name that always mallocs, and (when my patch from a
month ago is approved) base_name that mallocs and last_component
that returns a pointer to the middle of the input string, is more
usable.  To get these useful semantics, the replacement must
always happen.

> 
> Also, the dirname module provides a basename implementation, but there
> is no basename.m4 that would test for this specific function.
> 
> I need to provide a replacement for basename in case this function is
> missing or broken. Although my own system has a working basename, the
> portability library is always built.

Don't use basename.  If you use gnulib, use base_name, with
its one-off semantics.

> 
> It seems two things are required: Adding a basename.m4, and writing a
> test for a working basename implementation, calling
> AC_LIBOBJ([basename]) on failure only. I would be grateful for any
> hints how to do this.

basename.m4 is not required, since the dirname module is
meant to be used as a group and does not replace any
missing/broken standardized functions.

> 
> Claudio
--
Eric Blake


___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib


dirname module calls AC_LIBOBJ unconditionally

2005-12-22 Thread Claudio Jolowicz
The gl_DIRNAME macro (in dirname.m4) calls AC_LIBOBJ([dirname])
unconditionally, without testing for a working dirname implementation.

Also, the dirname module provides a basename implementation, but there
is no basename.m4 that would test for this specific function.

I need to provide a replacement for basename in case this function is
missing or broken. Although my own system has a working basename, the
portability library is always built.

It seems two things are required: Adding a basename.m4, and writing a
test for a working basename implementation, calling
AC_LIBOBJ([basename]) on failure only. I would be grateful for any
hints how to do this.

Claudio

-- 
Claudio Jolowicz <[EMAIL PROTECTED]> 
PGP KeyID: C61DFB0C


signature.asc
Description: Digital signature
___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib