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