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>2002-05-25 03:44:39 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-05-25 03:44:39 +0400
commitd29587b4789426217ace96c1dccb249e3682eaf8 (patch)
tree5eb3816b224b613db0274c8bccd57ef729261b68 /newlib/libc/sys/linux
parent8b3e5e2d6e5076769d90662db759ce5009c1ba9c (diff)
2002-05-24 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/string.h: Add strnlen and strerror_r prototypes. * libc/string/Makefile.am: Add strnlen.c and strerror_r.c support. * libc/string/Makefile.in: Regenerated. * libc/string/strerror_r.c: New file. * libc/string/strnlen.c: New file. * libc/sys/linux/Makefile.am: Add rename.c. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/rename.c: New file to override default rename.
Diffstat (limited to 'newlib/libc/sys/linux')
-rw-r--r--newlib/libc/sys/linux/Makefile.am4
-rw-r--r--newlib/libc/sys/linux/Makefile.in23
-rw-r--r--newlib/libc/sys/linux/rename.c9
3 files changed, 23 insertions, 13 deletions
diff --git a/newlib/libc/sys/linux/Makefile.am b/newlib/libc/sys/linux/Makefile.am
index be4093805..8d9fe5aa2 100644
--- a/newlib/libc/sys/linux/Makefile.am
+++ b/newlib/libc/sys/linux/Makefile.am
@@ -13,8 +13,8 @@ LIB_SOURCES = \
brk.c flockfile.c funlockfile.c gethostname.c getoptlong.c getreent.c ids.c \
inode.c io.c io64.c linux.c mmap.c \
pread.c pread64.c process.c pwrite.c pwrite64.c raise.c realpath.c \
- resource.c sched.c select.c shm_open.c shm_unlink.c seteuid.c signal.c \
- siglongjmp.c socket.c sleep.c stack.c \
+ rename.c resource.c sched.c select.c seteuid.c shm_open.c \
+ shm_unlink.c signal.c siglongjmp.c socket.c sleep.c stack.c \
sysconf.c sysctl.c systat.c system.c tcdrain.c termios.c time.c \
usleep.c wait.c
diff --git a/newlib/libc/sys/linux/Makefile.in b/newlib/libc/sys/linux/Makefile.in
index a3c71c8b2..7958a0152 100644
--- a/newlib/libc/sys/linux/Makefile.in
+++ b/newlib/libc/sys/linux/Makefile.in
@@ -104,8 +104,8 @@ LIB_SOURCES = \
brk.c flockfile.c funlockfile.c gethostname.c getoptlong.c getreent.c ids.c \
inode.c io.c io64.c linux.c mmap.c \
pread.c pread64.c process.c pwrite.c pwrite64.c raise.c realpath.c \
- resource.c sched.c select.c shm_open.c shm_unlink.c seteuid.c signal.c \
- siglongjmp.c socket.c sleep.c stack.c \
+ rename.c resource.c sched.c select.c seteuid.c shm_open.c \
+ shm_unlink.c signal.c siglongjmp.c socket.c sleep.c stack.c \
sysconf.c sysctl.c systat.c system.c tcdrain.c termios.c time.c \
usleep.c wait.c
@@ -141,10 +141,10 @@ LIBS = @LIBS@
@USE_LIBTOOL_FALSE@gethostname.o getoptlong.o getreent.o ids.o inode.o \
@USE_LIBTOOL_FALSE@io.o io64.o linux.o mmap.o pread.o pread64.o \
@USE_LIBTOOL_FALSE@process.o pwrite.o pwrite64.o raise.o realpath.o \
-@USE_LIBTOOL_FALSE@resource.o sched.o select.o shm_open.o shm_unlink.o \
-@USE_LIBTOOL_FALSE@seteuid.o signal.o siglongjmp.o socket.o sleep.o \
-@USE_LIBTOOL_FALSE@stack.o sysconf.o sysctl.o systat.o system.o \
-@USE_LIBTOOL_FALSE@tcdrain.o termios.o time.o usleep.o wait.o
+@USE_LIBTOOL_FALSE@rename.o resource.o sched.o select.o seteuid.o \
+@USE_LIBTOOL_FALSE@shm_open.o shm_unlink.o signal.o siglongjmp.o \
+@USE_LIBTOOL_FALSE@socket.o sleep.o stack.o sysconf.o sysctl.o systat.o \
+@USE_LIBTOOL_FALSE@system.o tcdrain.o termios.o time.o usleep.o wait.o
LTLIBRARIES = $(noinst_LTLIBRARIES)
@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES =
@@ -152,11 +152,12 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
@USE_LIBTOOL_TRUE@funlockfile.lo gethostname.lo getoptlong.lo \
@USE_LIBTOOL_TRUE@getreent.lo ids.lo inode.lo io.lo io64.lo linux.lo \
@USE_LIBTOOL_TRUE@mmap.lo pread.lo pread64.lo process.lo pwrite.lo \
-@USE_LIBTOOL_TRUE@pwrite64.lo raise.lo realpath.lo resource.lo sched.lo \
-@USE_LIBTOOL_TRUE@select.lo shm_open.lo shm_unlink.lo seteuid.lo \
-@USE_LIBTOOL_TRUE@signal.lo siglongjmp.lo socket.lo sleep.lo stack.lo \
-@USE_LIBTOOL_TRUE@sysconf.lo sysctl.lo systat.lo system.lo tcdrain.lo \
-@USE_LIBTOOL_TRUE@termios.lo time.lo usleep.lo wait.lo
+@USE_LIBTOOL_TRUE@pwrite64.lo raise.lo realpath.lo rename.lo \
+@USE_LIBTOOL_TRUE@resource.lo sched.lo select.lo seteuid.lo shm_open.lo \
+@USE_LIBTOOL_TRUE@shm_unlink.lo signal.lo siglongjmp.lo socket.lo \
+@USE_LIBTOOL_TRUE@sleep.lo stack.lo sysconf.lo sysctl.lo systat.lo \
+@USE_LIBTOOL_TRUE@system.lo tcdrain.lo termios.lo time.lo usleep.lo \
+@USE_LIBTOOL_TRUE@wait.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
diff --git a/newlib/libc/sys/linux/rename.c b/newlib/libc/sys/linux/rename.c
new file mode 100644
index 000000000..d6bf4598e
--- /dev/null
+++ b/newlib/libc/sys/linux/rename.c
@@ -0,0 +1,9 @@
+/* libc/sys/linux/rename.c - rename a file */
+
+/* Copyright 2002, Red Hat Inc. */
+
+#include <stdio.h>
+#include <machine/syscall.h>
+
+_syscall2(int,rename,const char *,old,const char *,new)
+