3
# Define some macros required for proper operation of code in lib/*.c
4
# on MSDOS/Windows systems.
6
# Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
7
# This file is free software; the Free Software Foundation
8
# gives unlimited permission to copy and/or distribute it,
9
# with or without modifications, as long as this notice is preserved.
15
AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
18
[#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
19
neither MSDOS nor Windows
21
[ac_cv_win_or_dos=yes],
22
[ac_cv_win_or_dos=no])
25
if test x"$ac_cv_win_or_dos" = xyes; then
26
ac_fs_accepts_drive_letter_prefix=1
27
ac_fs_backslash_is_file_name_separator=1
29
ac_fs_accepts_drive_letter_prefix=0
30
ac_fs_backslash_is_file_name_separator=0
33
AH_VERBATIM(FILE_SYSTEM_PREFIX_LEN,
34
[#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
35
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
36
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
38
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
41
AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
42
$ac_fs_accepts_drive_letter_prefix,
43
[Define on systems for which file names may have a so-called
44
`drive letter' prefix, define this to compute the length of that
45
prefix, including the colon.])
48
[#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
49
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
51
# define ISSLASH(C) ((C) == '/')
54
AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
55
$ac_fs_backslash_is_file_name_separator,
56
[Define if the backslash character may also serve as a file name
57
component separator.])