Mail Archives: djgpp/1995/06/07/04:07:24
> I'd want a warning that this rename() is very different than the one in the
> current djgpp or most other DOS C compilers. If you try to use it to move a
> file to another directory, and the move fails because there is a file of the
> same name in the target directory, that file is deleted and the move is
> attempted again. That's how I'd expect a unix rename to work, but a DOS
> rename would just fail.
That's right. V2.0's rename() is Unix-compatible by design (as far as DOS lets
us, that is). There is nothing in the ANSI standard to rule out such a behavior,
and it surely makes porting Unix programs a lot easier. The most recent version
that might be added to the final version of the library can also move (prune and
graft) a directory to another branch of the file hierarchy.
As long as this is properly documented, what's wrong with that?
- Raw text -