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-06-25 22:05:31 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-06-25 22:05:31 +0400
commitffddf61ea772beefa754a19c819564152c979579 (patch)
tree63546067988532d383c1f3dc909eb3f7a777be30 /newlib/libc/sys/linux
parent6331b65843ca7cd30d47d0cc16f63f84257e2466 (diff)
2002-06-25 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/sethostname.c: New file. * libc/sys/linux/Makefile.am: Add sethostname.c support. * libc/sys/linux/Makefile.in: Regenerated.
Diffstat (limited to 'newlib/libc/sys/linux')
-rw-r--r--newlib/libc/sys/linux/Makefile.am12
-rw-r--r--newlib/libc/sys/linux/Makefile.in30
-rw-r--r--newlib/libc/sys/linux/sethostname.c8
3 files changed, 33 insertions, 17 deletions
diff --git a/newlib/libc/sys/linux/Makefile.am b/newlib/libc/sys/linux/Makefile.am
index 78cdd399e..9946e61ed 100644
--- a/newlib/libc/sys/linux/Makefile.am
+++ b/newlib/libc/sys/linux/Makefile.am
@@ -49,6 +49,7 @@ LIB_SOURCES = \
sched.c \
select.c \
seteuid.c \
+ sethostname.c \
shm_open.c \
shm_unlink.c \
sig.c \
@@ -79,19 +80,22 @@ SIGNAL_H = /usr/src/$(shell ls /usr/src/ | grep ^linux | head -n 1)/include/asm/
liblinux_la_LDFLAGS = -Xcompiler -nostdlib
+add_objs =
+
if USE_LIBTOOL
noinst_LTLIBRARIES = liblinux.la
liblinux_la_SOURCES = $(LIB_SOURCES)
-liblinux_la_LIBADD = $(LINUX_MACH_LIB)
+liblinux_la_LIBADD = $(LINUX_MACH_LIB) $(add_objs)
+liblinux_la_DEPENDENCIES = $(LINUX_MACH_LIB) $(add_objs)
noinst_DATA = objectlist.awk.in
else
noinst_LIBRARIES = lib.a
lib_a_SOURCES = $(LIB_SOURCES)
-lib_a_LIBADD = $(LINUX_MACH_LIB)
-lib_a_DEPENDENCIES = $(LINUX_MACH_LIB)
+lib_a_LIBADD = $(LINUX_MACH_LIB) $(add_objs)
+lib_a_DEPENDENCIES = $(LINUX_MACH_LIB) $(add_objs)
noinst_DATA =
-lib.a: $(LINUX_MACH_LIB) $(lib_a_OBJECTS)
+lib.a: $(LINUX_MACH_LIB) $(lib_a_OBJECTS) $(add_objs)
rm -f $@
rm -rf tmp
mkdir tmp
diff --git a/newlib/libc/sys/linux/Makefile.in b/newlib/libc/sys/linux/Makefile.in
index 68a483b71..43bec6eaa 100644
--- a/newlib/libc/sys/linux/Makefile.in
+++ b/newlib/libc/sys/linux/Makefile.in
@@ -146,6 +146,7 @@ LIB_SOURCES = \
sched.c \
select.c \
seteuid.c \
+ sethostname.c \
shm_open.c \
shm_unlink.c \
sig.c \
@@ -177,15 +178,18 @@ SIGNAL_H = /usr/src/$(shell ls /usr/src/ | grep ^linux | head -n 1)/include/asm/
liblinux_la_LDFLAGS = -Xcompiler -nostdlib
+add_objs =
+
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = @USE_LIBTOOL_TRUE@liblinux.la
@USE_LIBTOOL_TRUE@liblinux_la_SOURCES = @USE_LIBTOOL_TRUE@$(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@liblinux_la_LIBADD = @USE_LIBTOOL_TRUE@$(LINUX_MACH_LIB)
+@USE_LIBTOOL_TRUE@liblinux_la_LIBADD = @USE_LIBTOOL_TRUE@$(LINUX_MACH_LIB) $(add_objs)
+@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES = @USE_LIBTOOL_TRUE@$(LINUX_MACH_LIB) $(add_objs)
@USE_LIBTOOL_TRUE@noinst_DATA = @USE_LIBTOOL_TRUE@objectlist.awk.in
@USE_LIBTOOL_FALSE@noinst_DATA =
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = @USE_LIBTOOL_FALSE@lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = @USE_LIBTOOL_FALSE@$(LIB_SOURCES)
-@USE_LIBTOOL_FALSE@lib_a_LIBADD = @USE_LIBTOOL_FALSE@$(LINUX_MACH_LIB)
-@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = @USE_LIBTOOL_FALSE@$(LINUX_MACH_LIB)
+@USE_LIBTOOL_FALSE@lib_a_LIBADD = @USE_LIBTOOL_FALSE@$(LINUX_MACH_LIB) $(add_objs)
+@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = @USE_LIBTOOL_FALSE@$(LINUX_MACH_LIB) $(add_objs)
AM_CFLAGS = -I $(srcdir)/../../stdio
ACLOCAL_AMFLAGS = -I ../../..
@@ -216,9 +220,9 @@ LIBS = @LIBS@
@USE_LIBTOOL_FALSE@pwrite64.$(OBJEXT) raise.$(OBJEXT) \
@USE_LIBTOOL_FALSE@realpath.$(OBJEXT) rename.$(OBJEXT) \
@USE_LIBTOOL_FALSE@resource.$(OBJEXT) sched.$(OBJEXT) select.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@seteuid.$(OBJEXT) shm_open.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@shm_unlink.$(OBJEXT) sig.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sigaction.$(OBJEXT) sigqueue.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@seteuid.$(OBJEXT) sethostname.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@shm_open.$(OBJEXT) shm_unlink.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@sig.$(OBJEXT) sigaction.$(OBJEXT) sigqueue.$(OBJEXT) \
@USE_LIBTOOL_FALSE@signal.$(OBJEXT) siglongjmp.$(OBJEXT) \
@USE_LIBTOOL_FALSE@sigset.$(OBJEXT) sigwait.$(OBJEXT) socket.$(OBJEXT) \
@USE_LIBTOOL_FALSE@sleep.$(OBJEXT) stack.$(OBJEXT) strsignal.$(OBJEXT) \
@@ -228,7 +232,6 @@ LIBS = @LIBS@
@USE_LIBTOOL_FALSE@usleep.$(OBJEXT) wait.$(OBJEXT)
LTLIBRARIES = $(noinst_LTLIBRARIES)
-@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES =
@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = brk.lo cfspeed.lo flockfile.lo \
@USE_LIBTOOL_TRUE@ftok.lo funlockfile.lo getdate.lo getdate_err.lo \
@USE_LIBTOOL_TRUE@gethostname.lo getoptlong.lo getreent.lo ids.lo \
@@ -238,11 +241,12 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
@USE_LIBTOOL_TRUE@ntp_gettime.lo pread.lo pread64.lo process.lo \
@USE_LIBTOOL_TRUE@psignal.lo pwrite.lo pwrite64.lo raise.lo realpath.lo \
@USE_LIBTOOL_TRUE@rename.lo resource.lo sched.lo select.lo seteuid.lo \
-@USE_LIBTOOL_TRUE@shm_open.lo shm_unlink.lo sig.lo sigaction.lo \
-@USE_LIBTOOL_TRUE@sigqueue.lo signal.lo siglongjmp.lo sigset.lo \
-@USE_LIBTOOL_TRUE@sigwait.lo socket.lo sleep.lo stack.lo strsignal.lo \
-@USE_LIBTOOL_TRUE@sysconf.lo sysctl.lo systat.lo system.lo tcdrain.lo \
-@USE_LIBTOOL_TRUE@tcsendbrk.lo termios.lo time.lo usleep.lo wait.lo
+@USE_LIBTOOL_TRUE@sethostname.lo shm_open.lo shm_unlink.lo sig.lo \
+@USE_LIBTOOL_TRUE@sigaction.lo sigqueue.lo signal.lo siglongjmp.lo \
+@USE_LIBTOOL_TRUE@sigset.lo sigwait.lo socket.lo sleep.lo stack.lo \
+@USE_LIBTOOL_TRUE@strsignal.lo sysconf.lo sysctl.lo systat.lo system.lo \
+@USE_LIBTOOL_TRUE@tcdrain.lo tcsendbrk.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)
@@ -581,7 +585,7 @@ clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
-@USE_LIBTOOL_FALSE@lib.a: $(LINUX_MACH_LIB) $(lib_a_OBJECTS)
+@USE_LIBTOOL_FALSE@lib.a: $(LINUX_MACH_LIB) $(lib_a_OBJECTS) $(add_objs)
@USE_LIBTOOL_FALSE@ rm -f $@
@USE_LIBTOOL_FALSE@ rm -rf tmp
@USE_LIBTOOL_FALSE@ mkdir tmp
diff --git a/newlib/libc/sys/linux/sethostname.c b/newlib/libc/sys/linux/sethostname.c
new file mode 100644
index 000000000..669df3d74
--- /dev/null
+++ b/newlib/libc/sys/linux/sethostname.c
@@ -0,0 +1,8 @@
+/* libc/sys/linux/sethostname.c - Set host name */
+
+/* Copyright 2002, Red Hat Inc. */
+
+#include <unistd.h>
+#include <machine/syscall.h>
+
+_syscall2(int,sethostname,const char *,name,size_t,len);