This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Split ttyname.c to avoid unnecessary dependencies


Sebastian Huber wrote:
Howland Craig D (Craig) wrote:
Here is a patch that does what Sebastian requested.  I did not include
the regenerated Makefile.in, leaving it to Jeff to do that if it makes
the cut to be put in.  (I did note the regeneration in the ChangeLog.)

Thank you very much. I would have provided a patch, but I am struggling with the newlib build and --enable-maintainer-mode.

Please find enclosed the missing piece ;)


Ralf
diff -Naur newlib-1.17.0.orig/newlib/libc/unix/Makefile.in newlib-1.17.0/newlib/libc/unix/Makefile.in
--- newlib-1.17.0.orig/newlib/libc/unix/Makefile.in	2008-09-29 17:40:47.000000000 +0200
+++ newlib-1.17.0/newlib/libc/unix/Makefile.in	2009-02-20 10:22:54.000000000 +0100
@@ -59,7 +59,7 @@
 lib_a_LIBADD =
 am__objects_1 = lib_a-getcwd.$(OBJEXT) lib_a-pread.$(OBJEXT) \
 	lib_a-pwrite.$(OBJEXT) lib_a-sigset.$(OBJEXT)
-am__objects_2 = lib_a-ttyname.$(OBJEXT)
+am__objects_2 = lib_a-ttyname.$(OBJEXT) lib_a-ttyname_r.$(OBJEXT)
 am__objects_3 = lib_a-basename.$(OBJEXT) lib_a-dirname.$(OBJEXT) \
 	lib_a-getlogin.$(OBJEXT) lib_a-getpass.$(OBJEXT) \
 	lib_a-getpwent.$(OBJEXT) lib_a-getut.$(OBJEXT)
@@ -74,7 +74,7 @@
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libunix_la_LIBADD =
 am__objects_5 = getcwd.lo pread.lo pwrite.lo sigset.lo
-am__objects_6 = ttyname.lo
+am__objects_6 = ttyname.lo ttyname_r.lo
 am__objects_7 = basename.lo dirname.lo getlogin.lo getpass.lo \
 	getpwent.lo getut.lo
 @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_8 = $(am__objects_6) \
@@ -278,7 +278,8 @@
 	sigset.c
 
 ELIX_2_SOURCES = \
-	ttyname.c
+	ttyname.c \
+	ttyname_r.c
 
 ELIX_4_SOURCES = \
 	basename.c	\
@@ -402,6 +403,12 @@
 lib_a-ttyname.obj: ttyname.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ttyname.obj `if test -f 'ttyname.c'; then $(CYGPATH_W) 'ttyname.c'; else $(CYGPATH_W) '$(srcdir)/ttyname.c'; fi`
 
+lib_a-ttyname_r.o: ttyname_r.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ttyname_r.o `test -f 'ttyname_r.c' || echo '$(srcdir)/'`ttyname_r.c
+
+lib_a-ttyname_r.obj: ttyname_r.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ttyname_r.obj `if test -f 'ttyname_r.c'; then $(CYGPATH_W) 'ttyname_r.c'; else $(CYGPATH_W) '$(srcdir)/ttyname_r.c'; fi`
+
 lib_a-basename.o: basename.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-basename.o `test -f 'basename.c' || echo '$(srcdir)/'`basename.c
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]