db_server_globals.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 libraries 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. #ifndef _DB_SERVER_GLOBALS_H
  37. #define _DB_SERVER_GLOBALS_H
  38. #include <limits.h>
  39. #if !defined(NGROUPS)
  40. #define NGROUPS NGROUPS_MAX
  41. #endif
  42. #if defined(OPT_GARBAGE_THREADS)
  43. #include <synch.h>
  44. #endif // OPT_GARBAGE_THREADS
  45. extern uid_t _tt_uid;
  46. extern gid_t _tt_gid;
  47. extern gid_t _tt_gidlist [NGROUPS];
  48. extern int _tt_gidlen;
  49. extern int _tt_auth_level;
  50. #if defined(OPT_GARBAGE_THREADS)
  51. extern mutex_t rpc_client_busy; /* Used to sync calls with the RPC clients.*/
  52. extern mutex_t garbage_run_in_process;
  53. #define LOCK_RPC() mutex_lock(&rpc_client_busy);
  54. #define UNLOCK_RPC() mutex_unlock(&rpc_client_busy);
  55. #else /* Else if ! defined(OPT_GARBAGE_THREADS) */
  56. #define LOCK_RPC() /*EMPTY*/
  57. #define UNLOCK_RPC() /*EMPTY*/
  58. extern int _tt_garbage_id;
  59. extern char **global_argv;
  60. extern char **global_envp;
  61. #endif /* OPT_GARBAGE_THREADS */
  62. #endif /* _DB_SERVER_GLOBALS_H */