1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-16 06:15:06 -05:00

Merged some FreeBSD fixes

This commit is contained in:
Perttu Ahola 2011-08-11 12:32:36 +03:00
commit 69fca4f3cb
3 changed files with 9 additions and 6 deletions

View File

@ -41,7 +41,6 @@ IF (WIN32)
DOC "gettext *iconv*.lib") DOC "gettext *iconv*.lib")
ENDIF(WIN32) ENDIF(WIN32)
IF(GETTEXT_INCLUDE_DIR AND GETTEXT_MSGFMT) IF(GETTEXT_INCLUDE_DIR AND GETTEXT_MSGFMT)
IF (WIN32) IF (WIN32)
# in the Win32 case check also for the extra linking requirements # in the Win32 case check also for the extra linking requirements
@ -49,6 +48,10 @@ IF(GETTEXT_INCLUDE_DIR AND GETTEXT_MSGFMT)
SET(GETTEXT_FOUND TRUE) SET(GETTEXT_FOUND TRUE)
ENDIF() ENDIF()
ELSE(WIN32) ELSE(WIN32)
# *BSD variants require special linkage as they don't use glibc
IF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
SET(GETTEXT_LIBRARY "intl")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
SET(GETTEXT_FOUND TRUE) SET(GETTEXT_FOUND TRUE)
ENDIF(WIN32) ENDIF(WIN32)
ENDIF() ENDIF()

View File

@ -173,7 +173,7 @@ include_directories(
${SQLITE3_INCLUDE_DIR} ${SQLITE3_INCLUDE_DIR}
) )
set(EXECUTABLE_OUTPUT_PATH ../bin) set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
if(BUILD_CLIENT) if(BUILD_CLIENT)
add_executable(${PROJECT_NAME} ${minetest_SRCS}) add_executable(${PROJECT_NAME} ${minetest_SRCS})

View File

@ -68,9 +68,9 @@ Nullstream dummyout;
void assert_fail(const char *assertion, const char *file, void assert_fail(const char *assertion, const char *file,
unsigned int line, const char *function) unsigned int line, const char *function)
{ {
DEBUGPRINT("\nIn thread %x:\n" DEBUGPRINT("\nIn thread %lx:\n"
"%s:%d: %s: Assertion '%s' failed.\n", "%s:%d: %s: Assertion '%s' failed.\n",
(unsigned int)get_current_thread_id(), (unsigned long)get_current_thread_id(),
file, line, function, assertion); file, line, function, assertion);
debug_stacks_print(); debug_stacks_print();
@ -95,8 +95,8 @@ DebugStack::DebugStack(threadid_t id)
void DebugStack::print(FILE *file, bool everything) void DebugStack::print(FILE *file, bool everything)
{ {
fprintf(file, "DEBUG STACK FOR THREAD %x:\n", fprintf(file, "DEBUG STACK FOR THREAD %lx:\n",
(unsigned int)threadid); (unsigned long)threadid);
for(int i=0; i<stack_max_i; i++) for(int i=0; i<stack_max_i; i++)
{ {