N Sep 17 8791 Sam Lantinga Re: tks source released
authorSam Lantinga <slouken@libsdl.org>
Sun, 21 Sep 2003 18:32:04 +0000
changeset 720 f90d80d68071
parent 719 269c97e24da6
child 721 ab0656314eef
N Sep 17 8791 Sam Lantinga Re: tks source released Date: Sun, 07 Sep 2003 02:51:58 +0200 From: Stephane Marchesin Subject: [SDL] Two little patches Compiling SDL with a recent gcc (gcc 3.3.1, 3.3 doesn't have this behaviour) gives some nasty warnings : SDL_blit_A.c: In function `BlitRGBtoRGBSurfaceAlpha128MMX': SDL_blit_A.c:223: warning: integer constant is too large for "long" type SDL_blit_A.c:225: warning: integer constant is too large for "long" type SDL_blit_A.c:227: warning: integer constant is too large for "long" type [...] The first attached patch (longlongfix.patch) tells gcc to really treat those constants as unsigned long long and not long. The second patch (nasinclude.patch) fixes an include problem I had while compiling nas audio : when the <audio/audiolib.h> file lies in /usr/X11R6/include, a -I/usr/X11R6/include option is needed or the file isn't found.
Makefile.am
configure.in
src/video/SDL_blit_A.c
--- a/Makefile.am	Sun Sep 21 18:18:17 2003 +0000
+++ b/Makefile.am	Sun Sep 21 18:32:04 2003 +0000
@@ -105,3 +105,10 @@
 	mv SDL12 SDL-1.2
 	tar zcvf $(HOME)/SDL-1.2.tar.gz SDL-1.2
 	rm -rf SDL-1.2
+snapshot13:
+	cvs -d $(CVSROOT) login
+	cvs -d $(CVSROOT) checkout -r branch_1_3_x SDL12
+	(cd SDL12 && ./autogen.sh)
+	mv SDL12 SDL-1.3
+	tar zcvf $(HOME)/SDL-1.3.tar.gz SDL-1.3
+	rm -rf SDL-1.3
--- a/configure.in	Sun Sep 21 18:18:17 2003 +0000
+++ b/configure.in	Sun Sep 21 18:32:04 2003 +0000
@@ -415,7 +415,7 @@
         have_nas=no
         if test -r /usr/X11R6/include/audio/audiolib.h; then
             have_nas=yes
-            CFLAGS="$CFLAGS -DNAS_SUPPORT"
+            CFLAGS="$CFLAGS -DNAS_SUPPORT -I/usr/X11R6/include/"
             SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
             AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
             AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
--- a/src/video/SDL_blit_A.c	Sun Sep 21 18:18:17 2003 +0000
+++ b/src/video/SDL_blit_A.c	Sun Sep 21 18:32:04 2003 +0000
@@ -220,11 +220,11 @@
 	int dstskip = info->d_skip >> 2;
         Uint8 load[8];
   
-        *(Uint64 *)load = 0x00fefefe00fefefe;/* alpha128 mask */
+        *(Uint64 *)load = 0x00fefefe00fefefeULL;/* alpha128 mask */
         movq_m2r(*load, mm4); /* alpha128 mask -> mm4 */
-        *(Uint64 *)load = 0x0001010100010101;/* !alpha128 mask */
+        *(Uint64 *)load = 0x0001010100010101ULL;/* !alpha128 mask */
         movq_m2r(*load, mm3); /* !alpha128 mask -> mm3 */
-        *(Uint64 *)load = 0xFF000000FF000000;/* dst alpha mask */
+        *(Uint64 *)load = 0xFF000000FF000000ULL;/* dst alpha mask */
         movq_m2r(*load, mm7); /* dst alpha mask -> mm7 */
 	while(height--) {
             DUFFS_LOOP_DOUBLE2(
@@ -276,10 +276,10 @@
     					alpha, alpha, alpha, alpha};
 					
                 movq_m2r(*load, mm4); /* alpha -> mm4 */
-		*(Uint64 *)load = 0x00FF00FF00FF00FF;
+		*(Uint64 *)load = 0x00FF00FF00FF00FFULL;
                 movq_m2r(*load, mm3); /* mask -> mm3 */
 		pand_r2r(mm3, mm4); /* mm4 & mask -> 0A0A0A0A -> mm4 */
-		*(Uint64 *)load = 0xFF000000FF000000;/* dst alpha mask */
+		*(Uint64 *)load = 0xFF000000FF000000ULL;/* dst alpha mask */
 		movq_m2r(*load, mm7); /* dst alpha mask -> mm7 */
 		
 		while(height--) {
@@ -360,13 +360,13 @@
         Uint32 alpha = 0;
         Uint8 load[8];
 	                
-	*(Uint64 *)load = 0x00FF00FF00FF00FF;
+	*(Uint64 *)load = 0x00FF00FF00FF00FFULL;
         movq_m2r(*load, mm3); /* mask -> mm2 */
-	*(Uint64 *)load = 0x00FF000000000000;
+	*(Uint64 *)load = 0x00FF000000000000ULL;
         movq_m2r(*load, mm7); /* dst alpha mask -> mm2 */
-        *(Uint64 *)load = 0x00FFFFFF00FFFFFF;
+        *(Uint64 *)load = 0x00FFFFFF00FFFFFFULL;
         movq_m2r(*load, mm0); /* alpha 255 mask -> mm0 */
-        *(Uint64 *)load = 0xFF000000FF000000;
+        *(Uint64 *)load = 0xFF000000FF000000ULL;
         movq_m2r(*load, mm6); /* alpha 255 !mask -> mm6 */
 	while(height--) {
 	    DUFFS_LOOP4({
@@ -792,11 +792,11 @@
                 punpcklwd_r2r(mm0, mm0); /* 0A0A0A0A -> mm0 */
 	  
  	        /* Setup the 565 color channel masks */
-	        *(Uint64 *)load = 0xF800F800F800F800;
+	        *(Uint64 *)load = 0xF800F800F800F800ULL;
 		movq_m2r(*load, mm1); /* MASKRED -> mm1 */
-		*(Uint64 *)load = 0x07E007E007E007E0;
+		*(Uint64 *)load = 0x07E007E007E007E0ULL;
 		movq_m2r(*load, mm4); /* MASKGREEN -> mm4 */
-		*(Uint64 *)load = 0x001F001F001F001F;
+		*(Uint64 *)load = 0x001F001F001F001FULL;
 		movq_m2r(*load, mm7); /* MASKBLUE -> mm7 */
 		while(height--) {
                         DUFFS_LOOP_QUATRO2(
@@ -942,11 +942,11 @@
                 punpcklwd_r2r(mm0, mm0); /* 0A0A0A0A -> mm0 */
 	  
  	        /* Setup the 555 color channel masks */
-	        *(Uint64 *)load = 0x7C007C007C007C00;
+	        *(Uint64 *)load = 0x7C007C007C007C00ULL;
 		movq_m2r(*load, mm1); /* MASKRED -> mm1 */
-		*(Uint64 *)load = 0x03E003E003E003E0;
+		*(Uint64 *)load = 0x03E003E003E003E0ULL;
 		movq_m2r(*load, mm4); /* MASKGREEN -> mm4 */
-		*(Uint64 *)load = 0x001F001F001F001F;
+		*(Uint64 *)load = 0x001F001F001F001FULL;
 		movq_m2r(*load, mm7); /* MASKBLUE -> mm7 */
 		while(height--) {
                         DUFFS_LOOP_QUATRO2(