xref: /illumos-gate/usr/src/contrib/ast/src/lib/libast/features/errno (revision b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f)
1*b30d1939SAndy Fiddamantst	dat_sys_nerr note{ sys_nerr in default libs }end compile{
2*b30d1939SAndy Fiddaman	extern int sys_nerr;
3*b30d1939SAndy Fiddaman	int f()
4*b30d1939SAndy Fiddaman	{
5*b30d1939SAndy Fiddaman		return sys_nerr > 0;
6*b30d1939SAndy Fiddaman	}
7*b30d1939SAndy Fiddaman}end
8*b30d1939SAndy Fiddaman
9*b30d1939SAndy Fiddamantst	def_errno_sys_nerr note{ sys_nerr declared in errno.h }end compile{
10*b30d1939SAndy Fiddaman	#include <errno.h>
11*b30d1939SAndy Fiddaman	int f()
12*b30d1939SAndy Fiddaman	{
13*b30d1939SAndy Fiddaman		return sys_nerr > 0;
14*b30d1939SAndy Fiddaman	}
15*b30d1939SAndy Fiddaman}end
16*b30d1939SAndy Fiddaman
17*b30d1939SAndy Fiddamantst	dat_sys_errlist note{ sys_errlist in default libs }end compile{
18*b30d1939SAndy Fiddaman	extern char* sys_errlist[];
19*b30d1939SAndy Fiddaman	int f()
20*b30d1939SAndy Fiddaman	{
21*b30d1939SAndy Fiddaman		return *sys_errlist[1] != 0;
22*b30d1939SAndy Fiddaman	}
23*b30d1939SAndy Fiddaman}end
24*b30d1939SAndy Fiddaman
25*b30d1939SAndy Fiddamantst	def_errno_sys_errlist note{ sys_errlist declared in errno.h }end compile{
26*b30d1939SAndy Fiddaman	#include <errno.h>
27*b30d1939SAndy Fiddaman	int f()
28*b30d1939SAndy Fiddaman	{
29*b30d1939SAndy Fiddaman		return *sys_errlist[1] != 0;
30*b30d1939SAndy Fiddaman	}
31*b30d1939SAndy Fiddaman}end
32