Provide local implementation of the GNU variant of basename() under Windows.

This commit is contained in:
Konstantin Isakov 2009-02-02 01:18:21 +00:00
parent 13d0637357
commit b675289f68

View file

@ -131,6 +131,23 @@ Entry::Entry( File::Class & f )
read * sizeof( uint16_t ) ); read * sizeof( uint16_t ) );
} }
#ifdef __WIN32
// Win32 features the usual Posix basename() which may modify its input. We
// provide our local implementation here instead.
char const * basename( char const * n )
{
char const * lastSep = strrchr( n, '\\' );
if ( !lastSep )
return n;
return lastSep + 1;
}
#endif
class LsaDictionary: public BtreeIndexing::BtreeDictionary class LsaDictionary: public BtreeIndexing::BtreeDictionary
{ {
File::Class idx; File::Class idx;