+2001-12-21 Bruno Haible <bruno@clisp.org>
+
+ * localcharset.c (ISSLASH): Provide definition for DOS-like systems.
+
2001-12-21 Bruno Haible <bruno@clisp.org>
* libgettext.h: Moved to ../lib/gettext.h.
# include <os2.h>
#endif
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
#endif
+2001-12-21 Bruno Haible <bruno@clisp.org>
+
+ * localcharset.c (ISSLASH): Provide definition for DOS-like systems.
+ * basename.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
+
2001-12-22 Bruno Haible <bruno@clisp.org>
* binary-io.h: New file, extracted from system.h.
#include <stdio.h>
#include <assert.h>
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
#ifndef FILESYSTEM_PREFIX_LEN
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
# include <os2.h>
#endif
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
#endif