- Meh. Linux does not have itoa.

SVN r2211 (trunk)
This commit is contained in:
Randy Heit 2010-03-14 17:24:08 +00:00
parent 635759ee2c
commit 4963f5d35a
2 changed files with 11 additions and 0 deletions

View file

@ -1,5 +1,7 @@
cmake_minimum_required( VERSION 2.4 )
include( CheckFunctionExists )
# DUMB is much slower in a Debug build than a Release build, so we force a Release
# build here, since we're not maintaining DUMB, only using it.
# Comment out the below line to allow Debug builds.
@ -13,6 +15,11 @@ if( CMAKE_COMPILER_IS_GNUC )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized" )
endif( CMAKE_COMPILER_IS_GNUC )
CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS )
if( NOT ITOA_EXISTS )
add_definitions( -DNEED_ITOA=1 )
endif( NOT ITOA_EXISTS )
include_directories( include )
add_library( dumb

View file

@ -1271,7 +1271,11 @@ DUH *DUMBEXPORT dumb_read_psm_quick(DUMBFILE *f, int subsong)
if ( ver )
{
tag[2][0] = "FORMATVERSION";
#if NEED_ITOA
sprintf(version, "%d", ver);
#else
itoa(ver, version, 10);
#endif
tag[2][1] = (const char *) &version;
++n_tags;
}