aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/hpux/fixade.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/hpux/fixade.h')
-rw-r--r--src/backend/port/hpux/fixade.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/backend/port/hpux/fixade.h b/src/backend/port/hpux/fixade.h
new file mode 100644
index 00000000000..62324eb05d7
--- /dev/null
+++ b/src/backend/port/hpux/fixade.h
@@ -0,0 +1,63 @@
+/*-------------------------------------------------------------------------
+ *
+ * fixade.h--
+ * compiler tricks to make things work while POSTGRES does non-native
+ * dereferences on PA-RISC.
+ *
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: fixade.h,v 1.1.1.1 1996/07/09 06:21:43 scrappy Exp $
+ *
+ * NOTES
+ * This must be included in EVERY source file.
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef FIXADE_H
+#define FIXADE_H
+
+#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 */
+
+#if defined(WEAK_C_OPTIMIZER)
+#pragma OPT_LEVEL 1
+#endif /* WEAK_C_OPTIMIZER */
+
+#endif /* !NOFIXADE */
+
+#endif /* FIXADE_H */