[comp.windows.x] R4, SunOS3.5, CG3 and CG6 for Xsun, crypt for xdm

moraes@CSRI.TORONTO.EDU (Mark Moraes) (01/07/90)

First, congratulations to all the people at the X Consortium --
R4 is nice, very nice. That's one FAST server for Suns.

We needed to make the following changes to get the mit/ part
to build on our SunOS3.5 machines. (Some of us have GOOD reasons
to stay at SunOS3.5)

+ xdm has a #define crypt _crypt ifdef'ed for sun. Sorry -- no
_crypt in SunOS3.5. So we added a SUNOS4 ifdef.

+ We stuffed in a sunCGfake.c that provides stubs for CG3 and CG6 on
SunOS3.5 -- makes it possible to compile Xsun without problems
on both SunOS3.x and 4.x.

*** /tmp/,RCSt1a01124	Sun Jan  7 02:12:20 1990
--- mit/clients/xdm/Imakefile	Sun Jan  7 02:08:50 1990
***************
*** 2,7 ****
--- 2,14 ----
  #include BandAidCompiler
  #endif
  
+ #ifdef SunArchitecture
+ /* For the _crypt goo that SunOS4.0 needs. */
+ #if SunOSPlatform && OSMajorVersion >= 4
+ SUNOSDEF=-DSUNOS4
+ #endif /* SunOSPlatform 4 */
+ #endif /* SunArch */
+ 
  #if InstallXdmConfig
  #define IHaveSubdirs
  #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
***************
*** 41,47 ****
  #if !HasVoidSignalReturn
       SIGDEFS = -DSIGNALRETURNSINT
  #endif
!         DEFINES = -DBINDIR=\"$(BINDIR)\" -DXDMDIR=\"$(XDMDIR)\" $(SIGDEFS) $(DESDEFS) ConnectionFlags
  
  /**/#
  /**/# Special definitions for compiling default resources; these parameters
--- 48,54 ----
  #if !HasVoidSignalReturn
       SIGDEFS = -DSIGNALRETURNSINT
  #endif
!         DEFINES = -DBINDIR=\"$(BINDIR)\" -DXDMDIR=\"$(XDMDIR)\" $(SIGDEFS) $(DESDEFS) $(SUNOSDEF) ConnectionFlags
  
  /**/#
  /**/# Special definitions for compiling default resources; these parameters
*** /tmp/,RCSt1a01124	Sun Jan  7 02:12:22 1990
--- mit/clients/xdm/cryptokey.c	Sun Jan  7 02:09:37 1990
***************
*** 40,47 ****
  #  endif
  #  ifdef sun
  #   define USE_CRYPT
!     /* avoid strange sun crypt hackery */
! #   define crypt _crypt
  #  endif
  # endif
  #endif
--- 40,49 ----
  #  endif
  #  ifdef sun
  #   define USE_CRYPT
! #   ifdef SUNOS4
!      /* avoid strange SunOS4.0 crypt hackery */
! #    define crypt _crypt
! #   endif
  #  endif
  # endif
  #endif
*** /dev/null	Sun Jan  7 02:10:01 1990
--- mit/server/ddx/sun/sunCGfake.c	Sat Jan  6 05:27:58 1990
***************
*** 0 ****
--- 1,49 ----
+ #include "sun.h"
+ 
+ /* the following are needed because sunCG3C.c and sunCG6C.c need
+ ** define constants and include files that only exist in SunOS 4.x
+ */
+ 
+ /*ARGSUSED*/
+ Bool
+ sunCG3CProbe (pScreenInfo, index, fbNum, argc, argv)
+     ScreenInfo	  *pScreenInfo;	/* The screenInfo struct */
+     int	    	  index;    	/* The index of pScreen in the ScreenInfo */
+     int	    	  fbNum;    	/* Index into the sunFbData array */
+     int	    	  argc;	    	/* The number of the Server's arguments. */
+     char    	  **argv;   	/* The arguments themselves. Don't change! */
+ {
+     return FALSE;
+ }
+ 
+ /*ARGSUSED*/
+ Bool
+ sunCG3CCreate(pScreenInfo, argc, argv)
+     ScreenInfo    *pScreenInfo;
+     int           argc;
+     char          **argv;
+ {
+     return FALSE;
+ }
+ 
+ /*ARGSUSED*/
+ Bool
+ sunCG6CProbe (pScreenInfo, index, fbNum, argc, argv)
+     ScreenInfo	  *pScreenInfo;	/* The screenInfo struct */
+     int	    	  index;    	/* The index of pScreen in the ScreenInfo */
+     int	    	  fbNum;    	/* Index into the sunFbData array */
+     int	    	  argc;	    	/* The number of the Server's arguments. */
+     char    	  **argv;   	/* The arguments themselves. Don't change! */
+ {
+     return FALSE;
+ }
+ 
+ /*ARGSUSED*/
+ Bool
+ sunCG6CCreate(pScreenInfo, argc, argv)
+     ScreenInfo    *pScreenInfo;
+     int           argc;
+     char          **argv;
+ {
+     return FALSE;
+ }
*** /tmp/,RCSt1a01138	Sun Jan  7 02:13:33 1990
--- mit/server/ddx/sun/Imakefile	Sat Jan  6 05:01:38 1990
***************
*** 1,5 ****
--- 1,15 ----
  #include <Server.tmpl>
  
+ #ifdef SunArchitecture
+ #if SunOSPlatform && OSMajorVersion >= 4
+ CGFAKE_SRC=sunCG3C.c sunCG6C.c
+ CGFAKE_OBJ=sunCG3C.o sunCG6C.c
+ #else
+ CGFAKE_SRC=sunCGfake.c
+ CGFAKE_OBJ=sunCGfake.o
+ #endif /* SunOSPlatform 4 */
+ #endif /* SunArch */
+ 
  SRCS1 =	\
  	sunInit.c \
  	sunBW2.c \
***************
*** 10,19 ****
  	sunUtils.c \
  	sunCG2C.c \
  	sunCG2M.c \
- 	sunCG3C.c \
  	sunCG4C.c \
! 	sunCG6C.c \
! 	sunKeyMap.c
  
  SRCS =	$(SRCS1) kbd_mode.c constype.c 
  
--- 20,28 ----
  	sunUtils.c \
  	sunCG2C.c \
  	sunCG2M.c \
  	sunCG4C.c \
! 	sunKeyMap.c \
! 	$(CGFAKE_SRC)
  
  SRCS =	$(SRCS1) kbd_mode.c constype.c 
  
***************
*** 28,37 ****
  	sunUtils.o \
  	sunCG2C.o \
  	sunCG2M.o \
- 	sunCG3C.o \
  	sunCG4C.o \
! 	sunCG6C.o \
! 	sunKeyMap.o
  
     INCLUDES = -I. -I../mfb -I../mi -I../../include -I$(INCLUDESRC)
     LINTLIBS = ../../dix/llib-ldix.ln ../../os/4.2bsd/llib-los.ln \
--- 37,45 ----
  	sunUtils.o \
  	sunCG2C.o \
  	sunCG2M.o \
  	sunCG4C.o \
! 	sunKeyMap.o \
! 	$(CGFAKE_OBJ)
  
     INCLUDES = -I. -I../mfb -I../mi -I../../include -I$(INCLUDESRC)
     LINTLIBS = ../../dix/llib-ldix.ln ../../os/4.2bsd/llib-los.ln \