]> Savannah Git Hosting - gnulib.git/commitdiff
dosname: Change IS_RELATIVE_FILE_NAME.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Mar 2020 13:59:24 +0000 (14:59 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Mar 2020 13:59:24 +0000 (14:59 +0100)
* lib/dosname.h (IS_RELATIVE_FILE_NAME): On native Windows, OS/2, DOS,
change the definition so that IS_RELATIVE_FILE_NAME("c:") is false.
* NEWS: Mention the change.

ChangeLog
NEWS
lib/dosname.h

index a238b1fc70083b48e51f6ccce3f2c1876ead8bf5..af102e1dbb138e6301265caffd838f91edd9a76e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-03-28  Bruno Haible  <bruno@clisp.org>
+
+       dosname: Change IS_RELATIVE_FILE_NAME.
+       * lib/dosname.h (IS_RELATIVE_FILE_NAME): On native Windows, OS/2, DOS,
+       change the definition so that IS_RELATIVE_FILE_NAME("c:") is false.
+       * NEWS: Mention the change.
+
 2020-03-28  Bruno Haible  <bruno@clisp.org>
 
        filename: Copy some definitions from module 'dosname'.
diff --git a/NEWS b/NEWS
index 3ec49f34e23e3b570f383965756c429f2803e40f..c9548d5b28bfaa439b942bbf5ce0b3f88f7b9bf5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,9 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2020-03-28  dosname         On native Windows, OS/2, DOS,
+                            IS_RELATIVE_FILE_NAME("c:") now returns false.
+
 2020-03-28  filename        The macro IS_ABSOLUTE_PATH is deprecated. Use
                             IS_ABSOLUTE_FILE_NAME instead.
                             The macro IS_PATH_WITH_DIR is deprecated. Use
index 57829600948c9fe1b620c1aa1082e5c93d087517..926a6955bf1d2c5f680684f4878a1c9d75a9bdcc 100644 (file)
@@ -47,6 +47,7 @@
 #  define IS_ABSOLUTE_FILE_NAME(F)                              \
      (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
 #endif
-#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
+#define IS_RELATIVE_FILE_NAME(F) \
+  (! (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0))
 
 #endif /* DOSNAME_H_ */