forked from github/server
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
1181cae463
4 changed files with 20 additions and 13 deletions
|
@ -282,19 +282,19 @@ target_link_libraries(eressea bsd)
|
||||||
target_link_libraries(convert bsd)
|
target_link_libraries(convert bsd)
|
||||||
endif (HAVE_LIBBSD)
|
endif (HAVE_LIBBSD)
|
||||||
|
|
||||||
if (DB_FOUND)
|
if (SQLITE3_FOUND)
|
||||||
include_directories (${DB_INCLUDE_DIR})
|
|
||||||
target_link_libraries(convert ${DB_LIBRARIES})
|
|
||||||
target_link_libraries(eressea ${DB_LIBRARIES})
|
|
||||||
target_link_libraries(test_eressea ${DB_LIBRARIES})
|
|
||||||
add_definitions(-DUSE_DB)
|
|
||||||
elseif (SQLITE3_FOUND)
|
|
||||||
include_directories (${SQLITE3_INCLUDE_DIR})
|
include_directories (${SQLITE3_INCLUDE_DIR})
|
||||||
target_link_libraries(eressea ${SQLITE3_LIBRARIES})
|
target_link_libraries(eressea ${SQLITE3_LIBRARIES})
|
||||||
target_link_libraries(convert ${SQLITE3_LIBRARIES})
|
target_link_libraries(convert ${SQLITE3_LIBRARIES})
|
||||||
target_link_libraries(test_eressea ${SQLITE3_LIBRARIES})
|
target_link_libraries(test_eressea ${SQLITE3_LIBRARIES})
|
||||||
add_definitions(-DUSE_SQLITE)
|
add_definitions(-DUSE_SQLITE)
|
||||||
endif(DB_FOUND)
|
elseif (DB_FOUND)
|
||||||
|
include_directories (${DB_INCLUDE_DIR})
|
||||||
|
target_link_libraries(convert ${DB_LIBRARIES})
|
||||||
|
target_link_libraries(eressea ${DB_LIBRARIES})
|
||||||
|
target_link_libraries(test_eressea ${DB_LIBRARIES})
|
||||||
|
add_definitions(-DUSE_DB)
|
||||||
|
endif(SQLITE3_FOUND)
|
||||||
|
|
||||||
if (CURSES_FOUND)
|
if (CURSES_FOUND)
|
||||||
include_directories (${CURSES_INCLUDE_DIR})
|
include_directories (${CURSES_INCLUDE_DIR})
|
||||||
|
|
|
@ -480,6 +480,12 @@ static int tolua_write_reports(lua_State * L)
|
||||||
static int tolua_process_orders(lua_State * L)
|
static int tolua_process_orders(lua_State * L)
|
||||||
{
|
{
|
||||||
UNUSED_ARG(L);
|
UNUSED_ARG(L);
|
||||||
|
#if 0
|
||||||
|
order * ord = parse_order("@GIB xmis ALLES Gurgelkraut", default_locale);
|
||||||
|
assert(ord);
|
||||||
|
free_order(ord);
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
processorders();
|
processorders();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1160,6 @@ int eressea_run(lua_State *L, const char *luafile)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
global.vm_state = L;
|
global.vm_state = L;
|
||||||
|
|
||||||
/* push an error handling function on the stack: */
|
/* push an error handling function on the stack: */
|
||||||
lua_getglobal(L, "debug");
|
lua_getglobal(L, "debug");
|
||||||
lua_getfield(L, -1, "traceback");
|
lua_getfield(L, -1, "traceback");
|
||||||
|
|
|
@ -36,11 +36,11 @@ unit.test.c
|
||||||
|
|
||||||
SET(_DBFILES db/critbit.c)
|
SET(_DBFILES db/critbit.c)
|
||||||
|
|
||||||
IF(DB_FOUND)
|
IF(SQLITE3_FOUND)
|
||||||
SET(_DBFILES db/berkeley.c)
|
|
||||||
ELSEIF(SQLITE3_FOUND)
|
|
||||||
SET(_DBFILES db/sqlite.c)
|
SET(_DBFILES db/sqlite.c)
|
||||||
ENDIF(DB_FOUND)
|
ELSEIF(DB_FOUND)
|
||||||
|
SET(_DBFILES db/berkeley.c)
|
||||||
|
ENDIF(SQLITE3_FOUND)
|
||||||
|
|
||||||
SET(_FILES
|
SET(_FILES
|
||||||
${_DBFILES}
|
${_DBFILES}
|
||||||
|
|
|
@ -40,6 +40,8 @@ int db_driver_order_save(struct order_data *od)
|
||||||
db_recno_t recno;
|
db_recno_t recno;
|
||||||
|
|
||||||
assert(od && od->_str);
|
assert(od && od->_str);
|
||||||
|
memset(&key, 0, sizeof(DBT));
|
||||||
|
memset(&data, 0, sizeof(DBT));
|
||||||
key.data = &recno;
|
key.data = &recno;
|
||||||
key.size = key.ulen = sizeof(recno);
|
key.size = key.ulen = sizeof(recno);
|
||||||
key.flags = DB_DBT_USERMEM;
|
key.flags = DB_DBT_USERMEM;
|
||||||
|
|
Loading…
Reference in a new issue