HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_LinuxUtil.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_LinuxUtil.h ( UT Library, C++)
7  *
8  * COMMENTS:
9  *
10  * These functions replace the SGI forms with Linux forms.
11  *
12  */
13 
14 #ifndef _UT_LinuxUtil_h_
15 #define _UT_LinuxUtil_h_
16 
17 #include "UT_API.h"
18 #ifdef LINUX
19 
20 #include <sched.h>
21 #include <signal.h>
22 #include <fcntl.h>
23 #include <time.h>
24 #include <errno.h>
25 #include <sys/types.h>
26 #include <sys/socket.h>
27 #include <sys/time.h>
28 #include <SYS/SYS_Types.h>
29 
30 //
31 // Defines:
32 //
33 #define PR_SADDR 1
34 #define MP_NPROCS 0
35 #if !defined(SO_REUSEPORT)
36  #define SO_REUSEPORT SO_REUSEADDR
37 #endif
38 
39 #define CONF_INITUSERS 1
40 
41 #define FNONBLK FNONBLOCK
42 
43 #define sigset(a,b) signal(a,b)
44 #define sighold(a)
45 #define sigrelse(a)
46 #define sigignore(a)
47 #define oserror() errno
48 
49 #ifndef CLK_TCK
50 #define CLK_TCK CLOCKS_PER_SEC
51 #endif
52 
53 #define sginap(a) UTnap(a*10)
54 
55 //
56 // Functions:
57 //
58 UT_API long UTnap(long ms);
59 
60 UT_API void cftime (char *dest, char *fmt, time_t *now);
61 
62 UT_API pid_t sproc (void (*)(void *), unsigned int flags = 0, void *args = 0);
63 
64 UT_API int sysmp (int val, ...);
65 
66 UT_API int usconfig (int flag, int data);
67 
68 #endif // LINUX
69 
70 #endif // _UT_LinuxUtil_h_
GLbitfield flags
Definition: glcorearb.h:1595
#define UT_API
Definition: UT_API.h:12
GLboolean * data
Definition: glcorearb.h:130
GLuint GLfloat * val
Definition: glcorearb.h:1607
png_infop png_uint_32 flag
Definition: png.h:2242