[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] libsocket removal patch



Here's the patch which integrates libsocket into libc.

Alan.
diff --git a/buildrules b/buildrules
index 8a1fb6b..84a08a5 100644
--- a/buildrules
+++ b/buildrules
@@ -18,10 +18,9 @@ endif
 
 libc := libc$(qualifier).a
 libiio := libiio$(qualifier).a
-libsocket := libsocket$(qualifier).a
 librpcsvc := librpcsvc$(qualifier).a
 
-LIBS := $(libc) $(libiio) $(libsocket) $(librpcsvc)
+LIBS := $(libc) $(libiio) $(librpcsvc)
 
 ifeq ($(USE_WEAK_SYMBOLS), yes)
 ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
@@ -156,7 +155,7 @@ OBJS := $(CRYPTOBJS) $(DIRENTOBJS) $(GMPOBJS) $(LOGINOBJS) $(MINTLIBOBJS) \
 LIBCOBJS := $(CRYPTOBJS) $(DIRENTOBJS) $(GMPOBJS) $(LOGINOBJS) $(MINTLIBOBJS) \
   $(MISCOBJS) $(POSIXOBJS) $(PWDGRPOBJS) $(SHADOWOBJS) $(SIGNALOBJS) \
   $(STDIOOBJS) $(STDLIBOBJS) $(STRINGOBJS) $(SYSCALLOBJS) $(SYSVIPCOBJS) \
-  $(TERMIOSOBJS) $(TIMEOBJS) $(UNIXOBJS)
+  $(TERMIOSOBJS) $(TIMEOBJS) $(UNIXOBJS) $(SUNRPCOBJS) $(SOCKETOBJS)
 
 # All modules that reference vfprintf or vfscanf should be listed here.
 LIBIIO_ADDOBJS = err.o error.o doprnt.o dprintf.o fscanf.o scanf.o vscanf.o \
@@ -258,11 +257,6 @@ $(libiio): $(STDIIOOBJS) $(LIBIIO_ADDOBJS)
 	$(AR) cru $@ $(STDIIOOBJS) $(LIBIIO_ADDOBJS)
 	$(RANLIB) $@
 
-$(libsocket): $(SOCKETOBJS) $(SUNRPCOBJS)
-	rm -f $@
-	$(AR) cru $@ $(SOCKETOBJS) $(SUNRPCOBJS)
-	$(RANLIB) $@
-
 $(librpcsvc): $(RPCSVCOBJS)
 	rm -f $@
 	$(AR) cru $@ $(RPCSVCOBJS)
diff --git a/checkrules b/checkrules
index d012ea5..6818f1d 100644
--- a/checkrules
+++ b/checkrules
@@ -18,8 +18,7 @@ type=
 cflags=
 
 CRT0 = $(top_srcdir)/startup/crt0.o
-libs = $(libs-$(@F)) $(top_srcdir)/lib$(type)/libsocket.a \
-$(top_srcdir)/lib$(type)/libc.a
+libs = $(libs-$(@F)) $(top_srcdir)/lib$(type)/libc.a
 LIBS = -lgcc $(LIBS-$(@F)) $(libs) -lgcc
 
 TESTPRGS = $(addprefix test-, $(TESTS))
diff --git a/lib/BINFILES b/lib/BINFILES
index 16ce09b..7d07490 100644
--- a/lib/BINFILES
+++ b/lib/BINFILES
@@ -1,4 +1,4 @@
 # This file gets included by the Makefile in this directory to determine
 # the files that should go only into binary distributions.
 
-BINFILES = libc.a libiio.a libsocket.a
+BINFILES = libc.a libiio.a
diff --git a/lib020/BINFILES b/lib020/BINFILES
index 16ce09b..7d07490 100644
--- a/lib020/BINFILES
+++ b/lib020/BINFILES
@@ -1,4 +1,4 @@
 # This file gets included by the Makefile in this directory to determine
 # the files that should go only into binary distributions.
 
-BINFILES = libc.a libiio.a libsocket.a
+BINFILES = libc.a libiio.a
diff --git a/lib_g/BINFILES b/lib_g/BINFILES
index bbed091..b03bc34 100644
--- a/lib_g/BINFILES
+++ b/lib_g/BINFILES
@@ -1,4 +1,4 @@
 # This file gets included by the Makefile in this directory to determine
 # the files that should go only into binary distributions.
 
-BINFILES = libc_g.a libiio_g.a libsocket_g.a
+BINFILES = libc_g.a libiio_g.a
diff --git a/lib_p/BINFILES b/lib_p/BINFILES
index 8ff14db..52dded9 100644
--- a/lib_p/BINFILES
+++ b/lib_p/BINFILES
@@ -1,4 +1,4 @@
 # This file gets included by the Makefile in this directory to determine
 # the files that should go only into binary distributions.
 
-BINFILES = libc_p.a libiio_p.a libsocket_p.a
+BINFILES = libc_p.a libiio_p.a
diff --git a/mintlib.spec b/mintlib.spec
index 1bc5814..e959c8b 100644
--- a/mintlib.spec
+++ b/mintlib.spec
@@ -571,29 +571,24 @@ ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
 %{_prefix}%{crossprefix}/lib/libc.a
 %{_prefix}%{crossprefix}/lib/libiio.a
 %{_prefix}%{crossprefix}/lib/librpcsvc.a
-%{_prefix}%{crossprefix}/lib/libsocket.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libc.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libc020.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libiio.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libiio020.a
 %{_prefix}%{crossprefix}/lib/m68020-60/librpcsvc.a
 %{_prefix}%{crossprefix}/lib/m68020-60/librpcsvc020.a
-%{_prefix}%{crossprefix}/lib/m68020-60/libsocket.a
-%{_prefix}%{crossprefix}/lib/m68020-60/libsocket020.a
 
 %files debug
 %defattr(-,root,root)
 %{_prefix}%{crossprefix}/lib/libc_g.a
 %{_prefix}%{crossprefix}/lib/libiio_g.a
 %{_prefix}%{crossprefix}/lib/librpcsvc_g.a
-%{_prefix}%{crossprefix}/lib/libsocket_g.a
 
 %files profile
 %defattr(-,root,root)
 %{_prefix}%{crossprefix}/lib/libc_p.a
 %{_prefix}%{crossprefix}/lib/libiio_p.a
 %{_prefix}%{crossprefix}/lib/librpcsvc_p.a
-%{_prefix}%{crossprefix}/lib/libsocket_p.a
 
 
 %changelog
diff --git a/mintlib.spec.in b/mintlib.spec.in
index ed418dd..f19c399 100644
--- a/mintlib.spec.in
+++ b/mintlib.spec.in
@@ -571,29 +571,24 @@ ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
 %{_prefix}%{crossprefix}/lib/libc.a
 %{_prefix}%{crossprefix}/lib/libiio.a
 %{_prefix}%{crossprefix}/lib/librpcsvc.a
-%{_prefix}%{crossprefix}/lib/libsocket.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libc.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libc020.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libiio.a
 %{_prefix}%{crossprefix}/lib/m68020-60/libiio020.a
 %{_prefix}%{crossprefix}/lib/m68020-60/librpcsvc.a
 %{_prefix}%{crossprefix}/lib/m68020-60/librpcsvc020.a
-%{_prefix}%{crossprefix}/lib/m68020-60/libsocket.a
-%{_prefix}%{crossprefix}/lib/m68020-60/libsocket020.a
 
 %files debug
 %defattr(-,root,root)
 %{_prefix}%{crossprefix}/lib/libc_g.a
 %{_prefix}%{crossprefix}/lib/libiio_g.a
 %{_prefix}%{crossprefix}/lib/librpcsvc_g.a
-%{_prefix}%{crossprefix}/lib/libsocket_g.a
 
 %files profile
 %defattr(-,root,root)
 %{_prefix}%{crossprefix}/lib/libc_p.a
 %{_prefix}%{crossprefix}/lib/libiio_p.a
 %{_prefix}%{crossprefix}/lib/librpcsvc_p.a
-%{_prefix}%{crossprefix}/lib/libsocket_p.a
 
 
 %changelog
diff --git a/socket/README b/socket/README
index 675e4a5..e520457 100644
--- a/socket/README
+++ b/socket/README
@@ -3,3 +3,4 @@ for MiNT.  It is based on the libsocket that was formerly included in
 the MiNTNet package, which was originally written by Kay Roemer and then
 later enhanced by Torsten Lang.
 
+This is now included in libc and libsocket is deprecated.