Subject: RE: incompatible rename in crtdll
From: [email-masked] (Colin Peters)

31 Oct 1998 00:22:43 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Anders Norlander" <[email-masked]>
Cc: "GNU-win32" <[email-masked]>

Anders Norlander <[email-masked]> wrote:

[snip]
>I have noticed that rename in crtdll does not behave as you would
>expect it to do on a unix system. If the new filename already
>exists the function will fail. I noticed this when porting
>patch to mingw32. Cygwin handles this correctly.
>To get around it you would have to do something like this:

[snip]
>I don't know about msvcrtxx.dll, but the win32 docs say
>that the rename operation will fail if the destination
>already exists. This would be something to fix in liboldnames.a.

My position on this (which is only my position since you can feel free to
modify the code and release your own version) has always been that the aim
of Mingw32 is not to emulate UNIX. If anything the aim is to emulate MSVC. I
personally only add UNIX-isms to my copies of the libraries if (1) they
won't break MS-like code and
(2) they are really simple (or (2b) have no impact on programs that don't
use them explicitly). Basically, porting a UNIX program to Mingw32 is pretty
close to porting it to MSVC (where, as you point out, you would have to deal
with those different rename semantics). If you want UNIX semantics then you
should be using Cygwin or another UNIX emulation package.

Having said all that, I believe some people have taken on the job of
UNIX-ifying Mingw32 a bit more than my (rather dogmatic) position stated
above. IIRC Earnie Boyd had some patches for Mingw32 to make it easier to
port UNIX stuff... take a look in the mailing list archives.

And, of course, this is just my position. It may, in the end, only apply to
the source code on my hard drive and nowhere else :-). Don't take my
statements the wrong way; I have nothing against emulating UNIX. It's just
not the aim of Mingw32 (IMO).

Colin.

- Colin Peters - colin at fu.is.saga-u.ac.jp
- http://www.geocities.com/Tokyo/Towers/6162/index.html
- Go not to usenet for counsel, for it will say both
- 'yes' and 'no' and 'try another newsgroup'.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".