summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-03-28 15:12:41 +0100
committerBruno Haible <bruno@clisp.org>2020-03-28 15:12:41 +0100
commitb917c27c51da4c0486da3efa26d9181ba227fbe0 (patch)
tree1e8fbd415a32470bc4b9f6ea262e27a4f6f5d8b6
parent6b5ac8d538ffc395e7efb51cc9b27eb531c19566 (diff)
downloadgnulib-b917c27c51da4c0486da3efa26d9181ba227fbe0.tar.gz
dosname: Redirect to 'filename'.
Reported by Tim Rühsen <tim.ruehsen@gmx.de> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00042.html>. * lib/dosname.h: Remove all definitions. Just include filename.h. * modules/dosname (Status, Notice): Mark as deprecated. (Depends-on): Add 'filename'.
-rw-r--r--ChangeLog9
-rw-r--r--lib/dosname.h39
-rw-r--r--modules/dosname7
3 files changed, 18 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index af102e1dbb..b754b5ae40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2020-03-28 Bruno Haible <bruno@clisp.org>
+ dosname: Redirect to 'filename'.
+ Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00042.html>.
+ * lib/dosname.h: Remove all definitions. Just include filename.h.
+ * modules/dosname (Status, Notice): Mark as deprecated.
+ (Depends-on): Add 'filename'.
+
+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.
diff --git a/lib/dosname.h b/lib/dosname.h
index 926a6955bf..490e0c5a7d 100644
--- a/lib/dosname.h
+++ b/lib/dosname.h
@@ -13,41 +13,6 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
- From Paul Eggert and Jim Meyering. */
-
-#ifndef _DOSNAME_H
-#define _DOSNAME_H
-
-#if (defined _WIN32 || defined __CYGWIN__ \
- || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__)
- /* This internal macro assumes ASCII, but all hosts that support drive
- letters use ASCII. */
-# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \
- <= 'z' - 'a')
-# define FILE_SYSTEM_PREFIX_LEN(Filename) \
- (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
-# ifndef __CYGWIN__
-# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
-# endif
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-#else
-# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
-# define ISSLASH(C) ((C) == '/')
-#endif
-
-#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-#endif
-
-#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
-# else
-# define IS_ABSOLUTE_FILE_NAME(F) \
- (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
-#endif
-#define IS_RELATIVE_FILE_NAME(F) \
- (! (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0))
-
-#endif /* DOSNAME_H_ */
+#include "filename.h"
diff --git a/modules/dosname b/modules/dosname
index 0e8703cb33..e323aa743a 100644
--- a/modules/dosname
+++ b/modules/dosname
@@ -1,10 +1,17 @@
Description:
Macros for porting to systems with DOS-style file names.
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'filename' instead.
+
Files:
lib/dosname.h
Depends-on:
+filename
configure.ac: