3 # Define some macros required for proper operation of code in lib/*.c
4 # on MSDOS/Windows systems.
10 AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
13 [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
14 neither MSDOS nor Windows
16 [ac_cv_win_or_dos=yes],
17 [ac_cv_win_or_dos=no])
20 if test x"$ac_cv_win_or_dos" = xyes; then
21 ac_fs_accepts_drive_letter_prefix=1
22 ac_fs_backslash_is_file_name_separator=1
24 ac_fs_accepts_drive_letter_prefix=0
25 ac_fs_backslash_is_file_name_separator=0
28 AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
29 [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
30 # define FILESYSTEM_PREFIX_LEN(Filename) \
31 ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
33 # define FILESYSTEM_PREFIX_LEN(Filename) 0
36 AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
37 $ac_fs_accepts_drive_letter_prefix,
38 [Define on systems for which file names may have a so-called
39 `drive letter' prefix, define this to compute the length of that
40 prefix, including the colon.])
43 [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
44 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
46 # define ISSLASH(C) ((C) == '/')
49 AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
50 $ac_fs_backslash_is_file_name_separator,
51 [Define if the backslash character may also serve as a file name
52 component separator.])