/* ----------------------------------------------------------------
 *   FILE
 *	fixade.h
 *
 *   DESCRIPTION
 *	compiler tricks to make things work while POSTGRES does non-native
 *	dereferences on PA-RISC.
 *
 *   NOTES
 *	This must be included in EVERY source file.
 *
 *   IDENTIFICATION
 *	/usr/local/devel/postgres-4.2-devel/src/backend/port/hpux/RCS/fixade.h,v 1.1 1993/08/15 07:39:30 aoki Exp
 * ----------------------------------------------------------------
 */

#ifndef	FixadeIncluded		/* Include this file only once */
#define FixadeIncluded	1

#if !defined(NOFIXADE)
#if defined(HP_S500_ALIGN)
/* ----------------
 *	This cheesy hack turns ON unaligned-access fixup on H-P PA-RISC;
 *	the resulting object files contain code that explicitly handles
 *	realignment on reference, so it slows memory access down by a 
 *	considerable factor.  It must be used in conjunction with the +u 
 *	flag to cc.  The #pragma is included in c.h to be safe since EVERY 
 *	source file that performs unaligned access must contain the #pragma.
 * ----------------
 */
#pragma HP_ALIGN HPUX_NATURAL_S500

#if defined(BROKEN_STRUCT_INIT)
/* ----------------
 *	This is so bogus.  The HP-UX 9.01 compiler has totally broken
 *	struct initialization code.  It actually length-checks ALL 
 *	array initializations within structs against the FIRST one that 
 *	it sees (when #pragma HP_ALIGN HPUX_NATURAL_S500 is defined).. 
 *	we have to throw in this unused structure before struct varlena
 *	is defined.
 *
 *	XXX guess you don't need the #pragma anymore after all :-)
 *	since no one looks at this except me i think i'll just leave
 *	this here for now..
 * ----------------
 */
struct HP_WAY_BOGUS {
	char	hpwb_bogus[8192];
};
struct HP_TOO_BOGUS {
	int	hptb_bogus[8192];
};
#endif /* BROKEN_STRUCT_INIT */
#endif /* HP_S500_ALIGN */
#endif /* !NOFIXADE */

#endif /* !FixadeIncluded */
