]> git.saurik.com Git - bison.git/commitdiff
DJGPP spicific: NULL pointer fix
authorJuan Manuel Guerrero <juan.guerrero@gmx.de>
Thu, 21 Feb 2002 12:13:50 +0000 (12:13 +0000)
committerJuan Manuel Guerrero <juan.guerrero@gmx.de>
Thu, 21 Feb 2002 12:13:50 +0000 (12:13 +0000)
ChangeLog
src/getargs.c

index 21df4c53c3a5894dacc9224cfc6fc85b5058a59b..661e9ca843aee903a0073b273d7f50cbad715c80 100644 (file)
--- 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
 2002-02-14  Paul Eggert  <eggert@twinsun.com>
 
        Remove the support for C++ namespace cleanliness; it was
index 02cfb845fbd40b467027716a16418b3354d0e321..0565b0669a1f7070648a40fd05c9b9ac0ae359a6 100644 (file)
@@ -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. */
 #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
 # else
 #  define AS_FILE_NAME(File) (strlwr (File), (File))
 # endif