[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Windows file name separators
From: |
Ludovic Courtès |
Subject: |
Windows file name separators |
Date: |
Mon, 09 Jun 2014 21:42:36 +0200 |
User-agent: |
Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) |
Eli Zaretskii <address@hidden> skribis:
> 3. load.test fails:
>
> FAIL: load.test: search-path for "foo.scm" yields "dir1/foo.scm"
>
> (The messages are misleading: "yields" should be "should yield".)
>
> The test fails because:
>
> . it compares file names with equal?, which fails when Windows
> file names with mixed forward and backslashes are used, and/or
> when the files differ but for letter case
>
> . the expected result uses a relative file name of temp-dir, while
> search-path returns absolute file names
>
> Fixed by using "/" to create a file name from its parts in load.c:
>
> --- libguile/load.c~ 2014-02-28 23:01:27 +0200
> +++ libguile/load.c 2014-06-08 13:27:24 +0300
> @@ -452,11 +452,15 @@ scm_c_string_has_an_ext (char *str, size
> return 0;
> }
>
> +#if 0
> #ifdef __MINGW32__
> #define FILE_NAME_SEPARATOR_STRING "\\"
> #else
> #define FILE_NAME_SEPARATOR_STRING "/"
> #endif
> +#else
> +#define FILE_NAME_SEPARATOR_STRING "/"
> +#endif
>
> static int
> is_file_name_separator (SCM c)
>
> I don't see any reasons to use the backslashes when constructing
> Windows file names. Unless someone can tell why using backslashes
> is a good idea, I propose to remove the Windows setting of
> FILE_NAME_SEPARATOR_STRING.
I’m confused: this was added in 4bab7f01 precisely to support MinGW or
Windows. Similarly, boot-9.scm has ‘file-name-separator-string’ and
related stuff. This was the result of the discussion at
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10474#89>.
Thanks,
Ludo’.
- Re: MinGW vs. c-api.test, (continued)
- Re: MinGW vs. c-api.test, Eli Zaretskii, 2014/06/12
- Re: MinGW vs. c-api.test, Ludovic Courtès, 2014/06/12
- Re: MinGW vs. c-api.test, Eli Zaretskii, 2014/06/12
- Re: MinGW vs. c-api.test, Ludovic Courtès, 2014/06/12
- Re: MinGW vs. c-api.test, Neil Jerram, 2014/06/13
- Re: MinGW vs. c-api.test, Ludovic Courtès, 2014/06/13
- Re: MinGW vs. c-api.test, Eli Zaretskii, 2014/06/13
- Re: MinGW vs. c-api.test, Neil Jerram, 2014/06/13
- Re: MinGW vs. c-api.test, Mike Gerwitz, 2014/06/13
- Re: MinGW vs. c-api.test, Eli Zaretskii, 2014/06/13
Windows file name separators,
Ludovic Courtès <=