From: Jeff Johnston Date: Tue, 25 Jun 2002 18:05:31 +0000 (+0000) Subject: 2002-06-25 Jeff Johnston X-Git-Tag: pre-no-this~459 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=ffddf61ea772beefa754a19c819564152c979579;p=newlib-cygwin.git 2002-06-25 Jeff Johnston * libc/sys/linux/sethostname.c: New file. * libc/sys/linux/Makefile.am: Add sethostname.c support. * libc/sys/linux/Makefile.in: Regenerated. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a52a0a979..da16f95b2 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2002-06-25 Jeff Johnston + + * libc/sys/linux/sethostname.c: New file. + * libc/sys/linux/Makefile.am: Add sethostname.c support. + * libc/sys/linux/Makefile.in: Regenerated. + 2002-06-24 Thomas Fitzsimmons * libc/search/db_local.h: New file. 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 +#include + +_syscall2(int,sethostname,const char *,name,size_t,len);