Added a test case
authorSam Lantinga
Tue, 21 Feb 2006 09:11:53 +0000
changeset 1405983df4f9c1c6
parent 1404 6f6c8ac0db15
child 1406 39ca9a4b22f3
Added a test case
test/testendian.c
     1.1 --- a/test/testendian.c	Tue Feb 21 08:48:12 2006 +0000
     1.2 +++ b/test/testendian.c	Tue Feb 21 09:11:53 2006 +0000
     1.3 @@ -14,6 +14,54 @@
     1.4  	Uint64 value64 = 0xEFBEADDECDAB3412LL;
     1.5  #endif
     1.6  
     1.7 +	printf("This system is running %s\n",
     1.8 +#if __AIX__
     1.9 +			"AIX"
    1.10 +#elif __AMIGA__
    1.11 +			"AmigaOS"
    1.12 +#elif __BEOS__
    1.13 +			"BeOS"
    1.14 +#elif __BSDI__
    1.15 +			"BSDI"
    1.16 +#elif __DREAMCAST__
    1.17 +			"Dreamcast"
    1.18 +#elif __FREEBSD__
    1.19 +			"FreeBSD"
    1.20 +#elif __HPUX__
    1.21 +			"HP-UX"
    1.22 +#elif __IRIX__
    1.23 +			"Irix"
    1.24 +#elif __LINUX__
    1.25 +			"Linux"
    1.26 +#elif __MACOS__
    1.27 +			"MacOS Classic"
    1.28 +#elif __MACOSX__
    1.29 +			"MacOS X"
    1.30 +#elif __NETBSD__
    1.31 +			"NetBSD"
    1.32 +#elif __OPENBSD__
    1.33 +			"OpenBSD"
    1.34 +#elif __OS2__
    1.35 +			"OS/2"
    1.36 +#elif __OSF__
    1.37 +			"OSF/1"
    1.38 +#elif __QNXNTO__
    1.39 +			"QNX Neutrino"
    1.40 +#elif __RISCOS__
    1.41 +			"RISC OS"
    1.42 +#elif __SOLARIS__
    1.43 +			"Solaris"
    1.44 +#elif __WIN32__
    1.45 +#ifdef _WIN32_WCE
    1.46 +			"Windows CE"
    1.47 +#else
    1.48 +			"Windows"
    1.49 +#endif
    1.50 +#else
    1.51 +			"an unknown operating system!"
    1.52 +#endif
    1.53 +			);
    1.54 +
    1.55  	printf("This is a %s endian machine.\n",
    1.56  		(SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big");
    1.57  	printf("Value 16 = 0x%X, swapped = 0x%X\n", value16, SDL_Swap16(value16));