(LibretroDB) Build fixes
This commit is contained in:
parent
fc82bd4d9d
commit
aa5956bd28
|
@ -82,9 +82,9 @@ int libretrodb_create(
|
||||||
void * ctx
|
void * ctx
|
||||||
){
|
){
|
||||||
int rv;
|
int rv;
|
||||||
off_t root;
|
off_t root;
|
||||||
uint64_t item_count = 0;
|
|
||||||
libretrodb_metadata_t md;
|
libretrodb_metadata_t md;
|
||||||
|
uint64_t item_count = 0;
|
||||||
struct rmsgpack_dom_value item = {};
|
struct rmsgpack_dom_value item = {};
|
||||||
libretrodb_header_t header = {};
|
libretrodb_header_t header = {};
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,10 @@
|
||||||
|
|
||||||
#define MAGIC_NUMBER "RARCHDB"
|
#define MAGIC_NUMBER "RARCHDB"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct libretrodb_query libretrodb_query_t;
|
typedef struct libretrodb_query libretrodb_query_t;
|
||||||
|
|
||||||
typedef struct libretrodb
|
typedef struct libretrodb
|
||||||
|
@ -126,4 +130,8 @@ int libretrodb_cursor_read_item(
|
||||||
struct rmsgpack_dom_value * out
|
struct rmsgpack_dom_value * out
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
enum rmsgpack_dom_type {
|
enum rmsgpack_dom_type {
|
||||||
RDT_NULL = 0,
|
RDT_NULL = 0,
|
||||||
RDT_BOOL,
|
RDT_BOOL,
|
||||||
|
@ -64,8 +68,11 @@ int rmsgpack_dom_write(
|
||||||
int fd,
|
int fd,
|
||||||
const struct rmsgpack_dom_value * obj
|
const struct rmsgpack_dom_value * obj
|
||||||
);
|
);
|
||||||
int rmsgpack_dom_read_into(
|
|
||||||
int fd,
|
int rmsgpack_dom_read_into(int fd, ...);
|
||||||
...
|
|
||||||
);
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
29
net_http.c
29
net_http.c
|
@ -18,34 +18,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include "netplay_compat.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
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
#ifndef MSG_NOSIGNAL
|
||||||
|
#define MSG_NOSIGNAL 0
|
||||||
|
#endif
|
||||||
|
#define isagain(bytes) (false)
|
||||||
#elif defined(_XBOX)
|
#elif defined(_XBOX)
|
||||||
#define NOD3D
|
#define NOD3D
|
||||||
#include <xtl.h>
|
#include <xtl.h>
|
||||||
|
|
Loading…
Reference in New Issue