summaryrefslogtreecommitdiff
path: root/libiberty/basename.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2000-12-08 16:37:01 +0000
committerDJ Delorie <dj@delorie.com>2000-12-08 16:37:01 +0000
commit35321415e808e149edd05fce61d771bc30503624 (patch)
tree3b647cbaf9d250da6cc15f32b5d946bec6f65325 /libiberty/basename.c
parentff973f2271429b95f36a4ae299824f33e775c7c9 (diff)
downloadgdb-35321415e808e149edd05fce61d771bc30503624.tar.gz
* safe-ctype.c: New file.
* Makefile.in (CFILES): Add safe-ctype.c. (REQUIRED_OFILES): Add safe-ctype.o. * argv.c: Define ISBLANK and use it, not isspace. * basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c, strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c) before calling TOLOWER(c)/TOUPPER(c).
Diffstat (limited to 'libiberty/basename.c')
-rw-r--r--libiberty/basename.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/basename.c b/libiberty/basename.c
index 7698f06f8ae..ca089ebbc5a 100644
--- a/libiberty/basename.c
+++ b/libiberty/basename.c
@@ -20,7 +20,7 @@ BUGS
#include "ansidecl.h"
#include "libiberty.h"
-#include <ctype.h>
+#include "safe-ctype.h"
#ifndef DIR_SEPARATOR
#define DIR_SEPARATOR '/'
@@ -50,7 +50,7 @@ basename (name)
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha (name[0]) && name[1] == ':')
+ if (ISALPHA (name[0]) && name[1] == ':')
name += 2;
#endif