mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-26 15:11:01 +00:00
Reformat code + small fixes
This commit is contained in:
@@ -1,49 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define OS_WINDOWS
|
||||
#define OS_WINDOWS
|
||||
#elif defined(__APPLE__) || defined(__MACH__)
|
||||
#define OS_MAC
|
||||
#define OS_MAC
|
||||
#elif defined(__linux__)
|
||||
#define OS_LINUX
|
||||
#define OS_LINUX
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
#define EXPORT_SYMBOL __declspec(dllexport)
|
||||
#define IMPORT_SYMBOL __declspec(dllimport)
|
||||
#define NO_INLINE __declspec(noinline)
|
||||
#define EXPORT_SYMBOL __declspec(dllexport)
|
||||
#define IMPORT_SYMBOL __declspec(dllimport)
|
||||
#define NO_INLINE __declspec(noinline)
|
||||
|
||||
#define DECLSPEC_ALIGN(n) __declspec(align(n))
|
||||
#define _fseeki64 _fseeki64
|
||||
#define _ftelli64 _ftelli64
|
||||
#define fopen_s fopen_s
|
||||
#define DECLSPEC_ALIGN(n) __declspec(align(n))
|
||||
|
||||
#define RESTRICTED_POINTER
|
||||
#define RESTRICTED_POINTER
|
||||
|
||||
#else
|
||||
#include <cstddef>
|
||||
|
||||
#define EXPORT_SYMBOL __attribute__((visibility("default")))
|
||||
#define IMPORT_SYMBOL
|
||||
#define NO_INLINE __attribute__((noinline))
|
||||
#include <cstddef>
|
||||
|
||||
#define DECLSPEC_ALIGN(n) alignas(n)
|
||||
#define fopen_s fopen
|
||||
#define EXPORT_SYMBOL __attribute__((visibility("default")))
|
||||
#define IMPORT_SYMBOL
|
||||
#define NO_INLINE __attribute__((noinline))
|
||||
|
||||
#define RESTRICTED_POINTER __restrict
|
||||
// TODO: warning stdcall problem
|
||||
#define WINAPI
|
||||
#define DECLSPEC_ALIGN(n) alignas(n)
|
||||
#define fopen_s fopen
|
||||
|
||||
#define RESTRICTED_POINTER __restrict
|
||||
|
||||
#ifdef OS_MAC
|
||||
#define _fseeki64 fseeko
|
||||
#define _ftelli64 ftello
|
||||
#define _stat64 stat
|
||||
#define _fseeki64 fseeko
|
||||
#define _ftelli64 ftello
|
||||
#define _stat64 stat
|
||||
#else
|
||||
#define _fseeki64 fseeko64
|
||||
#define _ftelli64 ftello64
|
||||
#define _stat64 stat64
|
||||
#define _fseeki64 fseeko64
|
||||
#define _ftelli64 ftello64
|
||||
#define _stat64 stat64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user