(LibretroDB) Build fixes

This commit is contained in:
twinaphex 2015-01-23 06:05:54 +01:00
parent fc82bd4d9d
commit aa5956bd28
5 changed files with 26 additions and 34 deletions

View File

@ -82,9 +82,9 @@ int libretrodb_create(
void * ctx
){
int rv;
off_t root;
uint64_t item_count = 0;
off_t root;
libretrodb_metadata_t md;
uint64_t item_count = 0;
struct rmsgpack_dom_value item = {};
libretrodb_header_t header = {};

View File

@ -11,6 +11,10 @@
#define MAGIC_NUMBER "RARCHDB"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libretrodb_query libretrodb_query_t;
typedef struct libretrodb
@ -126,4 +130,8 @@ int libretrodb_cursor_read_item(
struct rmsgpack_dom_value * out
);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -3,6 +3,10 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
enum rmsgpack_dom_type {
RDT_NULL = 0,
RDT_BOOL,
@ -64,8 +68,11 @@ int rmsgpack_dom_write(
int fd,
const struct rmsgpack_dom_value * obj
);
int rmsgpack_dom_read_into(
int fd,
...
);
int rmsgpack_dom_read_into(int fd, ...);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -18,34 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#if defined(_WIN32)
/* Much of this is copypasta from elsewhere, I don't know if it works. */
#define _WIN32_WINNT 0x501
#include <winsock2.h>
#include <ws2tcpip.h>
#define isagain(bytes) (false)
#define MSG_NOSIGNAL 0
#define close closesocket
#ifdef _MSC_VER
#pragma comment(lib, "ws2_32.lib")
#endif
#else
//#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
//#include <sys/un.h>
//#include <sys/stat.h>
//#include <netinet/in.h>
//#include <netinet/tcp.h>
//#include <arpa/inet.h>
#include <netdb.h>
#include <fcntl.h>
//#include <signal.h>
#include <errno.h>
#include <unistd.h>
#define isagain(bytes) (bytes<0 && (errno==EAGAIN || errno==EWOULDBLOCK))
#endif
#include "netplay_compat.h"
enum
{

View File

@ -29,6 +29,10 @@
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0
#endif
#define isagain(bytes) (false)
#elif defined(_XBOX)
#define NOD3D
#include <xtl.h>