align.h: support cygwin page size
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 24 May 2012 14:19:46 +0000 (10:19 -0400)
committerChristian Babeux <christian.babeux@efficios.com>
Tue, 27 Nov 2012 21:09:42 +0000 (16:09 -0500)
commit 8e3484cf85747d476302a2049dfa9741cc128b32 upstream.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
include/lttng/align.h

index 913327a8aac02d0db5a01db5f4fddb1676edf19e..4b3c1709945735c52497a09d7effa0b382af878b 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.024537 seconds and 4 git commands to generate.