Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / tt / bin / ttdbserverd / db_server_globals.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*%%  (c) Copyright 1993, 1994 Hewlett-Packard Company                   */
24 /*%%  (c) Copyright 1993, 1994 International Business Machines Corp.     */
25 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                    */
26 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                              */
27 /*%%  $XConsortium: db_server_globals.h /main/6 1996/05/07 13:51:43 drk $                                                        */
28 /*
29  * db_server_globals.h - Declares the global variables that were defined
30  *                       in the old DB server and needed by the new DB
31  *                       server.
32  *
33  * Copyright (c) 1992 by Sun Microsystems, Inc.
34  *
35  */
36
37 #ifndef _DB_SERVER_GLOBALS_H
38 #define _DB_SERVER_GLOBALS_H
39
40 #include <limits.h>
41
42 #if defined(OPT_GARBAGE_THREADS)
43 #include <synch.h>
44 #endif // OPT_GARBAGE_THREADS
45
46 extern uid_t _tt_uid;
47 extern gid_t _tt_gid;
48 extern gid_t _tt_gidlist [NGROUPS_MAX];
49 extern int   _tt_gidlen;
50 extern int   _tt_auth_level;
51
52 #if defined(OPT_GARBAGE_THREADS)
53 extern mutex_t  rpc_client_busy; /* Used to sync calls with the RPC clients.*/
54 extern mutex_t  garbage_run_in_process;
55
56 #define         LOCK_RPC()      mutex_lock(&rpc_client_busy);
57 #define         UNLOCK_RPC()    mutex_unlock(&rpc_client_busy);
58
59 #else /* Else if ! defined(OPT_GARBAGE_THREADS) */
60
61 #define         LOCK_RPC()      /*EMPTY*/
62 #define         UNLOCK_RPC()    /*EMPTY*/
63
64 extern int        _tt_garbage_id;
65 extern char     **global_argv;
66 extern char     **global_envp;
67 #endif /* OPT_GARBAGE_THREADS */
68
69 #endif /* _DB_SERVER_GLOBALS_H */