Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-09-18 23:32:43 +0400
committerJeff Johnston <jjohnstn@redhat.com>2007-09-18 23:32:43 +0400
commit3908c985922d653fa47775dfbf5d2d29ff7c4fa0 (patch)
treebf5fac0245666188665bcb55719e2000e288ab3f /newlib/libc/stdio
parent4090f565a839d8e846cf9c6249a5ebbfd8ad9790 (diff)
2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/reent/renamer.c: New file. * libc/reent/Makefile.am: Add new file. * libc/reent/Makefile.in: Regenerated. * libc/stdio/rename.c: Break out _rename_r code into reent/renamer.c and add check for rename syscall.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r--newlib/libc/stdio/rename.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/newlib/libc/stdio/rename.c b/newlib/libc/stdio/rename.c
index 4fa8e39a2..6eb1f7d19 100644
--- a/newlib/libc/stdio/rename.c
+++ b/newlib/libc/stdio/rename.c
@@ -21,27 +21,17 @@ FUNCTION
INDEX
rename
-INDEX
- _rename_r
ANSI_SYNOPSIS
#include <stdio.h>
int rename(const char *<[old]>, const char *<[new]>);
- int _rename_r(struct _reent *<[reent]>,
- const char *<[old]>, const char *<[new]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int rename(<[old]>, <[new]>)
char *<[old]>;
char *<[new]>;
- int _rename_r(<[reent]>, <[old]>, <[new]>)
- struct _reent *<[reent]>;
- char *<[old]>;
- char *<[new]>;
-
DESCRIPTION
Use <<rename>> to establish a new name (the string at <[new]>) for a
file now known by the string at <[old]>. After a successful
@@ -50,9 +40,6 @@ file now known by the string at <[old]>. After a successful
If <<rename>> fails, the file named <<*<[old]>>> is unaffected. The
conditions for failure depend on the host operating system.
-The alternate function <<_rename_r>> is a reentrant version. The
-extra argument <[reent]> is a pointer to a reentrancy structure.
-
RETURNS
The result is either <<0>> (when successful) or <<-1>> (when the file
could not be renamed).
@@ -70,27 +57,6 @@ Supporting OS subroutines required: <<link>>, <<unlink>>, or <<rename>>.
#include <stdio.h>
#include <sys/unistd.h>
-int
-_DEFUN(_rename_r, (ptr, old, new),
- struct _reent *ptr _AND
- _CONST char *old _AND
- _CONST char *new)
-{
-#ifdef HAVE_RENAME
- return _rename (old,new);
-#else
- if (_link_r (ptr, old, new) == -1)
- return -1;
-
- if (_unlink_r (ptr, old) == -1)
- {
- /* ??? Should we unlink new? (rhetorical question) */
- return -1;
- }
-#endif
- return 0;
-}
-
#ifndef _REENT_ONLY
int