SOCKS 4.2.2 をコンパイルしてみました。 コンパイルは以下の環境で行いました。 NWS-5000TF NEWS-OS Release 6.1.2 NEWS-C Release 1.010 GNU make 3.76 hiraga@meis.sony.co.jp diff -urP socks.cstc.4.2.2/Makefile socks.cstc.4.2.2-newsos6/Makefile --- socks.cstc.4.2.2/Makefile Wed Aug 30 08:01:15 1995 +++ socks.cstc.4.2.2-newsos6/Makefile Wed Oct 15 16:37:03 1997 @@ -19,7 +19,7 @@ # It should be this current directory. # If your system has getcwd() but no getwd(), uncomment the next line: -#GETCWD=-DGETCWD +GETCWD=-DGETCWD #If your system doesn't have waitpid(), uncomment the nextline: #NO_WAITPID=-DNO_WAITPID @@ -28,7 +28,7 @@ # connection to the ftp server for the data channel first. If # that fails, it will then use the usually method of letting # the ftp server make the connection. -TRY_PASV=-DTRY_PASV +#TRY_PASV=-DTRY_PASV # # Normally for ftp (rftp) to work, you have allow incoming connections # to your SOCKS server host (at least those coming from port 20). If @@ -51,8 +51,8 @@ #FOR_PS=-DFOR_PS # optimization flag for cc -OPTIMIZE=-g -#OPTIMIZE=-O +#OPTIMIZE=-g +OPTIMIZE=-O # Be careful with the OPTIMIZE flag. SunPro's SC2.0.1, for example, is # knwon to produce incorrect code when -O is used. @@ -73,10 +73,10 @@ #BIND_RESOLVER=-DBIND_RESOLVER # Directory into which to install the man pages -MAN_DEST_DIR = /usr/local/man +MAN_DEST_DIR = /usr/local/man/C # Directory into which the SOCKS server should be installed -SERVER_BIN_DIR = /usr/etc +SERVER_BIN_DIR = /usr/local/sbin # Directory into the client programs should be installed CLIENTS_BIN_DIR = /usr/local/bin @@ -103,13 +103,13 @@ #GETPASS=getpass.o # IRIX 5 should use -CC=cc -RESOLV_LIB=-lsun -OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS $(TRY_PASV) -RANLIB=/bin/true -OS=irix5 -INSTALL=bsdinstall -GETPASS=getpass.o +#CC=cc +#RESOLV_LIB=-lsun +#OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS $(TRY_PASV) +#RANLIB=/bin/true +#OS=irix5 +#INSTALL=bsdinstall +#GETPASS=getpass.o # Ultrix 4.0 should use #CC=cc @@ -164,6 +164,16 @@ #INSTALL=install #GETPASS=getpass.o +# NEWS-OS 6.x should use +CC=cc +RESOLV_LIB=-lresolv -lsocket -lnsl +#RESOLV_LIB=-lsocket -lnsl -lresolv +OTHER_CFLAGS=-DSOLARIS $(SHORTENED_RBIND) -DUSE_DIRENT $(GETCWD) $(FASCIST) -DCOMPAT $(TRY_PASV) +RANLIB=/bin/true +OS=newsos6 +INSTALL=/usr/ucb/install +GETPASS=getpass.o + # Interactive Systems Unix should use #OTHER_CFLAGS = -DISC -DSVR3 -Dindex=strchr -Drindex=strrchr -D_XOPEN_SOURCE -DGETCWD $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT $(TRY_PASV) #CC=cc @@ -335,7 +345,7 @@ # <<<---------------- # The Internet Whois server; used to be nic.ddn.mil. -WHOIS_SERVER= WHOIS_SERVER=-DWHOIS_SERVER\'=\"rs.internic.net\"\' +WHOIS_SERVER= WHOIS_SERVER=-DWHOIS_SERVER\'=\"whois.nic.ad.jp\"\' SOCKS_LIB=$(PWD)/lib/libsocks.a IDENT_LIB=$(PWD)/libident/libident.a diff -urP socks.cstc.4.2.2/include/socks.h socks.cstc.4.2.2-newsos6/include/socks.h --- socks.cstc.4.2.2/include/socks.h Wed Aug 30 08:01:50 1995 +++ socks.cstc.4.2.2-newsos6/include/socks.h Wed Oct 15 17:34:33 1997 @@ -6,7 +6,7 @@ * This is overridden at run time by the contents of environment * variable SOCKS_SERVER if it exists. */ -#define SOCKS_DEFAULT_SERVER "SOCKS.server.for.your.site" +#define SOCKS_DEFAULT_SERVER "43.22.253.1" /* * Default Domain Nameserver for the SOCKS clients. @@ -19,7 +19,7 @@ * This is overriden at run time by the contents of environment * variable SOCKS_NS if it exists. */ -/* #define SOCKS_DEFAULT_NS "1.2.3.4" */ +#define SOCKS_DEFAULT_NS "43.22.253.1" /* >>> jon r. luini */ /* @@ -33,7 +33,7 @@ * This is overriden at run time by the contents of environment * variable SOCKS_DNAME if it exists. */ -/* #define SOCKS_DEFAULT_DNAME "hal.COM" */ +#define SOCKS_DEFAULT_DNAME "Sony.CO.JP" /* <<< jon r. luini */ /* @@ -45,7 +45,7 @@ * whether the hosts you try to connect is inside or outside the * firewall. */ -#define VERSATILE_CLIENTS +/* #define VERSATILE_CLIENTS */ /* * Full pathname of the regular 'finger' program. @@ -54,7 +54,7 @@ * to /usr/ucb/finger.orig and the pathname you should use here is the * new (altered) pathname, i.e., /usr/ucb/finger.orig. */ -#define ORIG_FINGER "/usr/ucb/finger.orig" +#define ORIG_FINGER "/usr/bin/finger" /* Overridden at runtime by environment variable ORIG_FINGER if it exists. */ /* Control file for versatile clients */ @@ -93,7 +93,7 @@ * as a router (i.e., has its IP forwarding turned off). * Leave it undefined otherwise. */ -/* #define MULTIHOMED_SERVER */ +#define MULTIHOMED_SERVER /* * For multi-homed servers, you must supply the file /etc/sockd.route diff -urP socks.cstc.4.2.2/lib/SendGetDst.c socks.cstc.4.2.2-newsos6/lib/SendGetDst.c --- socks.cstc.4.2.2/lib/SendGetDst.c Thu Aug 17 09:17:52 1995 +++ socks.cstc.4.2.2-newsos6/lib/SendGetDst.c Mon Oct 13 14:21:55 1997 @@ -11,7 +11,10 @@ #include "socks.h" extern int errno; +#ifdef NULL +#undef NULL #define NULL ((char *)0) +#endif int socks_SendDst(s, dst) int s; diff -urP socks.cstc.4.2.2/rftp/ftp.c socks.cstc.4.2.2-newsos6/rftp/ftp.c --- socks.cstc.4.2.2/rftp/ftp.c Wed Aug 30 08:03:57 1995 +++ socks.cstc.4.2.2-newsos6/rftp/ftp.c Mon Oct 13 13:54:03 1997 @@ -664,7 +664,11 @@ dout = dataconn(lmode); if (dout == NULL) goto abort; +#ifdef __sony_news + (void) gettimeofday(&start); +#else (void) gettimeofday(&start, (struct timezone *)0); +#endif oldintp = signal(SIGPIPE, SIG_IGN); switch (curtype) { @@ -736,7 +740,11 @@ } break; } - (void) gettimeofday(&stop, (struct timezone *)0); +#ifdef __sony_news + (void) gettimeofday(&start); +#else + (void) gettimeofday(&start, (struct timezone *)0); +#endif if (closefunc != NULL) (*closefunc)(fin); (void) fclose(dout); @@ -752,7 +760,11 @@ } return; abort: - (void) gettimeofday(&stop, (struct timezone *)0); +#ifdef __sony_news + (void) gettimeofday(&start); +#else + (void) gettimeofday(&start, (struct timezone *)0); +#endif (void) signal(SIGINT, oldintr); if (oldintp) (void) signal(SIGPIPE, oldintp); @@ -957,7 +969,11 @@ bufsize = st.st_blksize; #endif } - (void) gettimeofday(&start, (struct timezone *)0); +#ifdef __sony_news + (void) gettimeofday(&start); +#else + (void) gettimeofday(&start, (struct timezone *)0); +#endif switch (curtype) { case TYPE_I: @@ -1089,7 +1105,11 @@ (void) signal(SIGINT, oldintr); if (oldintp) (void) signal(SIGPIPE, oldintp); - (void) gettimeofday(&stop, (struct timezone *)0); +#ifdef __sony_news + (void) gettimeofday(&start); +#else + (void) gettimeofday(&start, (struct timezone *)0); +#endif (void) fclose(din); (void) getreply(0); if (bytes > 0 && is_retr) { @@ -1103,7 +1123,11 @@ /* abort using RFC959 recommended IP,SYNC sequence */ - (void) gettimeofday(&stop, (struct timezone *)0); +#ifdef __sony_news + (void) gettimeofday(&start); +#else + (void) gettimeofday(&start, (struct timezone *)0); +#endif if (oldintp) (void) signal(SIGPIPE, oldintr); (void) signal(SIGINT, SIG_IGN); diff -urP socks.cstc.4.2.2/rftp/glob.c socks.cstc.4.2.2-newsos6/rftp/glob.c --- socks.cstc.4.2.2/rftp/glob.c Sat Aug 19 02:47:14 1995 +++ socks.cstc.4.2.2-newsos6/rftp/glob.c Mon Oct 13 17:28:33 1997 @@ -42,6 +42,19 @@ #undef COMPAT #endif +#ifdef __sony_news +#include +#ifndef NCARGS +#ifdef _POSIX_ARG_MAX +#define NCARGS _POSIX_ARG_MAX +#else +#ifdef ARG_MAX +#define NCARGS ARG_MAX +#endif +#endif +#endif +#endif + #include #include /* diff -urP socks.cstc.4.2.2/rtelnet/Config.local socks.cstc.4.2.2-newsos6/rtelnet/Config.local --- socks.cstc.4.2.2/rtelnet/Config.local Thu Aug 17 08:34:48 1995 +++ socks.cstc.4.2.2-newsos6/rtelnet/Config.local Mon Oct 13 18:41:48 1997 @@ -217,6 +217,7 @@ @echo " bsdi" @echo " isc" @echo " newsos4" + @echo " newsos6" 4.4bsd 4.3reno: ${MAKE} -f Makefile.generic ${WHAT} \ @@ -674,6 +675,26 @@ CC="${CC}" LCCFLAGS="-g" # >>> curnutt@Stoner.COM (A. Bryan Curnutt) + +# <<< +newsos6: + ${MAKE} -f Makefile.generic ${WHAT} \ + LIBS="${SOCKS_LIB} -L../libtelnet -ltelnet ${RESOLV_LIB} -ltermlib" \ + LIBPATH="/usr/ccs/lib/libc.a \ + ../libtelnet/libtelnet.a" \ + DEST=${DESTDIR}/usr/ucb \ + DEFINES="-DKLUDGELINEMODE -DSVR4 -DSYSV -DSYSV_TERMIO \ + -DSOLARIS -DSTREAMS -DLINEMODE -DFILIO_H \ + $(SOCKS) " \ + INCLUDES="-I.. -I../../include" \ + LIB_OBJ="herror.o setenv.o getent.o" \ + LIB_SRC="herror.c setenv.c getent.c" \ + AR=ar ARFLAGS=cq RANLIB=NONE \ + LIBEXEC=${DESTDIR}/usr/sbin/in.telnetd \ + CC="${CC}" LCCFLAGS="-O" + +# >>> + netbsd0.9: make -f Makefile.generic ${WHAT} \ LIBS="${SOCKS_LIB} -lutil -ltermcap ../libtelnet/libtelnet.a $(RESOLV_LIB)" \