osx build

This commit is contained in:
Catherine Reprobate committed 2024-11-17 10:51:45 -08:00
1 parent 06dcbcc1b1
commit cea20b6f31
4 files changed
+17

No files matched your search

+2
View File
@@ -215,6 +215,8 @@ if(NOT GL_LIBRARY)
set(GL_LIBRARY opengl32)
elseif(NINTENDO_SWITCH)
set(GL_LIBRARY EGL glapi drm_nouveau)
elseif(APPLE)
set(GL_LIBRARY "-framework OpenGL")
else()
set(GL_LIBRARY GL)
endif()
+8
View File
@@ -31,10 +31,14 @@
#define _OS_LIBC_H_
#include "os_pfs.h"
#include "platform.h"
#ifndef PLATFORM_N64
#include <stdio.h>
#endif
#ifdef PLATFORM_OSX
#include <strings.h>
#endif
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
@@ -84,9 +88,13 @@ extern "C" {
/* byte string operations */
#ifndef PLATFORM_OSX
extern void bcopy(const void *, void *, size_t);
#endif
extern int bcmp(const void *, const void *, size_t);
#ifndef PLATFORM_OSX
extern void bzero(void *, size_t);
#endif
/* Printf */
+3
View File
@@ -6,6 +6,7 @@
#include <errno.h>
#include <PR/os_internal.h>
#include <PR/rcp.h>
#include "platform.h"
#include "system.h"
#include "input.h"
#include "video.h"
@@ -466,6 +467,7 @@ OSIntMask osSetIntMask(OSIntMask mask)
/* libc compatibility wrappers */
#ifndef PLATFORM_OSX
#ifndef HAVE_BZERO
void bzero(void *ptr, size_t size)
{
@@ -479,6 +481,7 @@ void bcopy(const void *src, void *dst, size_t n)
memcpy(dst, src, n);
}
#endif
#endif
#ifndef HAVE_BCMP
s32 bcmp(const void *s1, const void *s2, size_t n)
+4
View File
@@ -10,6 +10,10 @@
#elif defined(__linux__)
#define PLATFORM_POSIX 1
#define PLATFORM_LINUX 1
// add osx
#elif defined(__APPLE__)
#define PLATFORM_POSIX 1
#define PLATFORM_OSX 1
#else
// assume POSIX-compatible
#define PLATFORM_POSIX 1