From 83da606072ce272eb053d4e1497d77e647cfecae Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 3 Aug 2024 23:40:31 +0100 Subject: Revise syntax macros and add a ton of branch hints My new programming style is branch hints. All non-confusing branches must be hinted when I can be bothered. It's faster, sometimes, maybe. Also, start trying to use more signed sizes in at least some of the places where it makes sense. Unsigned sizes are surprisingly error-prone! --- src/os.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/os.h') diff --git a/src/os.h b/src/os.h index b599523..cbecf2c 100644 --- a/src/os.h +++ b/src/os.h @@ -24,9 +24,6 @@ #include // XXX: there's kind of a lot of junk in this header! -#define IMPORT __declspec(dllimport) // only needed for variables -#define EXPORT __declspec(dllexport) - typedef unsigned short os_char; #define _OS_CAT(x, y) x##y #define OS_LIT(x) _OS_CAT(L, x) @@ -75,13 +72,6 @@ typedef unsigned short os_char; #include // meh -#define IMPORT -#ifdef __GNUC__ -#define EXPORT __attribute__((visibility("default")) -#else -#define EXPORT int exp[-!!"compiler needs a way to export symbols!"]; -#endif - // trying to avoid pulling in unnecessary headers as much as possible: define // our own constants for os_mprot() / mprotect() #if defined(__linux__) // apparently linux is pretty much the sole oddball here! -- cgit v1.2.3