diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/config/cf/vnclibs.def vnc_unixsrc-1.3.8/Xvnc/config/cf/vnclibs.def --- vnc_unixsrc-1.3.8.orig/Xvnc/config/cf/vnclibs.def 2003-05-03 05:31:54.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/config/cf/vnclibs.def 2008-08-26 12:35:50.000000000 -0400 @@ -11,7 +11,7 @@ /* Avoid linking with different libjpeg in /usr/shlib under Tru64. */ VNCSYSLIBS = /usr/local/lib/libjpeg.a /usr/local/lib/libz.a -lcrypt #else -VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz -lcrypt +VNCSYSLIBS = $(LDFLAGS) -ljpeg -lz# -lcrypt #endif -VNCCPPFLAGS = -I$(TOP)/../include -I/usr/local/include +VNCCPPFLAGS = -I$(TOP)/../include $(CPPFLAGS) diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/config/util/lndir.c vnc_unixsrc-1.3.8/Xvnc/config/util/lndir.c --- vnc_unixsrc-1.3.8.orig/Xvnc/config/util/lndir.c 2000-06-11 08:00:51.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/config/util/lndir.c 2008-08-26 12:38:43.000000000 -0400 @@ -47,6 +47,7 @@ #include #include #include +#include #include #if !defined(MINIX) && !defined(Lynx) #include diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/include/Xos.h vnc_unixsrc-1.3.8/Xvnc/include/Xos.h --- vnc_unixsrc-1.3.8.orig/Xvnc/include/Xos.h 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/include/Xos.h 2008-08-26 12:38:43.000000000 -0400 @@ -150,10 +150,6 @@ #endif #endif /* X_NOT_POSIX else */ -#ifdef CSRG_BASED -#include -#include -#endif /* CSRG_BASED */ /* * Get struct timeval diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/lib/Xdmcp/Alloc.c vnc_unixsrc-1.3.8/Xvnc/lib/Xdmcp/Alloc.c --- vnc_unixsrc-1.3.8.orig/Xvnc/lib/Xdmcp/Alloc.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/lib/Xdmcp/Alloc.c 2008-08-26 12:38:43.000000000 -0400 @@ -31,7 +31,7 @@ /* stubs for use when Xalloc, Xrealloc and Xfree are not defined */ -extern char *malloc (), *realloc (); +#include unsigned long * Xalloc (amount) diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/objects.c vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/objects.c --- vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/objects.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/objects.c 2008-08-26 12:38:43.000000000 -0400 @@ -55,6 +55,7 @@ #include #include +#include /* override incorrect system functions; for example you might define diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/spaces.c vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/spaces.c --- vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/spaces.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/spaces.c 2008-08-26 12:38:43.000000000 -0400 @@ -37,6 +37,8 @@ :h3.Include Files */ +#include +#include #include "objects.h" #include "spaces.h" #include "paths.h" diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/t1malloc.c vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/t1malloc.c --- vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/t1malloc.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/t1malloc.c 2008-08-26 12:38:43.000000000 -0400 @@ -37,6 +37,7 @@ */ +#include #include "objects.h" /* get #define for abort() */ static combine(); diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/t1stub.c vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/t1stub.c --- vnc_unixsrc-1.3.8.orig/Xvnc/lib/font/Type1/t1stub.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/lib/font/Type1/t1stub.c 2008-08-26 12:38:43.000000000 -0400 @@ -28,6 +28,7 @@ * SOFTWARE. */ +#include #include "objects.h" /* get #define for abort() */ xiStub() diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/Xext/xprint.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/Xext/xprint.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/Xext/xprint.c 2002-04-30 09:07:31.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/Xext/xprint.c 2008-08-26 12:38:43.000000000 -0400 @@ -66,6 +66,7 @@ ********************************************************************/ /* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.4 1997/01/02 04:05:05 dawes Exp $ */ +#include #include "X.h" #define NEED_EVENTS #include "Xproto.h" diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/corre.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/corre.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/corre.c 2001-01-16 17:26:22.000000000 -0500 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/corre.c 2008-08-26 12:38:43.000000000 -0400 @@ -24,6 +24,7 @@ * USA. */ +#include #include #include "rfb.h" diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/httpd.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/httpd.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/httpd.c 2003-04-08 18:18:33.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/httpd.c 2008-08-26 12:38:43.000000000 -0400 @@ -22,6 +22,7 @@ * USA. */ +#include #include #include #include diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/init.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/init.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/init.c 2006-08-15 03:05:07.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/init.c 2008-08-26 12:38:43.000000000 -0400 @@ -55,6 +55,7 @@ #include #include +#include #include #include #include diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/kbdptr.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/kbdptr.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/kbdptr.c 2001-01-16 15:20:28.000000000 -0500 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/kbdptr.c 2008-08-26 12:38:43.000000000 -0400 @@ -23,6 +23,7 @@ * USA. */ +#include #include #include "X11/X.h" diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/rre.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/rre.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/rre.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/rre.c 2008-08-26 12:38:43.000000000 -0400 @@ -24,6 +24,7 @@ * USA. */ +#include #include #include "rfb.h" diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/sockets.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/sockets.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/sockets.c 2002-10-27 07:36:02.000000000 -0500 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/sockets.c 2008-08-26 12:38:43.000000000 -0400 @@ -37,6 +37,7 @@ * USA. */ +#include #include #include #include diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/tableinittctemplate.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/tableinittctemplate.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/tableinittctemplate.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/tableinittctemplate.c 2008-08-26 12:38:43.000000000 -0400 @@ -36,6 +36,7 @@ #error "This file shouldn't be compiled." #error "It is included as part of translate.c" #endif +#include #define OUT_T CONCAT2E(CARD,OUT) #define SwapOUT(x) CONCAT2E(Swap,OUT(x)) diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/translate.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/translate.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/hw/vnc/translate.c 2000-10-25 17:24:07.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/hw/vnc/translate.c 2008-08-26 12:38:43.000000000 -0400 @@ -21,6 +21,7 @@ * USA. */ +#include #include #include "rfb.h" diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/os/xdmcp.c vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/os/xdmcp.c --- vnc_unixsrc-1.3.8.orig/Xvnc/programs/Xserver/os/xdmcp.c 2000-06-11 08:00:52.000000000 -0400 +++ vnc_unixsrc-1.3.8/Xvnc/programs/Xserver/os/xdmcp.c 2008-08-26 12:38:43.000000000 -0400 @@ -15,6 +15,7 @@ * */ +#include #ifdef WIN32 /* avoid conflicting definitions */ #define BOOL wBOOL diff -Nurd -x'*~' vnc_unixsrc-1.3.8.orig/vncconnect/vncconnect.c vnc_unixsrc-1.3.8/vncconnect/vncconnect.c --- vnc_unixsrc-1.3.8.orig/vncconnect/vncconnect.c 2000-11-10 05:20:07.000000000 -0500 +++ vnc_unixsrc-1.3.8/vncconnect/vncconnect.c 2008-08-26 12:38:43.000000000 -0400 @@ -2,6 +2,8 @@ * vncconnect.c */ +#include +#include #include #include #include diff -aur vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h vnc_unixsrc_corr/Xvnc/programs/Xserver/include/servermd.h --- vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h 2003-02-19 17:39:54.000000000 +0100 +++ vnc_unixsrc_corr/Xvnc/programs/Xserver/include/servermd.h 2008-10-11 18:20:23.000000000 +0200 @@ -1,13 +1,12 @@ /*********************************************************** -Copyright (c) 1987 X Consortium +Copyright 1987, 1998 The Open Group -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -15,13 +14,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Except as contained in this notice, the name of the X Consortium shall not be +Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. +in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -45,10 +44,9 @@ SOFTWARE. ******************************************************************/ + #ifndef SERVERMD_H #define SERVERMD_H 1 -/* $XConsortium: servermd.h /main/58 1996/12/02 10:22:09 lehors $ */ -/* $XFree86: xc/programs/Xserver/include/servermd.h,v 3.19.2.3 1997/07/28 14:17:34 dawes Exp $ */ /* * Machine dependent values: @@ -132,14 +130,53 @@ #endif /* vax */ -#if (defined(Lynx) && defined(__powerpc__)) +#ifdef __arm32__ + +#define IMAGE_BYTE_ORDER LSBFirst + +# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO) +# define BITMAP_BIT_ORDER MSBFirst +# else +# define BITMAP_BIT_ORDER LSBFirst +# endif + +# if defined(XF86MONOVGA) || defined(XF86VGA16) +# define BITMAP_SCANLINE_UNIT 8 +# endif + +#define GLYPHPADBYTES 4 +#define GETLEFTBITS_ALIGNMENT 1 +#define LARGE_INSTRUCTION_CACHE +#define AVOID_MEMORY_READ + +#endif /* __arm32__ */ + +#if defined (hpux) || defined __hppa__ + +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#define GLYPHPADBYTES 4 /* to make fb work */ +#define GETLEFTBITS_ALIGNMENT 1 /* PA forces longs to 4 */ + /* byte boundries */ +#define AVOID_MEMORY_READ +#define FAST_CONSTANT_OFFSET_MODE +#define LARGE_INSTRUCTION_CACHE +#define PLENTIFUL_REGISTERS + +#endif /* hpux || __hppa__ */ + +#if defined(__powerpc__) || defined(__ppc__) -/* For now this is for Xvfb only */ #define IMAGE_BYTE_ORDER MSBFirst #define BITMAP_BIT_ORDER MSBFirst #define GLYPHPADBYTES 4 #define GETLEFTBITS_ALIGNMENT 1 +/* XXX Should this be for Lynx only? */ +#ifdef Lynx +#define BITMAP_SCANLINE_UNIT 8 +#endif + #define LARGE_INSTRUCTION_CACHE #define FAST_CONSTANT_OFFSET_MODE #define PLENTIFUL_REGISTERS @@ -147,14 +184,39 @@ #define FAST_MEMCPY -#endif /* LynxOS PowerPC */ +#endif /* PowerPC */ + +#if defined(__sh__) + +#if defined(__BIG_ENDIAN__) +# define IMAGE_BYTE_ORDER MSBFirst +# define BITMAP_BIT_ORDER MSBFirst +# define GLYPHPADBYTES 4 +# define GETLEFTBITS_ALIGNMENT 1 +#else +# define IMAGE_BYTE_ORDER LSBFirst +# define BITMAP_BIT_ORDER LSBFirst +# define GLYPHPADBYTES 4 +# define GETLEFTBITS_ALIGNMENT 1 +#endif + +#define AVOID_MEMORY_READ +#define FAST_CONSTANT_OFFSET_MODE +#define LARGE_INSTRUCTION_CACHE +#define PLENTIFUL_REGISTERS + +#endif /* SuperH */ -#if (defined(sun) && !(defined(i386) && defined(SVR4))) || \ - (defined(AMOEBA) && (defined(sparc) || defined(mc68000))) || \ + +#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \ (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \ - (defined(Lynx) && defined(__sparc__)) || \ - ((defined(__NetBSD__) || defined(__OpenBSD__)) && \ - (defined(__sparc__) || defined(__mc68000__))) + defined(__sparc__) || defined(__mc68000__) + +#if defined(__sparc) || defined(__sparc__) +# if !defined(sparc) +# define sparc 1 +# endif +#endif #if defined(sun386) || defined(sun5) # define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */ @@ -214,20 +276,6 @@ #endif /* ibm */ -#ifdef hpux - -#define IMAGE_BYTE_ORDER MSBFirst /* Values for the HP only */ -#define BITMAP_BIT_ORDER MSBFirst -#define GLYPHPADBYTES 2 /* to match product server */ -#define GETLEFTBITS_ALIGNMENT 4 /* PA forces longs to 4 */ - /* byte boundries */ -#define AVOID_MEMORY_READ -#define FAST_CONSTANT_OFFSET_MODE -#define LARGE_INSTRUCTION_CACHE -#define PLENTIFUL_REGISTERS - -#endif /* hpux */ - #if defined (M4310) || defined(M4315) || defined(M4317) || defined(M4319) || defined(M4330) #define IMAGE_BYTE_ORDER MSBFirst /* Values for Pegasus only */ @@ -282,29 +330,89 @@ # if defined(XF86MONOVGA) || defined(XF86VGA16) # define BITMAP_SCANLINE_UNIT 8 +# endif + +# define GLYPHPADBYTES 4 +# define GETLEFTBITS_ALIGNMENT 1 +# define FAST_CONSTANT_OFFSET_MODE +# define LARGE_INSTRUCTION_CACHE +# define PLENTIFUL_REGISTERS + +#endif /* alpha */ + +#if defined (linux) && defined (__s390__) + +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#define GLYPHPADBYTES 4 +#define GETLEFTBITS_ALIGNMENT 1 + +#define BITMAP_SCANLINE_UNIT 8 +#define LARGE_INSTRUCTION_CACHE +#define FAST_CONSTANT_OFFSET_MODE +#define FAST_UNALIGNED_READ + +#define FAST_MEMCPY + +#endif /* linux/s390 */ + +#if defined (linux) && defined (__s390x__) + +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#define GLYPHPADBYTES 4 +#define GETLEFTBITS_ALIGNMENT 1 + +#define BITMAP_SCANLINE_UNIT 8 +#define LARGE_INSTRUCTION_CACHE +#define FAST_CONSTANT_OFFSET_MODE +#define FAST_UNALIGNED_READ + +#define FAST_MEMCPY +#endif /* linux/s390x */ + + +#if defined(__ia64__) || defined(ia64) +# define IMAGE_BYTE_ORDER LSBFirst + +# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO) +# define BITMAP_BIT_ORDER MSBFirst # else - /* pad scanline to a longword */ -# define BITMAP_SCANLINE_UNIT 64 +# define BITMAP_BIT_ORDER LSBFirst +# endif + +# if defined(XF86MONOVGA) || defined(XF86VGA16) +# define BITMAP_SCANLINE_UNIT 8 # endif -# define BITMAP_SCANLINE_PAD 64 -# define LOG2_BITMAP_PAD 6 -# define LOG2_BYTES_PER_SCANLINE_PAD 3 # define GLYPHPADBYTES 4 # define GETLEFTBITS_ALIGNMENT 1 # define FAST_CONSTANT_OFFSET_MODE # define LARGE_INSTRUCTION_CACHE # define PLENTIFUL_REGISTERS -/* Add for handling protocol XPutImage and XGetImage; see comment below */ -#define INTERNAL_VS_EXTERNAL_PADDING -#define BITMAP_SCANLINE_UNIT_PROTO 32 - -#define BITMAP_SCANLINE_PAD_PROTO 32 -#define LOG2_BITMAP_PAD_PROTO 5 -#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 +#endif /* ia64 */ -#endif /* alpha */ +#if defined(__amd64__) || defined(amd64) || defined(__amd64) +# define IMAGE_BYTE_ORDER LSBFirst + +# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO) +# define BITMAP_BIT_ORDER MSBFirst +# else +# define BITMAP_BIT_ORDER LSBFirst +# endif + +# if defined(XF86MONOVGA) || defined(XF86VGA16) +# define BITMAP_SCANLINE_UNIT 8 +# endif + +# define GLYPHPADBYTES 4 +# define GETLEFTBITS_ALIGNMENT 1 +# define LARGE_INSTRUCTION_CACHE +# define FAST_CONSTANT_OFFSET_MODE +/* ???? */ +# define FAST_UNALIGNED_READS +#endif /* AMD64 */ #ifdef stellar @@ -336,13 +444,14 @@ #endif /* luna */ -#if ((defined(__s390__) || defined(__s390x__)) && defined(linux)) -#define IMAGE_BYTE_ORDER MSBFirst -#define BITMAP_BIT_ORDER MSBFirst -#endif /* (__s390__ || __s390x__) && linux */ - -#if (defined(i386) && (defined(SVR4) || defined(SYSV) || (defined(sun) && defined(SVR4))) || defined(__bsdi__) || (defined(__NetBSD__) && defined(__i386__)) || (defined(__OpenBSD__) && defined(__i386__)) || defined(__FreeBSD__) || defined(MACH386) || (defined(linux) && !defined(__mc68000__)) || (defined(AMOEBA) && defined(i80386)) || defined(MINIX) || defined(__EMX__) || (defined(Lynx) && defined(__i386__))) - +#if (defined(SVR4) && defined(i386)) || \ + defined(__alpha__) || defined(__alpha) || \ + defined(__i386__) || defined(__i386) || \ + defined(__UNIXOS2__) || \ + defined(__OS2ELF__) || \ + defined(__QNX__) || \ + defined(__s390x__) || defined(__s390__) + #ifndef IMAGE_BYTE_ORDER #define IMAGE_BYTE_ORDER LSBFirst #endif @@ -386,70 +495,12 @@ #endif /* linux/m68k */ -#if defined (linux) && defined(__powerpc__) - -#define IMAGE_BYTE_ORDER MSBFirst -#define BITMAP_BIT_ORDER MSBFirst -#define GLYPHPADBYTES 4 -#define GETLEFTBITS_ALIGNMENT 1 - -#define LARGE_INSTRUCTION_CACHE -#define FAST_CONSTANT_OFFSET_MODE -#define PLENTIFUL_REGISTERS -#define AVOID_MEMORY_READ - -#define FAST_MEMCPY - -#endif /* Linux/PPC */ - -#if defined(__MACH__) && defined(__POWERPC__) - -#define IMAGE_BYTE_ORDER MSBFirst -#define BITMAP_BIT_ORDER MSBFirst -#define GLYPHPADBYTES 4 -#define GETLEFTBITS_ALIGNMENT 1 - -#define LARGE_INSTRUCTION_CACHE -#define FAST_CONSTANT_OFFSET_MODE -#define PLENTIFUL_REGISTERS -#define AVOID_MEMORY_READ - -#define FAST_MEMCPY - -#endif /* MACH/PPC */ - #ifdef sgi #define IMAGE_BYTE_ORDER MSBFirst #define BITMAP_BIT_ORDER MSBFirst - -#if (_MIPS_SZLONG == 64) - -# define GLYPHPADBYTES 4 -# define GETLEFTBITS_ALIGNMENT 1 - -/* pad scanline to a longword */ -#define BITMAP_SCANLINE_UNIT 64 - -#define BITMAP_SCANLINE_PAD 64 -#define LOG2_BITMAP_PAD 6 -#define LOG2_BYTES_PER_SCANLINE_PAD 3 - -/* Add for handling protocol XPutImage and XGetImage; see comment below */ -#define INTERNAL_VS_EXTERNAL_PADDING -#define BITMAP_SCANLINE_UNIT_PROTO 32 - -#define BITMAP_SCANLINE_PAD_PROTO 32 -#define LOG2_BITMAP_PAD_PROTO 5 -#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 - -#else - -#define GLYPHPADBYTES 2 -#define GETLEFTBITS_ALIGNMENT 4 - -#endif - +#define GLYPHPADBYTES 4 +#define GETLEFTBITS_ALIGNMENT 1 #define AVOID_MEMORY_READ #define FAST_CONSTANT_OFFSET_MODE #define LARGE_INSTRUCTION_CACHE @@ -457,18 +508,20 @@ #endif +/* linux on the Compaq Itsy */ +#if defined(linux) && defined(__arm__) +#define IMAGE_BYTE_ORDER LSBFirst +#define BITMAP_BIT_ORDER LSBFirst +#define GLYPHPADBYTES 4 +#define GETLEFTBITS_ALIGNMENT 1 +#endif + /* size of buffer to use with GetImage, measured in bytes. There's obviously * a trade-off between the amount of stack (or whatever ALLOCATE_LOCAL gives * you) used and the number of times the ddx routine has to be called. - * - * for a 1024 x 864 bit monochrome screen with a 32 bit word we get - * 8192/4 words per buffer - * (1024/32) = 32 words per scanline - * 2048 words per buffer / 32 words per scanline = 64 scanlines per buffer - * 864 scanlines / 64 scanlines = 14 buffers to draw a full screen */ #ifndef IMAGE_BUFSIZE -#define IMAGE_BUFSIZE 8192 +#define IMAGE_BUFSIZE (64*1024) #endif /* pad scanline to a longword */ @@ -495,9 +548,13 @@ int padBytesLog2; /* log 2 (bytes per pad unit) */ int notPower2; /* bitsPerPixel not a power of 2 */ int bytesPerPixel; /* only set when notPower2 is TRUE */ + int bitsPerPixel; /* bits per pixel */ } PaddingInfo; extern PaddingInfo PixmapWidthPaddingInfo[]; +/* The only portable way to get the bpp from the depth is to look it up */ +#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel) + #define PixmapWidthInPadUnits(w, d) \ (PixmapWidthPaddingInfo[d].notPower2 ? \ (((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel + \ @@ -516,42 +573,8 @@ #define BitmapBytePad(w) \ (((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD) -#ifdef INTERNAL_VS_EXTERNAL_PADDING - -/* This is defined if the server's internal padding is different from the padding - * advertised in the protocol. The protocol does not allow for padding to - * 64 bits, for example, so if the server wants to use 64 bit padding internally, - * it has to advertise 32 bit padding and do padding fixups whenever images - * cross the wire. (See ProcGetImage and ProcPutImage.) - * - * The macros and constants that end in Proto or PROTO refer to the advertised - * padding, and the ones without Proto are for internal padding. - */ - -extern PaddingInfo PixmapWidthPaddingInfoProto[]; - -#define PixmapWidthInPadUnitsProto(w, d) \ - (PixmapWidthPaddingInfoProto[d].notPower2 ? \ - (((int)(w) * PixmapWidthPaddingInfoProto[d].bytesPerPixel + \ - PixmapWidthPaddingInfoProto[d].bytesPerPixel) >> \ - PixmapWidthPaddingInfoProto[d].padBytesLog2) : \ - ((int)((w) + PixmapWidthPaddingInfoProto[d].padRoundUp) >> \ - PixmapWidthPaddingInfoProto[d].padPixelsLog2)) - -#define PixmapBytePadProto(w, d) \ - (PixmapWidthInPadUnitsProto(w, d) << \ - PixmapWidthPaddingInfoProto[d].padBytesLog2) - -#define BitmapBytePadProto(w) \ - ((((w) + BITMAP_SCANLINE_PAD_PROTO - 1) >> LOG2_BITMAP_PAD_PROTO) \ - << LOG2_BYTES_PER_SCANLINE_PAD_PROTO) - -#else /* protocol and internal padding is the same */ - #define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d) #define PixmapBytePadProto(w, d) PixmapBytePad(w, d) #define BitmapBytePadProto(w) BitmapBytePad(w) -#endif /* protocol vs. internal padding */ - #endif /* SERVERMD_H */