#ifndef SERVERMD_H
#define SERVERMD_H 1
#ifdef vax
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst
#define GLYPHPADBYTES 1
#define GETLEFTBITS_ALIGNMENT 4
#define FAST_UNALIGNED_READS
#endif
#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
#if defined (hpux) || defined __hppa__
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#define AVOID_MEMORY_READ
#define FAST_CONSTANT_OFFSET_MODE
#define LARGE_INSTRUCTION_CACHE
#define PLENTIFUL_REGISTERS
#endif
#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#ifdef Lynx
#define BITMAP_SCANLINE_UNIT 8
#endif
#define LARGE_INSTRUCTION_CACHE
#define FAST_CONSTANT_OFFSET_MODE
#define PLENTIFUL_REGISTERS
#define AVOID_MEMORY_READ
#define FAST_MEMCPY
#endif
#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
#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
(defined(__uxp__) && (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
# define BITMAP_BIT_ORDER LSBFirst
#else
# define IMAGE_BYTE_ORDER MSBFirst
# define BITMAP_BIT_ORDER MSBFirst
#endif
#ifdef sparc
# define AVOID_MEMORY_READ
# define LARGE_INSTRUCTION_CACHE
# define FAST_CONSTANT_OFFSET_MODE
# define SHARED_IDCACHE
#endif
#ifdef mc68020
#define FAST_UNALIGNED_READS
#endif
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#endif
#if defined(AIXV3)
#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
#if defined(ibm032) || defined (ibm)
#ifdef i386
# define IMAGE_BYTE_ORDER LSBFirst
#else
# define IMAGE_BYTE_ORDER MSBFirst
#endif
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 1
#define GETLEFTBITS_ALIGNMENT 4
#ifdef i386
#define BITMAP_SCANLINE_UNIT 8
#endif
#endif
#if defined (M4310) || defined(M4315) || defined(M4317) || defined(M4319) || defined(M4330)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#define FAST_UNALIGNED_READS
#endif
#ifdef macII
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#endif
#if (defined(mips) || defined(__mips)) && !defined(sgi)
#if defined(MIPSEL) || defined(__MIPSEL__)
# define IMAGE_BYTE_ORDER LSBFirst
# define BITMAP_BIT_ORDER LSBFirst
# define GLYPHPADBYTES 4
# define GETLEFTBITS_ALIGNMENT 1
#else
# define IMAGE_BYTE_ORDER MSBFirst
# define BITMAP_BIT_ORDER MSBFirst
# 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
#if defined(__alpha) || defined(__alpha__) || defined(__alphaCross)
# 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 FAST_CONSTANT_OFFSET_MODE
# define LARGE_INSTRUCTION_CACHE
# define PLENTIFUL_REGISTERS
#endif
#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
#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
#if defined(__ia64__) || defined(ia64)
# 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 FAST_CONSTANT_OFFSET_MODE
# define LARGE_INSTRUCTION_CACHE
# define PLENTIFUL_REGISTERS
#endif
#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
#ifdef stellar
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 4
#define IMAGE_BUFSIZE (64*1024)
#define random rand
#endif
#ifdef luna
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#ifndef mc68000
#define FAST_CONSTANT_OFFSET_MODE
#define AVOID_MEMORY_READ
#define LARGE_INSTRUCTION_CACHE
#define PLENTIFUL_REGISTERS
#endif
#endif
#if (defined(SVR4) && defined(i386)) || \
defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || defined(__i386) || \
defined(__QNX__) || \
defined(__s390x__) || defined(__s390__)
#ifndef IMAGE_BYTE_ORDER
#define IMAGE_BYTE_ORDER LSBFirst
#endif
#ifndef BITMAP_BIT_ORDER
# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
# define BITMAP_BIT_ORDER MSBFirst
# else
# define BITMAP_BIT_ORDER LSBFirst
# endif
#endif
#ifndef BITMAP_SCANLINE_UNIT
# if defined(XF86MONOVGA) || defined(XF86VGA16)
# define BITMAP_SCANLINE_UNIT 8
# endif
#endif
#ifndef GLYPHPADBYTES
#define GLYPHPADBYTES 4
#endif
#define GETLEFTBITS_ALIGNMENT 1
#define AVOID_MEMORY_READ
#ifdef XSVGA
#define AVOID_GLYPHBLT
#define FAST_CONSTANT_OFFSET_MODE
#define FAST_MEMCPY
#define NO_ONE_RECT
#endif
#endif
#if defined (linux) && defined (__mc68000__)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define FAST_UNALIGNED_READS
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#endif
#ifdef sgi
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#define AVOID_MEMORY_READ
#define FAST_CONSTANT_OFFSET_MODE
#define LARGE_INSTRUCTION_CACHE
#define PLENTIFUL_REGISTERS
#endif
#if defined(linux) && defined(__arm__)
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#endif
#if defined (linux) && defined (__s390__)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
#define GETLEFTBITS_ALIGNMENT 1
#endif
#ifndef IMAGE_BUFSIZE
#define IMAGE_BUFSIZE (64*1024)
#endif
#ifndef BITMAP_SCANLINE_UNIT
#define BITMAP_SCANLINE_UNIT 32
#endif
#ifndef BITMAP_SCANLINE_PAD
#define BITMAP_SCANLINE_PAD 32
#define LOG2_BITMAP_PAD 5
#define LOG2_BYTES_PER_SCANLINE_PAD 2
#endif
typedef struct _PaddingInfo {
int padRoundUp;
int padPixelsLog2;
int padBytesLog2;
int notPower2;
int bytesPerPixel;
int bitsPerPixel;
} PaddingInfo;
extern PaddingInfo PixmapWidthPaddingInfo[];
#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel)
#define PixmapWidthInPadUnits(w, d) \
(PixmapWidthPaddingInfo[d].notPower2 ? \
(((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel + \
PixmapWidthPaddingInfo[d].bytesPerPixel) >> \
PixmapWidthPaddingInfo[d].padBytesLog2) : \
((int)((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
PixmapWidthPaddingInfo[d].padPixelsLog2))
#define PixmapBytePad(w, d) \
(PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
#define BitmapBytePad(w) \
(((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD)
#define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d)
#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
#define BitmapBytePadProto(w) BitmapBytePad(w)
#endif