#ident "@(#)server.h	1.23 91/09/14"

/*
 *   ----------------------------------------------------------------- 
 *          Copyright (C) 1986,1991  Sun Microsystems, Inc
 *                      All rights reserved. 
 *            Notice of copyright on this source code 
 *            product does not indicate publication. 
 *   
 *                    RESTRICTED RIGHTS LEGEND: 
 *   Use, duplication, or disclosure by the Government is subject 
 *   to restrictions as set forth in subparagraph (c)(1)(ii) of 
 *   the Rights in Technical Data and Computer Software clause at 
 *   DFARS 52.227-7013 and in similar clauses in the FAR and NASA 
 *   FAR Supplement. 
 *   ----------------------------------------------------------------- 
 */

#ifndef _server_h_
#define _server_h_

/*
 * server.h:
 *	This file contains the #defines et al which are selected by a
 *	given "build" configuration.
 *
 * Every file in the server is expected to include this header file.
 *
 *
 *	Supported configurations
 *		SUN4C
 *		SUN4
 *		SUN3C
 *		SUN3
 *		SUN386i
 *		SUN486i
 *		AT386
 */


/*
 *	Special cases for Sun
 */

#ifdef SUN4C_NEWS
# define SUN4C
# define NEWS_ONLY
#endif

#ifdef SUN4_NEWS
# define SUN4
# define NEWS_ONLY
#endif

#ifdef SUN3C_NEWS
# define SUN3C
# define NEWS_ONLY
#endif

#ifdef SUN3_NEWS
# define SUN3
# define NEWS_ONLY
#endif

#ifdef SUN4C_EVQ
# define SUN4C
# define EVQ
#endif

#ifdef SUN4_EVQ
# define SUN4
# define EVQ
#endif

#ifdef SUN3C_EVQ
# define SUN3C
# define EVQ
#endif

#ifdef SUN3_EVQ
# define SUN3
# define EVQ
#endif

#ifdef SUN4C	/* SS1 + cg6/bw2/cg3 */
# define SUN
# define BIGENDIAN
# undef  LITTLEENDIAN
# define WINDOWGRABBER
# define XINPUT
#endif	/* SUN4C */

#ifdef SUN4	/* 4/110, 4/260, ... */
# define SUN
# define BIGENDIAN
# undef  LITTLEENDIAN
# define WINDOWGRABBER
# define XINPUT
#endif	/* SUN4 */

#ifdef SUN4SVR4
# ifndef SYSV
# define SYSV
# endif
# define SUN
# define BIGENDIAN
# undef  LITTLEENDIAN
# define WINDOWGRABBER
# ifdef notyet
# define XINPUT
# endif
#endif	/* SUN4 */

#ifdef SUN3C	/* 3/80 */
# define SUN
# define BIGENDIAN
# undef  LITTLEENDIAN
# define WINDOWGRABBER
#endif /* SUN3C */

#ifdef SUN3 /* 3/xxx */
# define SUN
# define BIGENDIAN
# undef  LITTLEENDIAN
# define WINDOWGRABBER
#endif /* SUN3 */

#if defined(SUN386I) || defined (SUN486I) /* Roadrunner 386 or 486 */
# define SUN
# undef  BIGENDIAN
# define LITTLEENDIAN
#endif

#ifdef AT386	/* AT&T System Vr4 & EGA/VGA */
#endif

/*
 *	Global defines
 *
 * XNEWS		Always defined in Sun's window system source tree
 * SHARECANVAS		Canvas sharing
 * WINDOWGRABBER	Sun Direct Framebuffer interface
 * REFCOUNT_BY_FUNCTION
 * MULTI
 * TCPNODELAY
 * NOUNIXSOCKETS	to turn off Unix domain sockets
 * SUN_SECURE_RPC	to turn on secure RPC based authentication
 * FOLIO
 * I18NL3		Enable Internationalization level 3 messaging
 */

#ifndef XNEWS
#define XNEWS
#endif
#ifndef MERGE
#define MERGE
#endif
#ifndef MULTI
#define MULTI
#endif

#ifdef SUN
#ifndef ALLPLANES
#    define ALLPLANES
#endif
#ifndef SHARECANVAS
#    define SHARECANVAS 
#endif

#ifndef OWGX_OPTO_DAMAGE
#    define OWGX_OPTO_DAMAGE
#endif
#ifndef FOLIO
#    define FOLIO
#endif
#ifndef REFCOUNT_BY_FUNCTION
#    define REFCOUNT_BY_FUNCTION
#endif
#    undef  NOUNIXSOCKETS
#ifndef TCPNODELAY
#    define TCPNODELAY
#endif
#ifndef TCPCONN
#    define TCPCONN
#endif
#ifndef UNIXCONN
#    define UNIXCONN
#endif
#if !defined(SYSV) && !defined(DNETCONN)
#    define DNETCONN
#endif
#ifndef SUN_SECURE_RPC
#    define SUN_SECURE_RPC
#endif
#ifndef SHAPEEXT
#    define SHAPEEXT		/* X11R4 shape extension */
#endif
#ifndef MULTIBUF
#    define MULTIBUF		/* X11R4 multibuffering extension */
#endif
#    undef  I18NL3		/* We have dgettext() and friends */

/*
 *	Due to a bug in the SunOS 4.1 C compiler, you can not debug or gprof
 *	dynamically linked executables.  This define is intended to allow
 *	the developer to write code that uses dynamic loading (with dlopen()
 *	and friends) when production (optimized) builds are done, but use
 *	(say) static linking when a debug or gprof build is desired.
 *
 *	config/Compilers/SunOS41 defines both DEBUG and GPROF_HOOKS
 *	as appropriate
 */

#    if !defined(DEBUG) && !defined(GPROF_HOOKS)
#        define USE_DYNAMIC_LOADING
#    endif


/*
 * The vendor string identifies the vendor responsible for the
 * server executable.
 */
#    define VENDOR_STRING "X11/NeWS - Sun Microsystems Inc."


/*
 * The version number is the revision of the vendors server.
 *
 *  thousands digit signifies major release number
 *  hundreds digit signifies minor release number
 *  tens digit signifies patch release number
 *  ones digit signifies release number for specials
 *
 *  Table of Changes
 *
 *  Release         Definition
 *  -------         ----------
 *  0               1.0, 1.0.1
 *  1100            1.1
 *  2000            2.0
 *  3000            3.0
 *  3010	    3.0.1
 *
 *  etc.
 */
/* Temporary ifdef until SYSV becomes default build environment. */
#ifdef SYSV
#    define VENDOR_VERSION_NEWS	"3.010"
#    define VENDOR_VERSION_X11	3010
#else
#    define VENDOR_VERSION_NEWS	"3.000"
#    define VENDOR_VERSION_X11	3000
#endif

#define SH_NO_SMC

#    ifdef SHAPES
#        define SH_NO_CG8
#    endif /* SHAPES */
#endif /* SUN */

#endif	/*_server_h_*/

