mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-25 05:11:29 +00:00
- Meh. Linux does not have itoa.
SVN r2211 (trunk)
This commit is contained in:
parent
635759ee2c
commit
4963f5d35a
2 changed files with 11 additions and 0 deletions
dumb
|
@ -1,5 +1,7 @@
|
||||||
cmake_minimum_required( VERSION 2.4 )
|
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
|
# 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.
|
# build here, since we're not maintaining DUMB, only using it.
|
||||||
# Comment out the below line to allow Debug builds.
|
# 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" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized" )
|
||||||
endif( CMAKE_COMPILER_IS_GNUC )
|
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 )
|
include_directories( include )
|
||||||
|
|
||||||
add_library( dumb
|
add_library( dumb
|
||||||
|
|
|
@ -1271,7 +1271,11 @@ DUH *DUMBEXPORT dumb_read_psm_quick(DUMBFILE *f, int subsong)
|
||||||
if ( ver )
|
if ( ver )
|
||||||
{
|
{
|
||||||
tag[2][0] = "FORMATVERSION";
|
tag[2][0] = "FORMATVERSION";
|
||||||
|
#if NEED_ITOA
|
||||||
|
sprintf(version, "%d", ver);
|
||||||
|
#else
|
||||||
itoa(ver, version, 10);
|
itoa(ver, version, 10);
|
||||||
|
#endif
|
||||||
tag[2][1] = (const char *) &version;
|
tag[2][1] = (const char *) &version;
|
||||||
++n_tags;
|
++n_tags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue