[Scummvm-cvs-logs] CVS: scummvm configure,1.23,1.24

Max Horn fingolfin at users.sourceforge.net
Mon Jun 2 14:23:26 CEST 2003


Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1:/tmp/cvs-serv29707

Modified Files:
	configure 
Log Message:
revamped alignment test; don't delete config.log after configure run (after all it might be important to debug configure)

Index: configure
===================================================================
RCS file: /cvsroot/scummvm/scummvm/configure,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- configure	2 Jun 2003 12:17:51 -0000	1.23
+++ configure	2 Jun 2003 21:22:54 -0000	1.24
@@ -113,7 +113,7 @@
 #
 
 echo "Running ScummVM configure..."
-
+echo "Configure run on" `date` > $TMPLOG
 
 #
 # Check any parameters we received
@@ -310,25 +310,23 @@
 #
 # Check whether memory alignment is required
 #
-echo -n "Alignment required (don't worry if this shows a 'Bus error')... "
+echo -n "Alignment required... "
 cat > $TMPC << EOF
+#include <stdlib.h>
+#include <signal.h>
 int main(int argc, char **argv)
 {
-	int i;
-	unsigned char buf[20];
-	for (i = 0; i < 20; i++)
-		buf[i] = 0xE7;
-	for (i = 0; i < 16; i++) {
-		if (*(int *)(&buf[i]) != 0xE7E7E7E7)
-			return 1;
-		*(int *)(&buf[i]) = 0xE7E7E7E7;
+	unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 };
+	signal(SIGBUS, exit);
+	signal(SIGABRT, exit);
+	signal(SIGSEGV, exit);
+	if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) {
+		return 1;
 	}
 	return 0;
 }
 EOF
 _need_memalign=yes
-# TODO: Hide the "Bus error" message, if possible...
-trap true BUS
 cc_check && ./$TMPO && _need_memalign=no
 if test "$_need_memalign" = yes ; then
   _def_align='#define SCUMM_NEED_ALIGNMENT'
@@ -405,7 +403,7 @@
 fi
 echo "$_alsa"
 
-rm -f $TMPC $TMPO $TMPLOG
+rm -f $TMPC $TMPO
 
 
 echo





More information about the Scummvm-git-logs mailing list