14 #ifndef __UT_MBSDUtil_h__
15 #define __UT_MBSDUtil_h__
29 #include <sys/types.h>
30 #include <sys/socket.h>
34 #include "UT_Assert.h"
45 #define SO_REUSEPORT SO_REUSEADDR
48 #define SIGCLD SIGCHLD
52 #define CONF_INITUSERS 1
54 #define FNONBLK FNONBLOCK
56 #define sigset(a,b) signal(a,b)
60 #define oserror() errno
63 #define CLK_TCK CLOCKS_PER_SEC
66 #define sginap(a) UTnap(a*10)
75 UT_API long UTnap(
long ms);
77 UT_API void cftime (
char *dest,
char *fmt, time_t *now);
79 UT_API pid_t sproc (
void (*)(
void *),
unsigned int flags = 0,
void *
args = 0);
85 UT_API extern void UTclearHostnameCache();
88 UT_API void MBSDregisterThread();
92 UT_API void MBSDLoadURL(
const char* url);
94 UT_API void MBSDLoadDirectory(
const char* directory,
95 const char* selected_file =
nullptr);
103 UT_API void MBSDalert(
const char *msg,
const char *details);
105 UT_API float MBSDgetBackingScaleFactor(
int screen_idx);
107 UT_API bool UTisUserAnAdmin();
127 class UT_API UT_MBSDEnvironFix
131 ~UT_MBSDEnvironFix();
133 char **myOrigEnviron;
140 #import <Foundation/Foundation.h>
147 NSString * UTstackTraceForException(NSException * exception);
153 #endif // __UT_MBSDUtil_h__
GLsizei const GLchar *const * string
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
UT_API int UTgethostname(UT_String &host)
**If you just want to fire and args