fix builds on osx 10.4
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-04-13 13:46:25 -07:00
commit 728983b92c
5 changed files with 30 additions and 15 deletions

View file

@ -86,18 +86,17 @@
@end
@interface MilskoCocoaView : NSView {
NSBitmapImageRep* rep;
NSGraphicsContext* context;
MwBool valid;
CGColorSpaceRef space;
CGDataProviderRef provider;
NSRect givenRect;
float x;
float y;
float width;
float height;
MwBool _child;
IBOutlet NSViewController* viewController;
NSBitmapImageRep* rep;
NSGraphicsContext* context;
MwBool valid;
CGColorSpaceRef space;
CGDataProviderRef provider;
NSRect givenRect;
float x;
float y;
float width;
float height;
MwBool _child;
}
- (void)initRepAndContextWithWidth:(float)w Height:(float)h;

View file

@ -57,17 +57,26 @@
#define M_PI 3.14159265
#endif
/* Windows */
#if defined(_MILSKO) && defined(_WIN32)
#define MWDECL extern __declspec(dllexport)
#elif defined(_WIN32)
#define MWDECL extern __declspec(dllimport)
/* GCC/Clang */
/* First check if we have __has_attribute and can check for the existence of visibility */
#elif defined(__has_attribute)
#if __has_attribute(visibility)
#define MWDECL extern __attribute__((visibility("default")))
#else
#define MWDECL extern
#endif
/* It might be that we're on an old version of GCC (like the one Apple ships with older versions of Mac OS).
* If we're on gcc 3 or above, assume it's there
*/
#elif __GNUC__ >= 3
#define MWDECL extern __attribute__((visibility("default")))
#else
/* all else fails */
#define MWDECL extern
#endif