mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-21 09:11:22 +02:00
Moved the libc override macros to settings.h, and removed __VA_ARGS__
This commit is contained in:
11
aarch64.c
11
aarch64.c
@@ -2,17 +2,6 @@
|
|||||||
#include "libco.h"
|
#include "libco.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#if !defined(LIBCO_ASSERT)
|
|
||||||
#include <assert.h>
|
|
||||||
#define LIBCO_ASSERT(...) assert(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define LIBCO_MALLOC(...) malloc(__VA_ARGS__)
|
|
||||||
#define LIBCO_FREE(...) free(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#ifdef LIBCO_MPROTECT
|
#ifdef LIBCO_MPROTECT
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
11
amd64.c
11
amd64.c
@@ -2,17 +2,6 @@
|
|||||||
#include "libco.h"
|
#include "libco.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#if !defined(LIBCO_ASSERT)
|
|
||||||
#include <assert.h>
|
|
||||||
#define LIBCO_ASSERT(...) assert(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define LIBCO_MALLOC(...) malloc(__VA_ARGS__)
|
|
||||||
#define LIBCO_FREE(...) free(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
11
arm.c
11
arm.c
@@ -2,17 +2,6 @@
|
|||||||
#include "libco.h"
|
#include "libco.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#if !defined(LIBCO_ASSERT)
|
|
||||||
#include <assert.h>
|
|
||||||
#define LIBCO_ASSERT(...) assert(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define LIBCO_MALLOC(...) malloc(__VA_ARGS__)
|
|
||||||
#define LIBCO_FREE(...) free(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LIBCO_MPROTECT
|
#ifdef LIBCO_MPROTECT
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
6
ppc.c
6
ppc.c
@@ -4,12 +4,6 @@
|
|||||||
#include "libco.h"
|
#include "libco.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define LIBCO_MALLOC(...) malloc(__VA_ARGS__)
|
|
||||||
#define LIBCO_FREE(...) free(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@@ -6,12 +6,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define LIBCO_MALLOC(...) malloc(__VA_ARGS__)
|
|
||||||
#define LIBCO_FREE(...) free(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
12
settings.h
12
settings.h
@@ -26,6 +26,17 @@
|
|||||||
#define alignas(bytes)
|
#define alignas(bytes)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(LIBCO_ASSERT)
|
||||||
|
#include <assert.h>
|
||||||
|
#define LIBCO_ASSERT assert
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
||||||
|
#include <stdlib.h>
|
||||||
|
#define LIBCO_MALLOC malloc
|
||||||
|
#define LIBCO_FREE free
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define section(name) __declspec(allocate("." #name))
|
#define section(name) __declspec(allocate("." #name))
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
@@ -34,5 +45,6 @@
|
|||||||
#define section(name) __attribute__((section("." #name "#")))
|
#define section(name) __attribute__((section("." #name "#")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* if defined(LIBCO_C) */
|
/* if defined(LIBCO_C) */
|
||||||
#endif
|
#endif
|
||||||
|
11
x86.c
11
x86.c
@@ -2,17 +2,6 @@
|
|||||||
#include "libco.h"
|
#include "libco.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#if !defined(LIBCO_ASSERT)
|
|
||||||
#include <assert.h>
|
|
||||||
#define LIBCO_ASSERT(...) assert(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(LIBCO_MALLOC) || !defined(LIBCO_FREE)
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define LIBCO_MALLOC(...) malloc(__VA_ARGS__)
|
|
||||||
#define LIBCO_FREE(...) free(__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user