summaryrefslogtreecommitdiff
path: root/bcc/align.h
diff options
context:
space:
mode:
Diffstat (limited to 'bcc/align.h')
-rw-r--r--bcc/align.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/bcc/align.h b/bcc/align.h
new file mode 100644
index 0000000..3c8971b
--- /dev/null
+++ b/bcc/align.h
@@ -0,0 +1,16 @@
+/* align.h - memory alignment requirements for bcc */
+
+/* Copyright (C) 1992 Bruce Evans */
+
+#ifndef S_ALIGNMENT
+# define align(x) (x)
+#else
+# ifdef UNPORTABLE_ALIGNMENT
+typedef unsigned pointerint_t;
+# define align(x) (((pointerint_t) (x) + (S_ALIGNMENT-1)) & ~(S_ALIGNMENT-1))
+# else
+# define align(x) ((char *) (x) + (- (int) (x) & (S_ALIGNMENT-1)))
+# endif
+#endif
+
+extern uoffset_t alignmask; /* general alignment mask */