align.h: support cygwin page size
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 24 May 2012 14:19:46 +0000 (10:19 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 24 May 2012 14:19:46 +0000 (10:19 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/align.h

index 9154051e33e59363cf24ee77a065dd675ab976b6..f2163e08d56c74918e026347ef43e3054c3c05cb 100644 (file)
 
 #include <lttng/bug.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 PAGE_MASK              (~(PAGE_SIZE - 1))
 #define __ALIGN_MASK(v, mask)  (((v) + (mask)) & ~(mask))
 #define ALIGN(v, align)                __ALIGN_MASK(v, (typeof(v)) (align) - 1)
This page took 0.024611 seconds and 4 git commands to generate.