Re: [Mingw-w64-public] basename with "/usr/"
On Sat, Dec 30, 2017 at 4:38 PM, Vincent Torriwrote: > hello > > I tried dirname and basename with all the examples found here : > https://linux.die.net/man/3/dirname > > and with "/usr/" I obtain > * for dirname : / (wich is correct) > * for basename : empty string (which is different from linux > basename, should be "usr") > > is it a bug ? if I strdup the path, then it is correct forget about the noise Vincent Torri -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] basename with "/usr/"
On Sat, Dec 30, 2017 at 4:38 PM, Vincent Torriwrote: > hello > > I tried dirname and basename with all the examples found here : > https://linux.die.net/man/3/dirname > > and with "/usr/" I obtain > * for dirname : / (wich is correct) > * for basename : empty string (which is different from linux > basename, should be "usr") > > is it a bug ? or actually, it follows the GNU version as mentioned in the notes. But I have that behavior without using _GNU_SOURCE Vincent Torri -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] basename with "/usr/"
also for dirname.c, line 74, maybe we should add a test like (refpath[0]>= 'a' && refpath[0]>= 'z') || (refpath[0]>= 'A' && refpath[0]>= 'Z') Vincent Torri On Sat, Dec 30, 2017 at 4:38 PM, Vincent Torriwrote: > hello > > I tried dirname and basename with all the examples found here : > https://linux.die.net/man/3/dirname > > and with "/usr/" I obtain > * for dirname : / (wich is correct) > * for basename : empty string (which is different from linux > basename, should be "usr") > > is it a bug ? > > thank you > > Vincent Torri -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] basename with "/usr/"
hello I tried dirname and basename with all the examples found here : https://linux.die.net/man/3/dirname and with "/usr/" I obtain * for dirname : / (wich is correct) * for basename : empty string (which is different from linux basename, should be "usr") is it a bug ? thank you Vincent Torri -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public