home *** CD-ROM | disk | FTP | other *** search
- #ifdef amiga
-
- #include <exec/types.h>
- #include <exec/ports.h>
- #include <exec/memory.h>
- #include <exec/execbase.h>
- #include <dos/dos.h>
- #include <dos/dosextens.h>
- #include <dos/exall.h>
- #include <inline/stubs.h>
- #ifdef __OPTIMIZE__
- #include <inline/dos.h>
- #else
- #include <clib/dos_protos.h>
- #endif
-
- #endif
-
- #include <stdioprivate.h>
-
- int rename (const char *_old, const char *_new)
- {
- #ifdef amiga
- if(Rename(STRPTR) _old, (STRPTR) _new) == 0)
- return -1;
- else return 0;
- #else
- if (link (_old, _new) == -1)
- return -1;
-
- if (unlink (_old) == -1)
- return -1;
-
- return 0;
- #endif
- }
-