X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=os.hpp;h=4376c97b50eea2d55a548022907f429476a70196;hb=bb130e5395d472c8ce23012c8234b32ca38fa460;hp=eaf571db0926f0097c5ccbae6f22c450b8be5bb5;hpb=9a3984ee426e09de1a7588d0224574c97dba5d72;p=apitrace diff --git a/os.hpp b/os.hpp index eaf571d..4376c97 100644 --- a/os.hpp +++ b/os.hpp @@ -59,7 +59,29 @@ void ReleaseMutex(void); bool GetProcessName(char *str, size_t size); bool GetCurrentDir(char *str, size_t size); -void DebugMessage(const char *format, ...); +void DebugMessage(const char *format, ...) +#ifdef __GNUC__ + __attribute__ ((format (printf, 1, 2))) +#endif +; + +#if defined _WIN32 || defined __CYGWIN__ + /* We always use .def files on windows for now */ + #if 0 + #define PUBLIC __declspec(dllexport) + #else + #define PUBLIC + #endif + #define PRIVATE +#else + #if __GNUC__ >= 4 + #define PUBLIC __attribute__ ((visibility("default"))) + #define PRIVATE __attribute__ ((visibility("hidden"))) + #else + #define PUBLIC + #define PRIVATE + #endif +#endif /** * Get the current time in microseconds from an unknown base.