bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tim-3] Improved DJGPP support in src/files.c


From: Jim Meyering
Subject: Re: [tim-3] Improved DJGPP support in src/files.c
Date: Thu, 17 Jan 2002 13:20:21 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2.50 (i686-pc-linux-gnu)

Akim Demaille <address@hidden> wrote:
> Paul, Jim,
>
> Any problem with moving jm_AC_DOS into Autoconf as AC_SYS_DOS?
> Or AC_SYS_FILENAMES?  Or AS_SYS_ISSLASH etc.  I don't think referring
> to DOS here is right, we ought to refer to the feature we look for/we
> define.

Hi Akim,

You're welcome to put it in autoconf.
I'm not sure about the name, though.  Since that test is
one of the few that is implemented not as a true feature test
but as a test of system-specific cpp macros,

    AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
      [
        AC_TRY_COMPILE([],
        [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
neither MSDOS nor Windows
#endif],
        [ac_cv_win_or_dos=yes],
        [ac_cv_win_or_dos=no])
      ])

    if test x"$ac_cv_win_or_dos" = xyes; then
      ac_fs_accepts_drive_letter_prefix=1
      ac_fs_backslash_is_file_name_separator=1
    else
      ac_fs_accepts_drive_letter_prefix=0
      ac_fs_backslash_is_file_name_separator=0
    fi
    ...

maybe AC_SYS_DOS is more accurate.
But that's not very descriptive of what it provides,
so I think AC_SYS_FILENAMES is better.

What'd be best is if someone could come up with independent
tests for these macros:
  FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
  FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR

Jim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]