[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glob() problem with double '//' in path
From: |
Eli Zaretskii |
Subject: |
Re: glob() problem with double '//' in path |
Date: |
03 Feb 2004 19:17:21 +0200 |
> Date: Mon, 02 Feb 2004 14:23:09 -0500
> From: Kris Warkentin <address@hidden>
>
> I notice that when you build make with msdev studio, any paths that come
> into glob() looking like, for example ../../rom//*.c, do not get
> expanded properly.
>
> This doesn't seem to be a problem with a cygwin or other unix built
> make. I hacked a really stupid and ugly fix (we were supposed to go
> beta today...) but I'm sure that there is probably a better way to do
> it. Ideally, our makefile structure wouldn't be passing // in but it's
> not a perfect world and this hack was easier to do in the short term.
It is a known issue with Windows system calls and API functions: they
barf on multiple consecutive slashes. A better way is to fix this in
the underlying library, but that's impossible to do in a native
Windows port (Cygwin and DJGPP do that, but then they own the
library).
It's probably best to condition the patch in WINDOWS32, or perhaps
invent a function e.g. normalize_file_name that would be a no-op on
all platforms except Windows and hide its implementation on a
Windows-specific file.