Path: utzoo!utgpu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!wuarchive!udel!princeton!njin!paul.rutgers.edu!chain From: chain@paul.rutgers.edu (Chain Lee) Newsgroups: alt.sources Subject: X11R4 patch for SCO XENIX (part11) Message-ID: Date: 7 Jan 91 02:29:14 GMT Organization: Rutgers Univ., New Brunswick, N.J. Lines: 494 *** X11R4.ORIG/drivers/xenix/Makefile Sun Jan 6 12:36:31 1991 --- X11R4/drivers/xenix/Makefile Sun Jan 6 12:00:09 1991 *************** *** 0 **** --- 1,43 ---- + SHELL= /bin/sh + CC= cc + + LIBSOCK= Slibsocket.a + HDRSOCK= socket.h + UTILS= whoami exec_shell + SYSLIBDIR= /lib/386 + SYSINCDIR= /usr/include/sys + + ALL= $(LIBSOCK) + + all: $(ALL) whoami + + $(LIBSOCK): Slibsocket.uue + uudecode Slibsocket.uue + ranlib $@ + + install: all libinstall hdrinstall + + whoami: whoami.uue + uudecode whoami.uue + chmod a+x whoami + + libinstall: $(LIBSOCK) + @echo Installing $(LIBSOCK) + @if [ ! `./whoami` = root ]; \ + then \ + echo "Must be root to install"; exit 1; \ + else \ + cp $(LIBSOCK) $(SYSLIBDIR)/$(LIBSOCK); \ + fi + + hdrinstall: $(HDRSOCK) + @echo Installing $(HDRSOCK) + @if [ ! `./whoami` = root ]; \ + then \ + echo "Must be root to install"; exit 1; \ + else \ + cp $(HDRSOCK) $(SYSINCDIR)/$(HDRSOCK); \ + fi + + clean: + rm -f whoami *.a *~ *** X11R4.ORIG/drivers/xenix/INFO Sun Jan 6 12:36:34 1991 --- X11R4/drivers/xenix/INFO Sat Jan 5 18:39:26 1991 *************** *** 0 **** --- 1,69 ---- + + --- The Socket Emulator Driver Package --- + + 1. What's in it? + + The socket emulator device driver package includes a pseudo device + driver and a library that provide support for most of the system calls + associated with 4.2 BSD UNIX socket interface. It provides excellent + support for running X11R4 on SCO Xenix SysV 386 2.3.2 in the absense of + networking software such TCP/IP or STREAM. The package emulates socket + interface to the degree that hardly any changes is needed under 4.2bsd + directory. The changes I made are mostly related to header file usage + and the effort of making full use of the driver capacity to enhance the + Xxenix server performance. + + Following calls are supported. + + socket(), bind(), listen(), connect(), accept(), select(), + read(), write(), getsockname(), getpeername() + + These calls almost have the same semantics as those of 4.2 BSD UNIX. + The driver supports a protocol same as AF_UNIX and SOCK_STREAM, except + that a socket address is not bound to any file under the file system + and the maximum socket address length is limited to 14 characters. + The driver FULLY supports BSD select() on socket read/write/exception + conditions. Socket descriptors returned by socket() call WILL BE inherited + by subprocesses created by fork() or exec() call. ( This is hardly ever + true for any other socket emulation packages. ) The socket interface can + be used in your application program as if the mechanism is well designed + and built-in to the kernel. Besides supporting X11R4, you can also use + it to port many network oriented (TCP/IP in particular) applications. + However, since the driver was written primarily for supporting X, there + is no guarantee that it will work as what you would have expected when + used for other applications. + + An 'ss' program similar to 'ps' or 'ipcs' is provided to let you list + current status information of the socket devices for debugging purpose. + + Also included are a few test and example programs. 'testsocket' is a + simple proram testing socket connection and select. 'server' is a server + program that makes copy of a client's data and writes them back. 'xerox' + is a client requesting such service. Multiple clients can be connected + to the server. + + A VGA memory mapping device driver and a bell device driver is also + provided to support the Xxenix server. + + Example source programs are provided in the package. Source code for + the device drivers is NOT included and will NOT be released in general. + (However, if you are willing to put a big price tag on it, feel free :-) + + 2. What version of Xenix does it work on? + + It is tested and known to work on SCO Xenix SysV 386 version 2.3.2 only. + It may or may not run on other versions of Xenix. + + 3. How to get? + + Send $30, check only to + + Chain Lee + 11 Holton Road + Lexington, MA 02173 + + Please specify media type (5 1/4 or 3 1/2 floppy). Allow time for + processing. + + Chain Lee 12/30/90 + chain@paul.rutgers.edu *** X11R4.ORIG/drivers/xenix/socket.h Sun Jan 6 12:36:38 1991 --- X11R4/drivers/xenix/socket.h Sun Jan 6 11:43:59 1991 *************** *** 0 **** --- 1,30 ---- + /* + * socket.h, Revision 1.1 1/6/91 cl + */ + + #define u_short ushort + #ifndef FIONREAD + #define FIONREAD (1 << 5) + #endif + #ifndef EWOULDBLOCK + #define EWOULDBLOCK 35 + #endif + + #define AF_UNSPEC 0 + #define AF_UNIX 1 + #define AF_INET 2 + + #define SOCK_STREAM 1 + + #define SO_LINGER 0x0080 + + struct sockaddr { + ushort sa_family; + char sa_data[14]; + }; + + struct sockaddr_un { + ushort sun_family; + char sun_path[14]; + }; + *** X11R4.ORIG/drivers/xenix/README Sun Jan 6 12:36:42 1991 --- X11R4/drivers/xenix/README Sun Jan 6 11:57:52 1991 *************** *** 0 **** --- 1,13 ---- + # + # README + # + + This directory contains necessary header and library file for building + the system when you are using the socket emulator. + + To install, run following. + + make + su root + make install + *** X11R4.ORIG/drivers/xenix/whoami.uue Sun Jan 6 12:36:45 1991 --- X11R4/drivers/xenix/whoami.uue Sun Jan 6 11:48:10 1991 *************** *** 0 **** --- 1,247 ---- + begin 755 whoami + M!@(L ! > "\!@ 1 X $ID!]@ + M & ! @$"/P + M 0!(@#\ ! $!X ! > " $2 1P + M D "\!@ !4 B $ + M + M + M + M + M + M + M + M + M + M + M + M + M + M + M + M + M + M + M .M^Z_[K_NO^Z_X + M + M + M ##HP@ B $S[>A$! 4.C^! + MZ_Y5B^R#[ CH"04 (E%^%#H' 4 (/$!(E%_ O =1K_=?AH% "( >@Q!0 + M@\0(:@'HQP0 (/$!(M%_/\P:$0 B 'H%04 (/$"&H Z*L$ #)PY!5B^R# + M[ 16OE0 B $Y-10$B %W!%[)PY!6Z!( "#Q 2#QA Y-10$B %W[%[)PY!5 + MB^R#[ 175HMU"+______"_9U"(O'7E_)PY"0]D8,@W0U]D8,!'0$,\#K"5;H + M4@ (/$!(OX#[Y#HWPX (/$! O ?0^______\<%! "( 0( #V1@P( + M=!+_=@CH1Q, (/$!,=&" #&1@P QP8 BT8(B48$ZY.0D)!5B^Q6 + MBW4(]D8, G4HQP8 ZS>0D)#V1@P"=!V#?@@ =!>+1@@Y1@1V#U;H+@$ + M (/$!/9&# 1TW?9&#"!T"[C_____7LG#D)"0,\!>R<.0D)!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%[) + MPY#_%H/&!('^O :( 77S7LG#58OLZ%#[___HR_____]U".A["@ R<.0N!@ + M ": < <@*2PZ,$ (@!N/_____# %6+[(/L!%=6BW4(Z( * #H%PL + M (OX"_]T!3EW"'7PZ*,* "+QUY?R<.058OL@^P(5HU%#(E%_/8%< "( 0)U + M$/8%< "( 8!T)8 -< "( 0)H9 "( ?]U_/]U".C. @\0,B_#V!7 B $@ + M= BX_____U[)PXO&7LG#D)"058OL@^P(BT4(BP E 0 (E%^(M%"(L T?@E + M____?XE%_+D% F??YBTT(B0&Y!0 (M%_)GW^8O"T> #1?B#P##)PY"0 + M58OL4U=6BW4(BWT,BUT0@'L-/'0WBT44BP K0P0I XM%%(L B4,$4^C7_?__ + M@\0$4U=J 5;H3A$ (/$$(M%%(M+!(D(7E];R<.0D%=6BT44_S#HT!( (/$ + M# /'BTT4B0%>7UO)PY!5B^R![+@ !35U:+=0B+?1#'1> QT6< + M ,=%] #'1?P #[Y'#8E%D(I'#"02/ )U&8-_" !T$XM'"#E'!'48 + M@S\ =1/V1PQ$=0U7Z"_\__^#Q 3K!)"0,\ +P'0*,\!>7UO)PY"0D(M'!(E% + ME(-]D#QU" W___]_ZPN0BT60BP2%& 2( 8E%F ^^!HE%N O =%:#^"5T48O> + M1@^^!HE%N O = 6#^"5U\(O&*\.)18P!1> #192)18@[19AV%8U%E%!7_W6, + M4^B__O__@\00ZQ>0D/]UC%/_=93HU!$ (/$#(M%B(E%E(-]N !U<8M%E"M' + M!(E%A"D'BT64B4<$BT64 P<[19AV#X!_#3QT"5?H>OS__X/$!/9'#$1T)_9' + M# 1U&/]UA&H*BT64*T6$4.A:$0 @\0,"\!T"5?HN?K__X/$!/9'#"!T#+C_ + M____7E];R<.0D(M%X%Y?6\G#,\")1;R)1?B)1:R)1=!&1@^^1O^)1;B#^#D/ + MCQP$ "#^#$/C8T "#Z""#^! /AS8$ N_R2%6 P )"0D(!-O +KR9"0 + M@$V\!.O!D)" 3;P(Z[F0D(!-O!#KL9"0@$V\0,=%L #KHI"0D/9%O$!U + M'H-%# 2+10R+0/R)1= +P'V(]UW0@'6\!.E\____D(-%# 2+10R+0/R)1; + + MP ^-9O___^NYD/9%O$1U!(!-O""+1;B#Z#")18#K$9"0D&M%@ H#1;B#Z#") + M18!&#[X&B46X]H"Y!8@!!'7C]D6\0'0-BT6 B46PZ1W___^0D(M%@(E%T.D0 + M____D(!-O 'I!O___Y"0D/9%O P$BT4,BT#\B47(0 + M#[? "\**38PJR(#!,$N("X.]?/___PE_OTN*A7S___\$,(@#]D6\0'0>BT6P + MBTWH*\LKP8F%>/___PO ?@J)1BI @ ^$(O___XU%W%#HD?O__X/$!$N( ^D.____D)#'1< ' + M QT7, @ .L.QT7 #P ,=%S , #V1;P!@T4,!(M%#(M _(E%W(-] + MN%AU![ABT6PBTWH*\LKP8F%OJD)"0BD6XZPV0D)"#10P$BT4,BD#\B$6@C5V@B\- + MZR>0D)"#10P$BT4,BUC\"]MU!;LCI + M*/[__XF=;/___XN%;/____^%;/___X X '0%_TVP>>J+A6S___](Z].0D)"P + M" RPP ,L, "X" RPP .0+ #+# RPP ,L, #+# T @ * ( + M #+# J @ , ( #+# # D (/X:0^$Q_S__W\M@_A8#X0@_O__@_AC + M#X0S____@_AD#X2J_/__@_AH#X2D^___3NFX^O__D)"0@_AL#X2#_/__@_AO + M#X3:_?__@_AS#X05____@_AU#X20_?__@_AX#X3/_?__Z\B0]D6\ G0*QT74 + M)@6( >L.D/9%O AT#L=%U"@%B ''1:P! QT6< (M%Z"O#B46, T6L + M T7X T7TB46T.470?P@!1>#IPP (M%T %%X/9%O"!T+&;W1;P G4,@$V] + M BM%M(E%R.L)BT70*T6T 47(BT70B46TZ8\ "0D)"0]D6\! ^%@0 (M% + MT"M%M(F%:/___^L;C4644%=J%&@L!8@!Z-OX__^#Q!"#K6C___\4@[UH____ + M%'_-1910 + M5VH%_W7$Z SX__^#Q!#K')"0D&H%_W7$_W64Z!\+ "#Q R+A5S___^)193' + M1?0 9O=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D8,)!(\ G49@WX( '03BT8(.48$=1F#/@!U%/9&#$1U + M#E;H+.O__X/$!.L%D)"0,\ +P'0*,\!>7UO)PY"0D ^^1@V+!(48!(@!B47X + MBT40#Z]%#(OXBT8$.48( @\0,*1X!7@0/OD8-BP2%& 2( 2M&!(L. + M"\E_ C/).\%]"5;H4NO__X/$!"O[=:?V1@Q$="'V1@P$=1)3:@K_=@CH- + M (/$# O = E6Z)/I__^#Q 2+11!>7UO)P[@V F@ ' '(!PZ,$ (@! + MN/_____# !5B^Q7BTT0"\E^%(S?CL>+?0B+10S\\JYU!8O'2.L"*\!?R<-5 + MB^Q65XM5$(S?CL>+?0B+QXMU#/R#^@=^)??& P '03]\<# = N+S_?9 + M@^$#*]'SI(O*P>D"\Z6#X@.+R@O)?@+SI%]>R<, 58OL5HMU"%;HC^?__X/$ + M!&H :@ /OD8-4.@V P @\0,QP8 BT8(B48$@&8,S_9&#(!T!(!F#/Q> + MR<.0D%6+[(/L!%=6BW4("_9U":$( (@!7E_)PXL]" "( 8O' \90Z'S[__^# + MQ 1 =1;'!00 B $, N/____]>7\G#D)"0B\=>7\G#D)!5B^Q7C-^.QXM] + M""O N?_____\\JZ+P??02%_)PP %6+[(/L$%-75HMU"(M]$,=%] "# + M?0P = 6+10R), O_? 6#_R1^"C/ 7E];R<.0D) /O@:)1?SV@+D%B $'=2SK + M"I"0D$8/O@:)1?R+1?SV@+D%B $(=>V#^"MT"(/X+74*_T7T1@^^!HE%_ O_ + M=2:#??PP= >_"@ .L9@'X!>'0&@'X!6'4(OQ #K!I"_" (M%_/: + MN06( 0=TA?: N06( 01T!H/H,.L;D(M%_/: N06( 0)T"(/H5^L)D)"0BT7\ + M@^@WB47P.\)1? [QWT:B\7\G#D)"058OL@^P$5KY4 (@!ZP60D(/&$#DU + M% 2( 78-]D8,@W7OB\9>R<.0D#/ 7LG#D)"0N!, ": < <@'#HP0 + MB &X_____\, %6+[%97*\"+310+R7Y5C-^.QXM]#(OW_(O1BT40\JZX 0 + M '0"*\ KT8M]"(/Z!WXG]\8# =!/WQP, !T"XO/]]F#X0,KT?.DB\K! + MZ0+C!?.E@^(#B\KSI O = *+QU]>R<, N 4 ": < <@'#HP0 B &X + M_____\, +@# F@ ' '(!PZ,$ (@!N/_____# + M + M + M + M + M + M + M + M + M + M + M + M !W:&]A;6DZ(&YO('5S97(@;F%M92!A $Y!3C!8 :6YF $E.1@!R +V5T8R]P87-S + M=V0 !R " @(" @(" @("@H*"@H(" @(" @(" @(" @(" @ + M(" @2! 0$! 0$! 0$! 0$! 0$(2$A(2$A(2$A(00$! 0$! 0@8&!@8&! 0$! + M 0$! 0$! 0$! 0$! 0$! 0$0$! 0$!""@H*"@H(" @(" @(" @(" @(" @(" + M @(" A 0$! @ + M + M + % + + end *** X11R4.ORIG/mit/server/os/4.2bsd/connection.c Sun Jan 6 19:30:03 1991 --- X11R4/mit/server/os/4.2bsd/connection.c Sun Jan 6 19:52:09 1991 *************** *** 790,813 **** notime.tv_sec = 0; notime.tv_usec = 0; ! #if BSD_SOCKET_EMULATION /* ! * Much more efficient here, but may not be reliable. */ COPYBITS(AllClients, tmask); r = select (MAXSOCKS, (int *)NULL, (int *)NULL, (int *)tmask, ¬ime); ! for (i=0; i= 0) { ! for (i=0; i