mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Add rarchdb code to Makefile.common and griffin
This commit is contained in:
parent
789168510f
commit
11318eb669
@ -151,6 +151,14 @@ OBJ += frontend/frontend.o \
|
||||
record/ffemu.o \
|
||||
performance.o
|
||||
|
||||
# RarchDB
|
||||
|
||||
OBJ += rarchdb/bintree.o \
|
||||
rarchdb/db_parser.o \
|
||||
rarchdb/rarchdb.o \
|
||||
rarchdb/rmsgpack.o \
|
||||
rarchdb/rmsgpack_dom.o
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
ifeq ($(HAVE_STDIN_CMD), 1)
|
||||
|
@ -782,6 +782,15 @@ XML
|
||||
============================================================ */
|
||||
#include "../audio/utils.c"
|
||||
|
||||
/*============================================================
|
||||
RARCHDB
|
||||
============================================================ */
|
||||
#include "../rarchdb/bintree.c"
|
||||
#include "../rarchdb/db_parser.c"
|
||||
#include "../rarchdb/rarchdb.c"
|
||||
#include "../rarchdb/rmsgpack.c"
|
||||
#include "../rarchdb/rmsgpack_dom.c"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -353,6 +353,10 @@ int rarchdb_create_index(struct rarchdb *db, const char* name, const char *field
|
||||
rmsgpack_dom_value_free(&item);
|
||||
item_loc = rarchdb_tell(db);
|
||||
}
|
||||
|
||||
(void)rv;
|
||||
(void)idx_header_offset;
|
||||
|
||||
idx_header_offset = lseek(db->fd, 0, SEEK_END);
|
||||
strncpy(idx.name, name, 50);
|
||||
|
||||
|
@ -2,22 +2,7 @@
|
||||
#define __RARCHDB_MSGPACK_ENDIAN_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef INLINE
|
||||
#define INLINE inline
|
||||
#endif
|
||||
|
||||
static INLINE uint8_t is_little_endian(void)
|
||||
{
|
||||
union
|
||||
{
|
||||
uint16_t x;
|
||||
uint8_t y[2];
|
||||
} u;
|
||||
|
||||
u.x = 1;
|
||||
return u.y[0];
|
||||
}
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#define swap16(val) \
|
||||
((((uint16_t)(val) & 0x00ff) << 8) \
|
||||
|
@ -376,7 +376,6 @@ int rmsgpack_dom_read_into(int fd, ...)
|
||||
struct rmsgpack_dom_value map;
|
||||
int rv;
|
||||
const char* key_name;
|
||||
int value_type;
|
||||
struct rmsgpack_dom_value key;
|
||||
struct rmsgpack_dom_value *value;
|
||||
int64_t *int_value;
|
||||
@ -385,8 +384,13 @@ int rmsgpack_dom_read_into(int fd, ...)
|
||||
char *buff_value;
|
||||
uint64_t min_len;
|
||||
|
||||
int value_type = 0;
|
||||
|
||||
va_start(ap, fd);
|
||||
rv = rmsgpack_dom_read(fd, &map);
|
||||
|
||||
(void)value_type;
|
||||
|
||||
if (rv < 0)
|
||||
return rv;
|
||||
|
||||
@ -459,4 +463,3 @@ clean:
|
||||
rmsgpack_dom_value_free(&map);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user