00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _UT_LinuxUtil_h_
00023 #define _UT_LinuxUtil_h_
00024
00025 #include "UT_API.h"
00026 #ifdef LINUX
00027
00028 #include <sched.h>
00029 #include <signal.h>
00030 #include <fcntl.h>
00031 #include <time.h>
00032 #include <errno.h>
00033 #include <sys/types.h>
00034 #include <sys/socket.h>
00035 #include <sys/time.h>
00036 #include <SYS/SYS_Types.h>
00037
00038
00039
00040
00041 #define PR_SADDR 1
00042 #define MP_NPROCS 0
00043 #define SO_REUSEPORT SO_REUSEADDR
00044
00045 #define CONF_INITUSERS 1
00046
00047 #define FNONBLK FNONBLOCK
00048
00049 #define ffloor(x) floorf(x)
00050 #define fceil(x) ceilf(x)
00051 #define fatan2(a,b) atan2(a,b)
00052 #define fcos(x) cosf(x)
00053 #define fsin(x) sinf(x)
00054 #define sigset(a,b) signal(a,b)
00055 #define sighold(a)
00056 #define sigrelse(a)
00057 #define sigignore(a)
00058 #define oserror() errno
00059
00060 #ifndef CLK_TCK
00061 #define CLK_TCK CLOCKS_PER_SEC
00062 #endif
00063
00064 #define sginap(a) UTnap(a*10)
00065
00066
00067
00068
00069 UT_API long UTnap(long ms);
00070
00071 UT_API void cftime (char *dest, char *fmt, time_t *now);
00072
00073 UT_API pid_t sproc (void (*)(void *), unsigned int flags = 0, void *args = 0);
00074
00075 UT_API int sysmp (int val, ...);
00076
00077 UT_API int msgctl (int msgid, int cmd);
00078 UT_API int usconfig (int flag, int data);
00079
00080 UT_API int fp_class_f (fpreal32 f);
00081
00082 #endif // LINUX
00083
00084 #endif // _UT_LinuxUtil_h_