1/***********************************************************************
2*                                                                      *
3*               This software is part of the ast package               *
4*          Copyright (c) 1985-2011 AT&T Intellectual Property          *
5*                      and is licensed under the                       *
6*                  Common Public License, Version 1.0                  *
7*                    by AT&T Intellectual Property                     *
8*                                                                      *
9*                A copy of the License is available at                 *
10*            http://www.opensource.org/licenses/cpl1.0.txt             *
11*         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
12*                                                                      *
13*              Information and Software Systems Research               *
14*                            AT&T Research                             *
15*                           Florham Park NJ                            *
16*                                                                      *
17*                 Glenn Fowler <gsf@research.att.com>                  *
18*                  David Korn <dgk@research.att.com>                   *
19*                   Phong Vo <kpv@research.att.com>                    *
20*                                                                      *
21***********************************************************************/
22#pragma prototyped
23/*
24 * Glenn Fowler
25 * AT&T Research
26 *
27 * universe support
28 *
29 * symbolic link external representation has trailing '\0' and $(...) style
30 * conditionals where $(...) corresponds to a kernel object (i.e., probably
31 * not environ)
32 *
33 * universe symlink conditionals use $(UNIVERSE)
34 */
35
36#ifndef _UNIVLIB_H
37#define _UNIVLIB_H
38
39#if defined(__STDPP__directive) && defined(__STDPP__hide)
40__STDPP__directive pragma pp:hide getuniverse readlink setuniverse symlink universe
41#else
42#define getuniverse	______getuniverse
43#define readlink	______readlink
44#define setuniverse	______setuniverse
45#define symlink		______symlink
46#define universe	______universe
47#endif
48
49#include <ast.h>
50#include <ls.h>
51#include <errno.h>
52
53#define UNIV_SIZE	9
54
55#if _cmd_universe && _sys_universe
56#include <sys/universe.h>
57#endif
58
59#if defined(__STDPP__directive) && defined(__STDPP__hide)
60__STDPP__directive pragma pp:nohide getuniverse readlink setuniverse symlink universe
61#else
62#undef	getuniverse
63#undef	readlink
64#undef	setuniverse
65#undef	symlink
66#undef	universe
67#endif
68
69#if _cmd_universe
70#ifdef NUMUNIV
71#define UNIV_MAX	NUMUNIV
72#else
73#define UNIV_MAX	univ_max
74extern char*		univ_name[];
75extern int		univ_max;
76#endif
77
78extern char		univ_cond[];
79extern int		univ_size;
80
81#else
82
83extern char		univ_env[];
84
85#endif
86
87extern int		getuniverse(char*);
88extern int		readlink(const char*, char*, int);
89extern int		setuniverse(int);
90extern int		symlink(const char*, const char*);
91extern int		universe(int);
92
93#endif
94