Merge pull request #103 from devnexen/develop

Backporting a pending MegaGlest PR.
This commit is contained in:
Andy Alt 2018-04-03 14:27:59 -05:00 committed by GitHub
commit 990b426314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -305,7 +305,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
add_definitions (-DMACOSX -D_DARWIN_C_SOURCE)
else()
add_definitions (-D_POSIX_C_SOURCE=1)
add_definitions (-D_POSIX_C_SOURCE=200809L)
endif ()
endif()

View File

@ -756,9 +756,9 @@ pair<bool,time_t> hasCachedFileCRCValue(string crcCacheFile, uint32 &value) {
char gitVer[500]="";
char actualFilePath[8096]="";
int readbytes = fscanf(fp,"%20ld,%20u,%20ld\n%499s\n%499s\n%8095s",
&refreshDate,
(long *)&refreshDate,
&crcValue,
&lastUpdateDate,
(long *)&lastUpdateDate,
&gameVer[0],
&gitVer[0],
&actualFilePath[0]);
@ -871,9 +871,9 @@ void writeCachedFileCRCValue(string crcCacheFile, uint32 &crcValue, string actua
string writeActualFileName = Shared::PlatformByteOrder::toCommonEndian(actualFileName);
fprintf(fp,"%20ld,%20u,%20ld",
Shared::PlatformByteOrder::toCommonEndian(refreshDate),
(long)Shared::PlatformByteOrder::toCommonEndian(refreshDate),
Shared::PlatformByteOrder::toCommonEndian(crcValue),
Shared::PlatformByteOrder::toCommonEndian(now));
(long)Shared::PlatformByteOrder::toCommonEndian(now));
fprintf(fp,"\n%s\n%s\n%s",
writeGameVer.c_str(),

View File

@ -10,9 +10,9 @@ IF(BUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS)
add_executable(g2xml g2xml.c g3dv4.h)
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
SET(CMAKE_INCLUDE_PATH /usr/local/include)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
find_package(LibXml2)
IF(LIBXML2_FOUND)