xref: /titanic_41/usr/src/lib/libast/sparc/include/ast/ast_common.h (revision 3e14f97f673e8a630f076077de35afdd43dc1587)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1985-2010 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 /* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
23 #ifndef _AST_COMMON_H
24 #define _AST_COMMON_H	1
25 #define _sys_types	1	/* #include <sys/types.h> ok */
26 #define _hdr_pthread	1	/* #include <pthread.h> ok */
27 #define _hdr_stdarg	1	/* #include <stdarg.h> ok */
28 #define _hdr_stddef	1	/* #include <stddef.h> ok */
29 #define _hdr_stdint	1	/* #include <stdint.h> ok */
30 #define _hdr_inttypes	1	/* #include <inttypes.h> ok */
31 #define _hdr_unistd	1	/* #include <unistd.h> ok */
32 #define _hdr_time	1	/* #include <time.h> ok */
33 #define _sys_time	1	/* #include <sys/time.h> ok */
34 #define _sys_times	1	/* #include <sys/times.h> ok */
35 #define _hdr_stdlib	1	/* #include <stdlib.h> ok */
36 #define _typ_long_double	1	/* long double is a type */
37 #define _typ_size_t	1	/* size_t is a type */
38 #define _typ_ssize_t	1	/* ssize_t is a type */
39 #define _sys_stat	1	/* #include <sys/stat.h> ok */
40 #define _sys_socket	1	/* #include <sys/socket.h> ok */
41 #define _std_proto	1	/* standard C prototypes ok */
42 #define _ptr_void	1	/* standard C void* ok */
43 /* disable non-standard linux/gnu inlines */
44 #ifdef __GNUC__
45 #	undef	__OPTIMIZE_SIZE__
46 #	define	__OPTIMIZE_SIZE__	1
47 #endif
48 
49 /* __STD_C indicates that the language is ANSI-C or C++ */
50 #if !defined(__STD_C) && __STDC__
51 #	define	__STD_C		1
52 #endif
53 #if !defined(__STD_C) && (__cplusplus || c_plusplus)
54 #	define __STD_C		1
55 #endif
56 #if !defined(__STD_C) && _std_proto
57 #	define __STD_C		1
58 #endif
59 #if !defined(__STD_C)
60 #	define __STD_C		0
61 #endif
62 
63 /* extern symbols must be protected against C++ name mangling */
64 #ifndef _BEGIN_EXTERNS_
65 #	if __cplusplus || c_plusplus
66 #		define _BEGIN_EXTERNS_	extern "C" {
67 #		define _END_EXTERNS_	}
68 #	else
69 #		define _BEGIN_EXTERNS_
70 #		define _END_EXTERNS_
71 #	endif
72 #endif
73 
74 /* _ARG_ simplifies function prototyping among flavors of C */
75 #ifndef _ARG_
76 #	if __STD_C
77 #		define _ARG_(x)	x
78 #	else
79 #		define _ARG_(x)	()
80 #	endif
81 #endif
82 
83 /* _NIL_ simplifies defining nil pointers to a given type */
84 #ifndef _NIL_
85 #	define _NIL_(x)	((x)0)
86 #endif
87 
88 /* __INLINE__ is the inline keyword */
89 #if !defined(__INLINE__) && defined(__cplusplus)
90 #	define __INLINE__	inline
91 #endif
92 #if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
93 #	define __INLINE__	__inline
94 #endif
95 
96 /* Void_t is defined so that Void_t* can address any type */
97 #ifndef Void_t
98 #	if __STD_C
99 #		define Void_t		void
100 #	else
101 #		define Void_t		char
102 #	endif
103 #endif
104 
105 /* windows variants and veneers */
106 #if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
107 #	define _WINIX		1
108 #endif
109 
110 /* dynamic linked library external scope handling */
111 #ifdef __DYNAMIC__
112 #	undef	__DYNAMIC__
113 #	ifndef _DLL
114 #		define _DLL		1
115 #	endif
116 #endif
117 #if _dll_import
118 #	if _BLD_STATIC && !_BLD_DLL
119 #		undef	_DLL
120 #	else
121 #		if !_UWIN && !defined(_DLL)
122 #			define _DLL		1
123 #		endif
124 #	endif
125 #	if !defined(__EXPORT__) && _BLD_DLL
126 #		define __EXPORT__	__declspec(dllexport)
127 #	endif
128 #	if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
129 #		define __IMPORT__	__declspec(dllimport)
130 #	endif
131 #	if _BLD_DLL && _UWIN
132 #	define __DYNAMIC__(v)		(_ast_getdll()->_ast_ ## v)
133 #	endif
134 #endif
135 #if !defined(_astimport)
136 #	if defined(__IMPORT__) && defined(_DLL)
137 #		define _astimport	__IMPORT__
138 #	else
139 #		define _astimport	extern
140 #	endif
141 #endif
142 #if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
143 #	ifdef __STDC__
144 #	define __EXTERN__(T,obj)	extern T obj; T* _imp__ ## obj = &obj
145 #	define __DEFINE__(T,obj,val)	T obj = val; T* _imp__ ## obj = &obj
146 #	else
147 #	define __EXTERN__(T,obj)	extern T obj; T* _imp__/**/obj = &obj
148 #	define __DEFINE__(T,obj,val)	T obj = val; T* _imp__/**/obj = &obj
149 #	endif
150 #else
151 #	define __EXTERN__(T,obj)	extern T obj
152 #	define __DEFINE__(T,obj,val)	T obj = val
153 #endif
154 
155 #define _ast_LL	1	/* LL numeric suffix supported */
156 #define _ast_int1_t		char
157 #define _ast_int2_t		short
158 #define _ast_int4_t		int
159 #define _ast_int8_t		long long
160 #define _ast_intmax_t		_ast_int8_t
161 #define _ast_intswap		0
162 
163 #define _ast_flt4_t		float
164 #define _ast_flt8_t		double
165 #define _ast_flt16_t		long double
166 #define _ast_fltmax_t		_ast_flt16_t
167 #define _typ_int8_t	1	/* int8_t is a type */
168 #define _typ_uint8_t	1	/* uint8_t is a type */
169 #define _typ_int16_t	1	/* int16_t is a type */
170 #define _typ_uint16_t	1	/* uint16_t is a type */
171 #define _typ_int32_t	1	/* int32_t is a type */
172 #define _typ_uint32_t	1	/* uint32_t is a type */
173 #define _typ_int64_t	1	/* int64_t is a type */
174 #define _typ_uint64_t	1	/* uint64_t is a type */
175 #define _typ_intmax_t	1	/* intmax_t is a type */
176 #define _typ_uintmax_t	1	/* uintmax_t is a type */
177 
178 #ifndef va_listref
179 #ifndef	va_start
180 #if __STD_C
181 #include <stdarg.h>
182 #else
183 #include <varargs.h>
184 #endif
185 #endif
186 #define va_listref(p) (p)	/* pass va_list to varargs function */
187 #define va_listval(p) (p)	/* retrieve va_list from va_arg(ap,va_listarg) */
188 #define va_listarg va_list	/* va_arg() va_list type */
189 #endif
190 #ifndef _AST_STD_H
191 #	if __STD_C && _hdr_stddef
192 #	include	<stddef.h>
193 #	endif
194 #	if _sys_types
195 #	include	<sys/types.h>
196 #	endif
197 #	if _hdr_stdint
198 #	include	<stdint.h>
199 #	else
200 #		if _hdr_inttypes
201 #		include	<inttypes.h>
202 #		endif
203 #	endif
204 #endif
205 #if !_typ_size_t
206 #	define _typ_size_t	1
207 	typedef int size_t;
208 #endif
209 #if !_typ_ssize_t
210 #	define _typ_ssize_t	1
211 	typedef int ssize_t;
212 #endif
213 #ifndef _AST_STD_H
214 #	if !_def_map_ast
215 #		include <ast_map.h>
216 #	endif
217 #endif
218 
219 #endif
220