evas: don't redefine PAGE_SIZE if already defined

On OSX, we include mach.h (via the inlined locks API), which
already defines PAGE_SIZE.
This commit is contained in:
Jean Guyomarc'h 2016-08-29 10:35:21 +02:00 committed by Jean Guyomarc'h
parent 82808e2080
commit 9a82b17eff
1 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,9 @@ _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h,
Evas_Colorspace cspace,
/* inout */ int *l, int *r, int *t, int *b)
{
#define PAGE_SIZE (4 * 1024)
#ifndef PAGE_SIZE
# define PAGE_SIZE (4 * 1024)
#endif
#define HUGE_PAGE_SIZE (2 * 1024 * 1024)
#if defined (HAVE_SYS_MMAN_H) && (!defined (_WIN32))
# define ALIGN_TO_PAGE(Siz) (((Siz / PAGE_SIZE) + (Siz % PAGE_SIZE ? 1 : 0)) * PAGE_SIZE)