sock-1.1 patch

Gerrit P. Haase gerrit.haase@t-online.de
Wed Jun 13 07:46:00 GMT 2001


Hi, 

i build sock-1.1 on cygwin-1.3.2:
http://freshmeat.net/projects/sock/

I don't know if it is working correct.
How to test?

Build:
======
$ configure
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc  -s) works... yes
checking whether the C compiler (gcc  -s) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether warnings should be enabled... yes
checking for a BSD compatible install... /bin/install -c
checking for gethostbyname in -lresolv... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for pid_t... yes
checking return type of signal handlers... void
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h

$ make
gcc -Wall -W -Wno-parentheses -Wstrict-prototypes -Wno-unused  -s   sock.c   -o sock
sock.c: In function `parse_addr':
sock.c:148: warning: assignment discards qualifiers from pointer target type
sock.c: In function `name_addr':
sock.c:204: warning: return discards qualifiers from pointer target type

$ make install
/bin/install -c sock.exe /usr/local/bin/sock.exe
/bin/install -c -m 644 sock.1 /usr/local/man/man1/sock.1
mkdir -p /usr/doc
/bin/install -c README ChangeLog sock.lsm /usr/doc

Patch for Cygwin:
=================
diff -urw sock-1.1/Makefile.in sock-1.1-cygwin/Makefile.in
--- sock-1.1/Makefile.in	Tue Jun 12 12:11:25 2001
+++ sock-1.1-cygwin/Makefile.in	Wed Jun 13 10:35:41 2001
@@ -11,18 +11,23 @@
 INSTALL=@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@
 INSTALL_DATA=@INSTALL_DATA@
+# Cygwin needs EXEEXT
+EXEEXT=.exe
+DOCDIR=/usr/doc
+#
 
 all: sock
 
 sock: sock.c
 
 install:
-	$(INSTALL_PROGRAM) sock $(bindir)/sock
+	$(INSTALL_PROGRAM) sock$(EXEEXT) $(bindir)/sock$(EXEEXT)
 	$(INSTALL_DATA) sock.1 $(mandir)/man1/sock.1
-
+	mkdir -p $(DOCDIR)
+	$(INSTALL) README ChangeLog sock.lsm $(DOCDIR)
 clean:
 	rm -f `find . -name "*~" -o -name "*.[oa]" -o -name "\#*\#" -o -name TAGS -o -name core`
-	rm -f sock
+	rm -f sock$(EXEEXT)
 
 distclean: clean
 	rm -f Makefile config.h config.cache config.log config.status
diff -urw sock-1.1/sock.c sock-1.1-cygwin/sock.c
--- sock-1.1/sock.c	Tue Jun 12 12:10:29 2001
+++ sock-1.1-cygwin/sock.c	Wed Jun 13 10:18:39 2001
@@ -26,6 +26,10 @@
 #include <sys/wait.h>
 #include <sys/time.h>
 
+#ifdef __CYGWIN__
+#include <getopt.h>
+#endif /* __CYWIN__ */
+
 #define SOCK_VERSION "1.1"
 
 static char *opts = "vtuxb:lden";

========================END

gph

-- 
Gerrit P. Haase

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list