Blame tests/Performance/DND/import.h

Packit b099d7
/* $XConsortium: import.h /main/4 1995/07/15 21:01:29 drk $ */
Packit b099d7
/*
Packit b099d7
 * Motif
Packit b099d7
 *
Packit b099d7
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are free software; you can
Packit b099d7
 * redistribute them and/or modify them under the terms of the GNU
Packit b099d7
 * Lesser General Public License as published by the Free Software
Packit b099d7
 * Foundation; either version 2 of the License, or (at your option)
Packit b099d7
 * any later version.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are distributed in the hope that
Packit b099d7
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
 * PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
 * details.
Packit b099d7
 *
Packit b099d7
 * You should have received a copy of the GNU Lesser General Public
Packit b099d7
 * License along with these librararies and programs; if not, write
Packit b099d7
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
 * Floor, Boston, MA 02110-1301 USA
Packit b099d7
 */
Packit b099d7
/*
Packit b099d7
 * HISTORY
Packit b099d7
 */
Packit b099d7
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Set up the macros that control compiling just the parts of the source
Packit b099d7
 * wanted for the host and target libraries.
Packit b099d7
 *
Packit b099d7
 * Any given snatch of the source may be wanted in one or more of the
Packit b099d7
 * following places:
Packit b099d7
 *	+ the unshared library
Packit b099d7
 *	+ the target shared library
Packit b099d7
 *	+ the host shared library
Packit b099d7
 */
Packit b099d7
Packit b099d7
/* All code in affected modules should be bracketed by one or another of these*/
Packit b099d7
Packit b099d7
#ifdef MAKE_DATA_SHLIB
Packit b099d7
#  define MAKE_DATA_SHLIB 1
Packit b099d7
#else
Packit b099d7
#  undef  MAKE_DATA_SHLIB
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#ifdef MAKE_TEXT_SHLIB
Packit b099d7
#  define MAKE_TEXT_SHLIB 1
Packit b099d7
#else
Packit b099d7
#  undef  MAKE_TEXT_SHLIB
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#if MAKE_DATA_SHLIB
Packit b099d7
#  undef  sgi_TEXT_ONLY
Packit b099d7
#  define sgi_DATA_ONLY 1
Packit b099d7
#  undef  sgi_UNSHARED_ONLY
Packit b099d7
#  undef  sgi_TEXT_OR_UNSHARED
Packit b099d7
#  define sgi_DATA_OR_UNSHARED 1
Packit b099d7
#  define sgi_DATA_OR_TEXT 1
Packit b099d7
#  define sgi_SHARED_INITIALIZER(type, val) (type)__sgi_xmUninitialized
Packit b099d7
extern void __sgi_xmUninitialized();
Packit b099d7
#  define sgi_SHARED_INIT(adr, val) THIS SHOULDNT OCCUR
Packit b099d7
#  define SHARED_STATIC extern
Packit b099d7
/* Enable the commented-out bad systax once we get text/data separation */
Packit b099d7
#  define CALL_STAT /* STAT SHOULDN'T BE GETTING CALLED FROM THE DATA OBJECT */
Packit b099d7
Packit b099d7
#else /*MAKE_TEXT_SHLIB*/
Packit b099d7
#  if MAKE_TEXT_SHLIB
Packit b099d7
#    define sgi_TEXT_ONLY 1
Packit b099d7
#    undef  sgi_DATA_ONLY
Packit b099d7
#    undef  sgi_UNSHARED_ONLY
Packit b099d7
#    define sgi_TEXT_OR_UNSHARED 1
Packit b099d7
#    undef  sgi_DATA_OR_UNSHARED
Packit b099d7
#    define sgi_DATA_OR_TEXT 1
Packit b099d7
#    define sgi_SHARED_INITIALIZER(type, val) (type)__sgi_xmUninitialized
Packit b099d7
extern void __sgi_xmUninitialized();
Packit b099d7
#    define sgi_SHARED_INIT(adr, val) \
Packit b099d7
{if (__sgi_xmUninitialized!=(XtProc)(adr)) __sgi_xmUninitialized(); (adr)=(val);}
Packit b099d7
#    define SHARED_STATIC extern
Packit b099d7
#    define CALL_STAT (*__shlibXm_stat)
Packit b099d7
extern int      (*__shlibXm_stat)(const char *, struct stat *);
Packit b099d7
extern int __shlibXmVersion;
Packit b099d7
Packit b099d7
#  else
Packit b099d7
#    undef  sgi_TEXT_ONLY
Packit b099d7
#    undef  sgi_DATA_ONLY
Packit b099d7
#    define sgi_UNSHARED_ONLY 1
Packit b099d7
#    define sgi_TEXT_OR_UNSHARED 1
Packit b099d7
#    define sgi_DATA_OR_UNSHARED 1
Packit b099d7
#    undef  sgi_DATA_OR_TEXT
Packit b099d7
#    define sgi_SHARED_INITIALIZER(type, val) val
Packit b099d7
#    define sgi_SHARED_INIT(adr, val) THIS WHOLE ROUTINE SHOULD BE ifdefd OUT
Packit b099d7
#    define SHARED_STATIC static
Packit b099d7
#    define CALL_STAT stat
Packit b099d7
#  endif
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#define sgi_SUPERCLASS(val) sgi_SHARED_INITIALIZER(WidgetClass,(WidgetClass)val)
Packit b099d7
#define sgi_CHILDCLASS(val) sgi_SHARED_INITIALIZER(WidgetClass,(WidgetClass)val)
Packit b099d7
#define sgi_SECONDARYCLASS(val) sgi_SHARED_INITIALIZER(WidgetClass,(WidgetClass)val)
Packit b099d7
#define sgi_SUPERCLASS_INIT(struct,val) sgi_SHARED_INIT(struct.core_class.superclass,(WidgetClass)val)
Packit b099d7
#define sgi_SUPERCLASS_GADGET_INIT(struct,val) sgi_SHARED_INIT(struct.rect_class.superclass,(WidgetClass)val)
Packit b099d7
#define sgi_SUPERCLASS_OBJECT_INIT(struct,val) sgi_SHARED_INIT(struct.object_class.superclass,(WidgetClass)val)
Packit b099d7
#define sgi_CHILDCLASS_INIT(struct,val) sgi_SHARED_INIT(struct.desktop_class.child_class,(WidgetClass)val)
Packit b099d7
#define sgi_SECONDARYCLASS_INIT(struct,val) sgi_SHARED_INIT(struct.secondaryObjectClass,(WidgetClass)val)
Packit b099d7
Packit b099d7
/* DEBUG -- delete this VVVVV */
Packit b099d7
/* "MAKE_DATA_SHLIB" MAKE_DATA_SHLIB
Packit b099d7
/* "MAKE_TEXT_SHLIB" MAKE_TEXT_SHLIB
Packit b099d7
/* "sgi_TEXT_ONLY" sgi_TEXT_ONLY
Packit b099d7
/* "sgi_DATA_ONLY" sgi_DATA_ONLY
Packit b099d7
/* "sgi_UNSHARED_ONLY" sgi_UNSHARED_ONLY
Packit b099d7
/* "sgi_TEXT_OR_UNSHARED" sgi_TEXT_OR_UNSHARED
Packit b099d7
/* "sgi_DATA_OR_UNSHARED" sgi_DATA_OR_UNSHARED
Packit b099d7
/* "sgi_DATA_OR_TEXT" sgi_DATA_OR_TEXT
Packit b099d7
/* DEBUG -- delete this ^^^^^ */
Packit b099d7
Packit b099d7
#if defined ATTSHAREDLIB && MAKE_TEXT_SHLIB
Packit b099d7
Packit b099d7
/* Set up the definitions that will reference the jump table */
Packit b099d7
/* We include them from a separately generated file to shorten the
Packit b099d7
 * make process.  All .c files include import.h, so any change to this
Packit b099d7
 * file will require recompiling all .c's into .o's (which are
Packit b099d7
 * unshared).  By putting in the include of import.def.h under the
Packit b099d7
 * above ifdef, make depend will not recognize that the .o's depend on
Packit b099d7
 * import.def.h.  Since we want to force recompilation of the .to's,
Packit b099d7
 * the Makefile should explicitly make the .to's depend on import.def.h.
Packit b099d7
 */
Packit b099d7
#include "import.def.h"
Packit b099d7
Packit b099d7
/* import.def.h #define'd stat.  We need to undef it as this is both a
Packit b099d7
 * library entry point and a structure declared in stat.h.  to call stat,
Packit b099d7
 * use the call stat macro above.
Packit b099d7
 */
Packit b099d7
#undef stat
Packit b099d7
Packit b099d7
/* /* Hand additions */
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * UGLY -- Xt non-global routine from mit/lib/Xt/Converters.c
Packit b099d7
 * Not even other things in Xt use it.
Packit b099d7
 *
Packit b099d7
 * ResConvert.c and VendorE.c need it to build the shared library.
Packit b099d7
 */
Packit b099d7
 	extern void LowerCase(char *source, char *dest);
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * regex is not in an include file so define it here
Packit b099d7
 */
Packit b099d7
Packit b099d7
	extern char *regex(char *re, char *subject);
Packit b099d7
Packit b099d7
 
Packit b099d7
Packit b099d7
#endif /*ATTSHAREDLIB*/