xref: /titanic_52/usr/src/cmd/ast/libdll/i386/FEATURE/dll (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1*906afcb8SAndy Fiddaman
2*906afcb8SAndy Fiddaman/* : : generated by proto : : */
3*906afcb8SAndy Fiddaman/* : : generated from contrib/ast/src/lib/libdll/features/dll by iffe version 2012-07-17 : : */
4*906afcb8SAndy Fiddaman
5*906afcb8SAndy Fiddaman#ifndef _def_dll_dll
6*906afcb8SAndy Fiddaman#if !defined(__PROTO__)
7*906afcb8SAndy Fiddaman#  if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
8*906afcb8SAndy Fiddaman#    if defined(__cplusplus)
9*906afcb8SAndy Fiddaman#      define __LINKAGE__	"C"
10*906afcb8SAndy Fiddaman#    else
11*906afcb8SAndy Fiddaman#      define __LINKAGE__
12*906afcb8SAndy Fiddaman#    endif
13*906afcb8SAndy Fiddaman#    define __STDARG__
14*906afcb8SAndy Fiddaman#    define __PROTO__(x)	x
15*906afcb8SAndy Fiddaman#    define __OTORP__(x)
16*906afcb8SAndy Fiddaman#    define __PARAM__(n,o)	n
17*906afcb8SAndy Fiddaman#    if !defined(__STDC__) && !defined(__cplusplus)
18*906afcb8SAndy Fiddaman#      if !defined(c_plusplus)
19*906afcb8SAndy Fiddaman#      	define const
20*906afcb8SAndy Fiddaman#      endif
21*906afcb8SAndy Fiddaman#      define signed
22*906afcb8SAndy Fiddaman#      define void		int
23*906afcb8SAndy Fiddaman#      define volatile
24*906afcb8SAndy Fiddaman#      define __V_		char
25*906afcb8SAndy Fiddaman#    else
26*906afcb8SAndy Fiddaman#      define __V_		void
27*906afcb8SAndy Fiddaman#    endif
28*906afcb8SAndy Fiddaman#  else
29*906afcb8SAndy Fiddaman#    define __PROTO__(x)	()
30*906afcb8SAndy Fiddaman#    define __OTORP__(x)	x
31*906afcb8SAndy Fiddaman#    define __PARAM__(n,o)	o
32*906afcb8SAndy Fiddaman#    define __LINKAGE__
33*906afcb8SAndy Fiddaman#    define __V_		char
34*906afcb8SAndy Fiddaman#    define const
35*906afcb8SAndy Fiddaman#    define signed
36*906afcb8SAndy Fiddaman#    define void		int
37*906afcb8SAndy Fiddaman#    define volatile
38*906afcb8SAndy Fiddaman#  endif
39*906afcb8SAndy Fiddaman#  define __MANGLE__	__LINKAGE__
40*906afcb8SAndy Fiddaman#  if defined(__cplusplus) || defined(c_plusplus)
41*906afcb8SAndy Fiddaman#    define __VARARG__	...
42*906afcb8SAndy Fiddaman#  else
43*906afcb8SAndy Fiddaman#    define __VARARG__
44*906afcb8SAndy Fiddaman#  endif
45*906afcb8SAndy Fiddaman#  if defined(__STDARG__)
46*906afcb8SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p,a)
47*906afcb8SAndy Fiddaman#  else
48*906afcb8SAndy Fiddaman#    define __VA_START__(p,a)	va_start(p)
49*906afcb8SAndy Fiddaman#  endif
50*906afcb8SAndy Fiddaman#  if !defined(__INLINE__)
51*906afcb8SAndy Fiddaman#    if defined(__cplusplus)
52*906afcb8SAndy Fiddaman#      define __INLINE__	extern __MANGLE__ inline
53*906afcb8SAndy Fiddaman#    else
54*906afcb8SAndy Fiddaman#      if defined(_WIN32) && !defined(__GNUC__)
55*906afcb8SAndy Fiddaman#      	define __INLINE__	__inline
56*906afcb8SAndy Fiddaman#      endif
57*906afcb8SAndy Fiddaman#    endif
58*906afcb8SAndy Fiddaman#  endif
59*906afcb8SAndy Fiddaman#endif
60*906afcb8SAndy Fiddaman#if !defined(__LINKAGE__)
61*906afcb8SAndy Fiddaman#define __LINKAGE__		/* 2004-08-11 transition */
62*906afcb8SAndy Fiddaman#endif
63*906afcb8SAndy Fiddaman
64*906afcb8SAndy Fiddaman#define _def_dll_dll	1
65*906afcb8SAndy Fiddaman#define _sys_types	1	/* #include <sys/types.h> ok */
66*906afcb8SAndy Fiddaman#define _hdr_dlfcn	1	/* #include <dlfcn.h> ok */
67*906afcb8SAndy Fiddaman#define _LIB_dl	1	/* -ldl is a library */
68*906afcb8SAndy Fiddaman#define _lib_dlopen	1	/* dlopen() in default lib(s) */
69*906afcb8SAndy Fiddaman#define _DLL_NEXT_PATH	"/usr/lib/libc.so.1"
70*906afcb8SAndy Fiddaman
71*906afcb8SAndy Fiddaman#if defined(__MVS__) && !defined(__SUSV3)
72*906afcb8SAndy Fiddaman#define __SUSV3		1
73*906afcb8SAndy Fiddaman#endif
74*906afcb8SAndy Fiddaman#include <dlfcn.h>
75*906afcb8SAndy Fiddaman
76*906afcb8SAndy Fiddaman#define DLL_INFO_PREVER	0x0001	/* pre-suffix style version */
77*906afcb8SAndy Fiddaman#define DLL_INFO_DOTVER	0x0002	/* post-suffix style version */
78*906afcb8SAndy Fiddaman
79*906afcb8SAndy Fiddamantypedef unsigned long (*Dll_plugin_version_f) __PROTO__((void));
80*906afcb8SAndy Fiddamantypedef int (*Dllerror_f) __PROTO__((__V_*, __V_*, int, ...));
81*906afcb8SAndy Fiddaman
82*906afcb8SAndy Fiddamantypedef struct Dllinfo_s
83*906afcb8SAndy Fiddaman{
84*906afcb8SAndy Fiddaman	char**	sibling;	/* sibling dirs on $PATH */
85*906afcb8SAndy Fiddaman	char*	prefix;		/* library name prefix */
86*906afcb8SAndy Fiddaman	char*	suffix;		/* library name suffix */
87*906afcb8SAndy Fiddaman	char*	env;		/* library path env var */
88*906afcb8SAndy Fiddaman	int	flags;		/* DLL_INFO_* flags */
89*906afcb8SAndy Fiddaman#ifdef _DLLINFO_PRIVATE_
90*906afcb8SAndy Fiddaman	_DLLINFO_PRIVATE_
91*906afcb8SAndy Fiddaman#endif
92*906afcb8SAndy Fiddaman} Dllinfo_t;
93*906afcb8SAndy Fiddaman
94*906afcb8SAndy Fiddamantypedef struct Dllnames_s
95*906afcb8SAndy Fiddaman{
96*906afcb8SAndy Fiddaman	char*		id;
97*906afcb8SAndy Fiddaman	char*		name;
98*906afcb8SAndy Fiddaman	char*		base;
99*906afcb8SAndy Fiddaman	char*		type;
100*906afcb8SAndy Fiddaman	char*		opts;
101*906afcb8SAndy Fiddaman	char*		path;
102*906afcb8SAndy Fiddaman	char		data[1024];
103*906afcb8SAndy Fiddaman} Dllnames_t;
104*906afcb8SAndy Fiddaman
105*906afcb8SAndy Fiddamantypedef struct Dllent_s
106*906afcb8SAndy Fiddaman{
107*906afcb8SAndy Fiddaman	char*		path;
108*906afcb8SAndy Fiddaman	char*		name;
109*906afcb8SAndy Fiddaman#ifdef _DLLENT_PRIVATE_
110*906afcb8SAndy Fiddaman	_DLLENT_PRIVATE_
111*906afcb8SAndy Fiddaman#endif
112*906afcb8SAndy Fiddaman} Dllent_t;
113*906afcb8SAndy Fiddaman
114*906afcb8SAndy Fiddamantypedef struct Dllscan_s
115*906afcb8SAndy Fiddaman{
116*906afcb8SAndy Fiddaman	__V_*		pad;
117*906afcb8SAndy Fiddaman#ifdef _DLLSCAN_PRIVATE_
118*906afcb8SAndy Fiddaman	_DLLSCAN_PRIVATE_
119*906afcb8SAndy Fiddaman#endif
120*906afcb8SAndy Fiddaman} Dllscan_t;
121*906afcb8SAndy Fiddaman
122*906afcb8SAndy Fiddaman#if _BLD_dll && defined(__EXPORT__)
123*906afcb8SAndy Fiddaman#undef __MANGLE__
124*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__          __EXPORT__
125*906afcb8SAndy Fiddaman#endif
126*906afcb8SAndy Fiddaman
127*906afcb8SAndy Fiddamanextern __MANGLE__ Dllinfo_t*	dllinfo __PROTO__((void));
128*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dllplugin __PROTO__((const char*, const char*, const char*, unsigned long, unsigned long*, int, char*, size_t));
129*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
130*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dllfind __PROTO__((const char*, const char*, int, char*, size_t));
131*906afcb8SAndy Fiddamanextern __MANGLE__ Dllnames_t*	dllnames __PROTO__((const char*, const char*, Dllnames_t*));
132*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dll_lib __PROTO__((Dllnames_t*, unsigned long, Dllerror_f, __V_*));
133*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dllmeth __PROTO__((const char*, const char*, unsigned long));
134*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dllopen __PROTO__((const char*, int));
135*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dllnext __PROTO__((int));
136*906afcb8SAndy Fiddamanextern __MANGLE__ __V_*		dlllook __PROTO__((__V_*, const char*));
137*906afcb8SAndy Fiddamanextern __MANGLE__ int		dllcheck __PROTO__((__V_*, const char*, unsigned long, unsigned long*));
138*906afcb8SAndy Fiddamanextern __MANGLE__ unsigned long	dllversion __PROTO__((__V_*, const char*));
139*906afcb8SAndy Fiddamanextern __MANGLE__ char*		dllerror __PROTO__((int));
140*906afcb8SAndy Fiddaman
141*906afcb8SAndy Fiddamanextern __MANGLE__ Dllscan_t*	dllsopen __PROTO__((const char*, const char*, const char*));
142*906afcb8SAndy Fiddamanextern __MANGLE__ Dllent_t*	dllsread __PROTO__((Dllscan_t*));
143*906afcb8SAndy Fiddamanextern __MANGLE__ int		dllsclose __PROTO__((Dllscan_t*));
144*906afcb8SAndy Fiddaman
145*906afcb8SAndy Fiddaman#undef __MANGLE__
146*906afcb8SAndy Fiddaman#define __MANGLE__ __LINKAGE__
147*906afcb8SAndy Fiddaman
148*906afcb8SAndy Fiddaman#endif
149