|
|
cd0780f |
--- SDL-1.2.10/src/video/ps2gs/SDL_gsyuv.c.pagesize 2006-05-17 05:16:07.000000000 +0200
|
|
|
f5e99d4 |
+++ SDL-1.2.10/src/video/ps2gs/SDL_gsyuv.c 2006-05-22 16:15:46.000000000 +0200
|
|
|
f5e99d4 |
@@ -27,7 +27,8 @@
|
|
|
f5e99d4 |
#include <unistd.h>
|
|
|
cd0780f |
#include <sys/ioctl.h>
|
|
|
cd0780f |
#include <sys/mman.h>
|
|
|
f5e99d4 |
-#include <asm/page.h> /* For definition of PAGE_SIZE */
|
|
|
cd0780f |
+/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */
|
|
|
cd0780f |
+#include <unistd.h>
|
|
|
cd0780f |
|
|
|
cd0780f |
#include "SDL_video.h"
|
|
|
cd0780f |
#include "SDL_gsyuv_c.h"
|
|
|
f5e99d4 |
@@ -180,7 +181,7 @@
|
|
|
cd0780f |
|
|
|
cd0780f |
/* Allocate a DMA area for pixel conversion */
|
|
|
cd0780f |
bpp = this->screen->format->BytesPerPixel;
|
|
|
cd0780f |
- map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
|
|
|
cd0780f |
+ map_offset = (mapped_len + ((int)sysconf(_SC_PAGE_SIZE) - 1)) & ~((int)sysconf(_SC_PAGE_SIZE) - 1);
|
|
|
cd0780f |
hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
|
|
|
cd0780f |
width * height * bpp +
|
|
|
cd0780f |
hwdata->macroblocks * (16 * sizeof(long long)) +
|
|
|
cd0780f |
--- SDL-1.2.10/src/video/Xext/Xxf86dga/XF86DGA.c.pagesize 2006-05-01 10:02:47.000000000 +0200
|
|
|
f5e99d4 |
+++ SDL-1.2.10/src/video/Xext/Xxf86dga/XF86DGA.c 2006-05-22 16:15:25.000000000 +0200
|
|
|
f5e99d4 |
@@ -18,7 +18,6 @@
|
|
|
f5e99d4 |
#define HAS_MMAP_ANON
|
|
|
f5e99d4 |
#include <sys/types.h>
|
|
|
f5e99d4 |
#include <sys/mman.h>
|
|
|
f5e99d4 |
-#include <asm/page.h> /* PAGE_SIZE */
|
|
|
f5e99d4 |
#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
|
|
|
f5e99d4 |
#define HAS_GETPAGESIZE
|
|
|
f5e99d4 |
#endif /* linux */
|
|
|
f5e99d4 |
@@ -491,10 +490,6 @@
|
|
|
cd0780f |
if (pagesize == -1)
|
|
|
cd0780f |
pagesize = getpagesize();
|
|
|
cd0780f |
#endif
|
|
|
cd0780f |
-#ifdef PAGE_SIZE
|
|
|
cd0780f |
- if (pagesize == -1)
|
|
|
cd0780f |
- pagesize = PAGE_SIZE;
|
|
|
cd0780f |
-#endif
|
|
|
cd0780f |
if (pagesize == -1)
|
|
|
cd0780f |
pagesize = 4096;
|
|
|
cd0780f |
|
|
|
a911b43 |
--- SDL-1.2.10/src/video/fbcon/SDL_fbvideo.c.pagesize 2006-05-17 05:16:07.000000000 +0200
|
|
|
f5e99d4 |
+++ SDL-1.2.10/src/video/fbcon/SDL_fbvideo.c 2006-05-22 16:16:05.000000000 +0200
|
|
|
f5e99d4 |
@@ -29,7 +29,8 @@
|
|
|
f5e99d4 |
#include <unistd.h>
|
|
|
a911b43 |
#include <sys/ioctl.h>
|
|
|
a911b43 |
#include <sys/mman.h>
|
|
|
f5e99d4 |
-#include <asm/page.h> /* For definition of PAGE_SIZE */
|
|
|
cd0780f |
+/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */
|
|
|
a911b43 |
+#include <unistd.h>
|
|
|
a911b43 |
#include <linux/vt.h>
|
|
|
a911b43 |
|
|
|
a911b43 |
#include "SDL_video.h"
|
|
|
f5e99d4 |
@@ -547,7 +548,7 @@
|
|
|
a911b43 |
|
|
|
a911b43 |
/* Memory map the device, compensating for buggy PPC mmap() */
|
|
|
a911b43 |
mapped_offset = (((long)finfo.smem_start) -
|
|
|
a911b43 |
- (((long)finfo.smem_start)&~(PAGE_SIZE-1)));
|
|
|
cd0780f |
+ (((long)finfo.smem_start)&~((int)sysconf(_SC_PAGE_SIZE)-1)));
|
|
|
a911b43 |
mapped_memlen = finfo.smem_len+mapped_offset;
|
|
|
a911b43 |
mapped_mem = do_mmap(NULL, mapped_memlen,
|
|
|
a911b43 |
PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0);
|