From: <tj...@us...> - 2009-04-11 01:58:03
|
Revision: 12057 http://alleg.svn.sourceforge.net/alleg/?rev=12057&view=rev Author: tjaden Date: 2009-04-11 01:50:54 +0000 (Sat, 11 Apr 2009) Log Message: ----------- Delete code to emulate memcmp(). Everyone has memcmp(). We weren't checking for memcmp() in CMakeLists.txt so we were always using our own version, and also caused user programs to use it due to a macro. Modified Paths: -------------- allegro/branches/4.9/include/allegro5/internal/alconfig.h allegro/branches/4.9/include/allegro5/platform/alosxcfg.h allegro/branches/4.9/include/allegro5/platform/alqnxcfg.h allegro/branches/4.9/include/allegro5/platform/alucfg.h allegro/branches/4.9/src/libc.c Modified: allegro/branches/4.9/include/allegro5/internal/alconfig.h =================================================================== --- allegro/branches/4.9/include/allegro5/internal/alconfig.h 2009-04-11 01:49:44 UTC (rev 12056) +++ allegro/branches/4.9/include/allegro5/internal/alconfig.h 2009-04-11 01:50:54 UTC (rev 12057) @@ -313,12 +313,7 @@ #define strupr _alemu_strupr #endif -#ifdef ALLEGRO_NO_MEMCMP - AL_FUNC(int, _alemu_memcmp, (AL_CONST void *s1, AL_CONST void *s2, size_t num)); - #define memcmp _alemu_memcmp -#endif - /* endian-independent 3-byte accessor macros */ #ifdef ALLEGRO_LITTLE_ENDIAN Modified: allegro/branches/4.9/include/allegro5/platform/alosxcfg.h =================================================================== --- allegro/branches/4.9/include/allegro5/platform/alosxcfg.h 2009-04-11 01:49:44 UTC (rev 12056) +++ allegro/branches/4.9/include/allegro5/platform/alosxcfg.h 2009-04-11 01:50:54 UTC (rev 12057) @@ -43,10 +43,6 @@ #define ALLEGRO_NO_STRUPR #endif -#ifndef ALLEGRO_HAVE_MEMCMP -#define ALLEGRO_NO_MEMCMP -#endif - /* Arrange for other headers to be included later on */ #define ALLEGRO_EXTRA_HEADER "allegro5/platform/alosx.h" #define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintosx.h" Modified: allegro/branches/4.9/include/allegro5/platform/alqnxcfg.h =================================================================== --- allegro/branches/4.9/include/allegro5/platform/alqnxcfg.h 2009-04-11 01:49:44 UTC (rev 12056) +++ allegro/branches/4.9/include/allegro5/platform/alqnxcfg.h 2009-04-11 01:50:54 UTC (rev 12057) @@ -30,7 +30,6 @@ #define ALLEGRO_HAVE_STRICMP 1 #define ALLEGRO_HAVE_STRLWR 1 #define ALLEGRO_HAVE_STRUPR 1 -#define ALLEGRO_HAVE_MEMCMP 1 #define ALLEGRO_HAVE_MKSTEMP 1 #define ALLEGRO_HAVE_DIRENT_H 1 #define ALLEGRO_HAVE_SYS_UTSNAME_H 1 Modified: allegro/branches/4.9/include/allegro5/platform/alucfg.h =================================================================== --- allegro/branches/4.9/include/allegro5/platform/alucfg.h 2009-04-11 01:49:44 UTC (rev 12056) +++ allegro/branches/4.9/include/allegro5/platform/alucfg.h 2009-04-11 01:50:54 UTC (rev 12057) @@ -65,7 +65,3 @@ #ifndef ALLEGRO_HAVE_STRUPR #define ALLEGRO_NO_STRUPR #endif - -#ifndef ALLEGRO_HAVE_MEMCMP -#define ALLEGRO_NO_MEMCMP -#endif Modified: allegro/branches/4.9/src/libc.c =================================================================== --- allegro/branches/4.9/src/libc.c 2009-04-11 01:49:44 UTC (rev 12056) +++ allegro/branches/4.9/src/libc.c 2009-04-11 01:50:54 UTC (rev 12057) @@ -94,28 +94,6 @@ -#ifdef ALLEGRO_NO_MEMCMP - -/* _alemu_memcmp: - * Comparison of two memory blocks. - */ -int _alemu_memcmp(AL_CONST void *s1, AL_CONST void *s2, size_t num) -{ - size_t i; - ASSERT(s1); - ASSERT(s2); - - for (i=0; i<num; i++) - if (((unsigned char *)s1)[i] != ((unsigned char *)s2)[i]) - return ((((unsigned char *)s1)[i] < ((unsigned char *)s2)[i]) ? -1 : 1); - - return 0; -} - -#endif - - - /* _al_sane_realloc: * _AL_REALLOC() substitution with guaranteed behaviour. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |