[MPlayer-dev-eng] [PATCH] __WORDSIZE
Björn Sandell
biorn at dce.chalmers.se
Fri Sep 13 16:53:01 CEST 2002
Howdy,
I got tired of beeing told that "You have misconfigured system" so I
whipped up this patch. Tested on RedHat, sparc/Solaris, OpenBSD and
AIX, all of them 32-bit systems.
Good enough?
Björn Sandell DCE/DFS Sysadmin IT department
Chalmers University of Technology www.dce.chalmers.se
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.564
diff -u -r1.564 configure
--- configure 9 Sep 2002 19:23:06 -0000 1.564
+++ configure 13 Sep 2002 14:01:51 -0000
@@ -1645,6 +1645,15 @@
fi
echores "$_inttypes"
+echocheck "word size"
+_mp_wordsize="#undef MP_WORDSIZE"
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <sys/types.h>
+int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; }
+EOF
+cc_check && _wordsize=`$TMPO` && _mp_wordsize="#define MP_WORDSIZE $_wordsize"
+echores "$_wordsize"
echocheck "stddef.h"
cat > $TMPC << EOF
@@ -4675,6 +4689,8 @@
/* Define this to any prefered value from 386 up to infinity with step 100 */
#define __CPU__ $iproc
+
+$_mp_wordsize
$_def_linux
Index: postproc/rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.55
diff -u -r1.55 rgb2rgb_template.c
--- postproc/rgb2rgb_template.c 29 Jun 2002 21:43:28 -0000 1.55
+++ postproc/rgb2rgb_template.c 13 Sep 2002 14:01:52 -0000
@@ -11,7 +11,7 @@
#include <stddef.h>
#include <inttypes.h> /* for __WORDSIZE */
-#ifndef __WORDSIZE
+#ifndef MP_WORDSIZE
#warning You have misconfigured system and probably will lose performance!
#endif
@@ -1403,7 +1403,7 @@
: "%eax"
);
#else
-#if __WORDSIZE >= 64
+#if MP_WORDSIZE >= 64
int i;
uint64_t *ldst = (uint64_t *) dst;
const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc;
More information about the MPlayer-dev-eng
mailing list