Add libglade2 needed for virt-viewer
[fedora-mingw.git] / SDL / SDL-1.2.10-pagesize.patch
1 --- SDL-1.2.10/src/video/ps2gs/SDL_gsyuv.c.pagesize     2006-05-17 05:16:07.000000000 +0200
2 +++ SDL-1.2.10/src/video/ps2gs/SDL_gsyuv.c      2006-05-22 16:15:46.000000000 +0200
3 @@ -27,7 +27,8 @@
4  #include <unistd.h>
5  #include <sys/ioctl.h>
6  #include <sys/mman.h>
7 -#include <asm/page.h>          /* For definition of PAGE_SIZE */
8 +/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */
9 +#include <unistd.h>
10  
11  #include "SDL_video.h"
12  #include "SDL_gsyuv_c.h"
13 @@ -180,7 +181,7 @@
14  
15         /* Allocate a DMA area for pixel conversion */
16         bpp = this->screen->format->BytesPerPixel;
17 -       map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
18 +       map_offset = (mapped_len + ((int)sysconf(_SC_PAGE_SIZE) - 1)) & ~((int)sysconf(_SC_PAGE_SIZE) - 1);
19         hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
20                           width * height * bpp +
21                           hwdata->macroblocks * (16 * sizeof(long long)) +
22 --- SDL-1.2.10/src/video/Xext/Xxf86dga/XF86DGA.c.pagesize       2006-05-01 10:02:47.000000000 +0200
23 +++ SDL-1.2.10/src/video/Xext/Xxf86dga/XF86DGA.c        2006-05-22 16:15:25.000000000 +0200
24 @@ -18,7 +18,6 @@
25  #define HAS_MMAP_ANON
26  #include <sys/types.h>
27  #include <sys/mman.h>
28 -#include <asm/page.h>   /* PAGE_SIZE */
29  #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
30  #define HAS_GETPAGESIZE
31  #endif /* linux */
32 @@ -491,10 +490,6 @@
33      if (pagesize == -1)
34         pagesize = getpagesize();
35  #endif
36 -#ifdef PAGE_SIZE
37 -    if (pagesize == -1)
38 -       pagesize = PAGE_SIZE;
39 -#endif
40      if (pagesize == -1)
41         pagesize = 4096;
42  
43 --- SDL-1.2.10/src/video/fbcon/SDL_fbvideo.c.pagesize   2006-05-17 05:16:07.000000000 +0200
44 +++ SDL-1.2.10/src/video/fbcon/SDL_fbvideo.c    2006-05-22 16:16:05.000000000 +0200
45 @@ -29,7 +29,8 @@
46  #include <unistd.h>
47  #include <sys/ioctl.h>
48  #include <sys/mman.h>
49 -#include <asm/page.h>          /* For definition of PAGE_SIZE */
50 +/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */
51 +#include <unistd.h>
52  #include <linux/vt.h>
53  
54  #include "SDL_video.h"
55 @@ -547,7 +548,7 @@
56  
57         /* Memory map the device, compensating for buggy PPC mmap() */
58         mapped_offset = (((long)finfo.smem_start) -
59 -                       (((long)finfo.smem_start)&~(PAGE_SIZE-1)));
60 +                        (((long)finfo.smem_start)&~((int)sysconf(_SC_PAGE_SIZE)-1)));
61         mapped_memlen = finfo.smem_len+mapped_offset;
62         mapped_mem = do_mmap(NULL, mapped_memlen,
63                           PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0);