X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=libiberty%2Flbasename.c;fp=libiberty%2Flbasename.c;h=56fcd6250729f476231830f4ff0e808f3f65c9c0;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=cea0253887b89a34690f76c65fa8be3f7e59a79f;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libiberty/lbasename.c b/libiberty/lbasename.c index cea02538..56fcd625 100644 --- a/libiberty/lbasename.c +++ b/libiberty/lbasename.c @@ -1,6 +1,6 @@ /* Libiberty basename. Like basename, but is not overridden by the system C library. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -15,8 +15,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with libiberty; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, +Boston, MA 02110-1301, USA. */ /* @@ -37,40 +37,16 @@ and a path ending in @code{/} returns the empty string after it. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ansidecl.h" #include "libiberty.h" #include "safe-ctype.h" - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) \ - || defined (__DJGPP__) || defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -#endif - -/* Define IS_DIR_SEPARATOR. VMS uses '::', ':', '[...]' and '<...>' to - separate the different components of a file specification. It's a - bit of a stretch to call ':', ']' and '>' directory separators, so - just define the test to find the file name component. */ -#ifdef VMS -# define IS_DIR_SEPARATOR(ch) ((ch) == ':' || (ch) == ']' || (ch) == '>') -#else -# ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -# else -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -# endif -#endif +#include "filenames.h" const char * -lbasename (name) - const char *name; +lbasename (const char *name) { const char *base;