bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Building and testing wget 1.16.1 on MinGW


From: Tim Rühsen
Subject: Re: [Bug-wget] Building and testing wget 1.16.1 on MinGW
Date: Thu, 25 Dec 2014 12:10:04 +0100
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Am Montag, 22. Dezember 2014, 18:09:06 schrieb Eli Zaretskii:
> > From: Tim Rühsen <address@hidden>
> > Date: Sun, 21 Dec 2014 18:24:19 +0100
> > 
> > > > +  exec_name = basename (argv[0]);
> > > 
> > > Shouldn't this use base_name?  AFAICS, this is what gnulib provides.
> > 
> > base_name() is a similar function (but I couldn't find a documentation).
> > https://www.gnu.org/software/gnulib/manual/html_node/basename.html
> > 
> > The most important part seems to leave libgen.h away. To avoid the POSIX
> > basename function.
> 
> I'm sorry, but it looks like I'm still missing something.  AFAICS,
> gnulib doesn't offer 'basename', it only offers 'base_name'.  I
> verified this by running "nm -A" on libgnu.a.
> 
> The node you cite from the Gnulib manual says:
> 
>   Gnulib module: —
> 
>   Portability problems fixed by Gnulib:
> 
>   Portability problems not fixed by Gnulib:
> 
>       This function is missing on some platforms: IRIX 6.5, Solaris 2.5.1,
> mingw, MSVC 9, BeOS. glibc has two different functions basename: the POSIX
> version and the GNU version. basename assumes file names in POSIX syntax;
> it does not work with file names in Windows syntax.
> 
>   The Gnulib module dirname provides similar API, with function base_name,
> that also works with Windows file names.
> 
> My interpretation of this is:
> 
>   . Gnulib doesn't provide a substitute for this function (that's the
>     "Gnulib module: —" part above, which is explained in the parent
>     node).  It is also consistent with "Portability problems not fixed
>     by Gnulib:"                                              ^^^^^^^^^
> 
>   . 'basename' as defined by Posix doesn't support Windows file names.
> 
>   . Gnulib provides a similar function called 'base_name' that does
>     work on Posix and Windows platforms alike.
> 
> So it looks to me that my original comment was correct, and we should
> call base_name.  What am I missing?

Thanks, Eli.

I got a clear answer from the gnulib people to use base_name().
I pushed the appropriate change.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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