projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
align header: define PAGE_SIZE
[babeltrace.git]
/
include
/
babeltrace
/
align.h
diff --git
a/include/babeltrace/align.h
b/include/babeltrace/align.h
index d5197cb42f5e6bb6b7d0ce991bb7088eff65749b..c5589c43aca6253a42470cb6b42214d5763ac943 100644
(file)
--- a/
include/babeltrace/align.h
+++ b/
include/babeltrace/align.h
@@
-18,6
+18,12
@@
*/
#include <babeltrace/compiler.h>
*/
#include <babeltrace/compiler.h>
+#include <unistd.h>
+#include <limits.h>
+
+#ifndef PAGE_SIZE /* Cygwin limits.h defines its own PAGE_SIZE */
+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE)
+#endif
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
This page took
0.024015 seconds
and
4
git commands to generate.