summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Manuel Guerrero <juan.guerrero@gmx.de>2002-02-21 12:13:50 +0000
committerJuan Manuel Guerrero <juan.guerrero@gmx.de>2002-02-21 12:13:50 +0000
commit48dccdf81aa177999777af788c0bfa551b1b6665 (patch)
tree18b14ad779db2b40322f9fac713184ffddbe174d
parent039e51a37c194130d20ce5c3a443bfb5d147a9e6 (diff)
downloadbison-48dccdf81aa177999777af788c0bfa551b1b6665.tar.gz
DJGPP spicific: NULL pointer fix
-rw-r--r--ChangeLog5
-rw-r--r--src/getargs.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 21df4c53..661e9ca8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-21 Guerrero, Juan Manuel <st001906@hrz1.hrz.tu-darmstadt.de>
+
+ * src/getargs.c [AS_FILE_NAME] [__DJGPP__]: New macro STRLWR.
+ Check that no NULL pointer is passed to strlwr.
+
2002-02-14 Paul Eggert <eggert@twinsun.com>
Remove the support for C++ namespace cleanliness; it was
diff --git a/src/getargs.c b/src/getargs.c
index 02cfb845..0565b066 100644
--- a/src/getargs.c
+++ b/src/getargs.c
@@ -165,7 +165,8 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
#ifdef MSDOS
# if defined (__DJGPP__)
/* Windows 9X and successors are case sensitive. */
-# define AS_FILE_NAME(File) ((pathconf ((File), _PC_NAME_MAX) > 12) ? (File) : (strlwr (File), (File)))
+# define STRLWR(String) ((String) ? (strlwr (String), (String)) : (String))
+# define AS_FILE_NAME(File) ((pathconf ((File), _PC_NAME_MAX) > 12) ? (File) : STRLWR (File))
# else
# define AS_FILE_NAME(File) (strlwr (File), (File))
# endif