4 martin 1.3 // Licensed to The Open Group (TOG) under one or more contributor license
5 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
6 // this work for additional information regarding copyright ownership.
7 // Each contributor licenses this file to you under the OpenPegasus Open
8 // Source License; you may not use this file except in compliance with the
9 // License.
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining a
12 // copy of this software and associated documentation files (the "Software"),
13 // to deal in the Software without restriction, including without limitation
14 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 // and/or sell copies of the Software, and to permit persons to whom the
16 // Software is furnished to do so, subject to the following conditions:
17 //
18 // The above copyright notice and this permission notice shall be included
19 // in all copies or substantial portions of the Software.
20 //
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25 martin 1.3 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29 //////////////////////////////////////////////////////////////////////////
|
30 kumpf 1.2 */
31
32 #ifndef _Executor_Defines_h
33 #define _Executor_Defines_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Constants.h>
37 #include <assert.h>
38
39 /*
40 **==============================================================================
41 **
42 ** EXECUTOR_LINKAGE
43 **
44 ** Linkage macro used to export various functions in the executor. Since the
45 ** executor is a self-contained program, export linkage may seem unecessary
46 ** but the source files in this directory are also included in a test
47 ** library used to test some of the executor functions.
48 **
49 **==============================================================================
50 */
51 kumpf 1.2
52 #ifdef EXECUTOR_PLEASE_EXPORT
53 # define EXECUTOR_LINKAGE PEGASUS_EXPORT
54 #else
55 # define EXECUTOR_LINKAGE PEGASUS_IMPORT
56 #endif
57
58 /*
59 **==============================================================================
60 **
61 ** EXECUTOR_TRACE()
62 **
63 ** Handy macro for temporary source-level tracing and debugging.
64 **
65 **==============================================================================
66 */
67
68 #define EXECUTOR_TRACE printf("TRACE: %s(%d)\n", __FILE__, __LINE__)
69
70 /*
71 **==============================================================================
72 kumpf 1.2 **
73 ** EXECUTOR_RESTART()
74 **
75 ** Macro used to repeatedly restart (retry) a system call as long as the
76 ** errno is EINTR.
77 **
78 **==============================================================================
79 */
80
81 #define EXECUTOR_RESTART(F, X) while (((X = (F)) == -1) && (errno == EINTR))
82
83 /*
84 **==============================================================================
85 **
86 ** EXECUTOR_BUFFER_SIZE
87 **
88 ** General purpose buffer size (large enough for any file path or user
89 ** name).
90 **
91 **==============================================================================
92 */
93 kumpf 1.2
94 #define EXECUTOR_BUFFER_SIZE 4096
95
96 /*
97 **==============================================================================
98 **
99 ** FL
100 **
101 ** Shorthand macro for passing __FILE__ and __LINE__ arguments to a
102 ** function.
103 **
104 **==============================================================================
105 */
106
107 #define FL __FILE__, __LINE__
108
109 /*
110 **==============================================================================
111 **
112 ** CIMSERVERMAIN
113 **
114 kumpf 1.2 ** The name of the main CIM server program.
115 **
116 **==============================================================================
117 */
118
119 #define CIMSERVERMAIN "cimservermain"
120
121 /*
122 **==============================================================================
123 **
124 ** CIMSHUTDOWN
125 **
126 ** The name of the main CIM shutdown program.
127 **
128 **==============================================================================
129 */
130
131 #define CIMSHUTDOWN "cimshutdown"
132
133 /*
134 **==============================================================================
135 kumpf 1.2 **
136 ** CIMPROVAGT
137 **
138 ** The name of the provider agent program.
139 **
140 **==============================================================================
141 */
142
143 #define CIMPROVAGT "cimprovagt"
144
145 /*
146 **==============================================================================
147 **
148 ** CIMSERVERA
149 **
150 ** The name of the external PAM authentication program.
151 **
152 **==============================================================================
153 */
154
155 #define CIMSERVERA "cimservera"
156 kumpf 1.2
157 /*
158 **==============================================================================
159 **
160 ** EXIT_ON_POLICY_FAILURE
161 **
162 ** If this is defined, the executor exits on any policy failure.
163 **
164 **==============================================================================
165 */
166
167 #if 0
168 # define EXIT_ON_POLICY_FAILURE
169 #endif
170
171 /*
172 **==============================================================================
173 **
174 ** HAVE_MSG_CONTROL
175 **
176 ** Define this if the platform support Berkeley msg control structures.
177 kumpf 1.2 **
178 **==============================================================================
179 */
180
181 #if defined(PEGASUS_OS_LINUX)
182 # define HAVE_MSG_CONTROL
183 #endif
184
185 #endif /* _Executor_Defines_h */
|