Search
lxdream.org :: lxdream :: r984:a01567058a47
lxdream 0.9.1
released Jun 29
Download Now
changeset984:a01567058a47
parent983:b0d0785aa194
child985:52e64faac752
authornkeynes
dateSun Feb 15 21:47:39 2009 +0000 (10 years ago)
Compile in C99 standards mode, albeit with -D_GNU_SOURCE. Helps portability slightly as well
configure
configure.in
src/drivers/joy_linux.c
src/sh4/sh4.c
src/sh4/sh4core.in
1.1 --- a/configure Mon Feb 09 00:18:08 2009 +0000
1.2 +++ b/configure Sun Feb 15 21:47:39 2009 +0000
1.3 @@ -7773,11 +7773,12 @@
1.4 { $as_echo "$as_me:$LINENO: result: GCC" >&5
1.5 $as_echo "GCC" >&6; }
1.6 CCOPT="-O2 -msse2 -mfpmath=sse"
1.7 - CFLAGS="$CFLAGS -fno-strict-aliasing"
1.8 + CFLAGS="$CFLAGS -fno-strict-aliasing -std=c99 -D_GNU_SOURCE"
1.9 elif test -n "$_ICC_VERSION"; then
1.10 { $as_echo "$as_me:$LINENO: result: ICC" >&5
1.11 $as_echo "ICC" >&6; }
1.12 CCOPT="$CFLAGS -fast"
1.13 + CFLAGS="$CFLAGS -fno-strict-aliasing -std=c99 -D_GNU_SOURCE"
1.14 else
1.15 { $as_echo "$as_me:$LINENO: result: Unknown" >&5
1.16 $as_echo "Unknown" >&6; }
2.1 --- a/configure.in Mon Feb 09 00:18:08 2009 +0000
2.2 +++ b/configure.in Sun Feb 15 21:47:39 2009 +0000
2.3 @@ -98,8 +98,9 @@
2.4 AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])
2.5
2.6 AC_CC_VERSION([ CCOPT="-O2 -msse2 -mfpmath=sse"
2.7 - CFLAGS="$CFLAGS -fno-strict-aliasing" ],
2.8 - [ CCOPT="$CFLAGS -fast" ],
2.9 + CFLAGS="$CFLAGS -fno-strict-aliasing -std=c99 -D_GNU_SOURCE" ],
2.10 + [ CCOPT="$CFLAGS -fast"
2.11 + CFLAGS="$CFLAGS -fno-strict-aliasing -std=c99 -D_GNU_SOURCE" ],
2.12 [ CCOPT="$CFLAGS -O2" ])
2.13
2.14 if test "x$enable_optimized" = "xyes"; then
3.1 --- a/src/drivers/joy_linux.c Mon Feb 09 00:18:08 2009 +0000
3.2 +++ b/src/drivers/joy_linux.c Sun Feb 15 21:47:39 2009 +0000
3.3 @@ -16,7 +16,9 @@
3.4 * GNU General Public License for more details.
3.5 */
3.6
3.7 +#ifndef _GNU_SOURCE
3.8 #define _GNU_SOURCE
3.9 +#endif
3.10 #include <sys/types.h>
3.11 #include <sys/ioctl.h>
3.12 #include <errno.h>
4.1 --- a/src/sh4/sh4.c Mon Feb 09 00:18:08 2009 +0000
4.2 +++ b/src/sh4/sh4.c Sun Feb 15 21:47:39 2009 +0000
4.3 @@ -35,6 +35,10 @@
4.4 #include "sh4/sh4trans.h"
4.5 #include "sh4/xltcache.h"
4.6
4.7 +#ifndef M_PI
4.8 +#define M_PI 3.14159265358979323846264338327950288
4.9 +#endif
4.10 +
4.11 void sh4_init( void );
4.12 void sh4_xlat_init( void );
4.13 void sh4_poweron_reset( void );
5.1 --- a/src/sh4/sh4core.in Mon Feb 09 00:18:08 2009 +0000
5.2 +++ b/src/sh4/sh4core.in Sun Feb 15 21:47:39 2009 +0000
5.3 @@ -1294,11 +1294,6 @@
5.4 CHECKFPUEN();
5.5 if( !IS_FPU_DOUBLEPREC() ) {
5.6 sh4_fsca( FPULi, (float *)&(DRF(FRn>>1)) );
5.7 - /*
5.8 - float angle = (((float)(FPULi&0xFFFF))/65536.0) * 2 * M_PI;
5.9 - FR(FRn) = sinf(angle);
5.10 - FR((FRn)+1) = cosf(angle);
5.11 - */
5.12 }
5.13 :}
5.14 FTRV XMTRX, FVn {:
.