bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: MinGW and patch 2.5.9


From: Paul Eggert
Subject: Re: MinGW and patch 2.5.9
Date: 12 Oct 2003 21:59:03 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"Stephan T. Lavavej" <address@hidden> writes:

>  # ifndef ISSLASH
> -#  define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
> +#  ifdef __MINGW32__
> +#   define ISSLASH(C) ((C) == '/' || (C) == '\\')
> +#  else
> +#   define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
> +#  endif
>  # endif

This patch shouldn't be needed.  Somehow
FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR got misconfigured.
Someone needs to track down how that occurred, and fix the underlying
problem instead.

> -       if (errno == EXDEV)
> +#ifdef __MINGW32__
> +      if (errno == EXDEV || errno == EEXIST)
> +#else
> +      if (errno == EXDEV)
> +#endif

This doesn't look right to me.  I don't use your OS, but my guess is
that you're getting EEXIST because your OS refuses to rename A to B if
B already exists and is not writeable.  But in that case, I'd guess
you shouldn't be able to unlink B either, so you'll get an error
message anyway.

Even if the fix is correct, I'd rather substitute a 'rename'
implementation that works as 'patch' expects, using a wrapper, rather
than modify the mainline source.  See the pc/djgpp subdirectory for
how this is done for DJGPP.  A similar directory could be set up for
mingw, if a mingw expert has the time and inclination to maintain one.

Likewise for the mkdir change; let's use a mkdir wrapper defined in
pc/mingw rather than altering the mainline source.


> There is another problem with patch and MinGW: sometimes an assertion will
> fail (patch.c line 340).  This appears to be related to CR/LF issues, and
> passing --binary to patch makes it work.

Unfortunately I can't debug the problem given only that information;
I'll need to know more about what the problem really is.  I don't use
Microsoft Windows so I can't reproduce the problem myself.




reply via email to

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