1set	prototyped
2lib	catopen,nl_langinfo
3hdr	nl_types,langinfo
4nxt	nl_types
5
6tst	output{
7	#if !_lib_catopen
8	#undef	_hdr_nl_types
9	#endif
10	#include "FEATURE/limits"
11	#if _hdr_nl_types
12	#include <nl_types.h>
13	#endif
14
15	int
16	main()
17	{
18		printf("#include <limits.h>\n");
19	#if _hdr_nl_types && defined(_nxt_nl_types_str)
20		printf("#include <%s>	/* the native nl_types.h */\n", _nxt_nl_types_str);
21	#endif
22		printf("\n");
23	#ifndef NL_SETMAX
24		printf("#undef	NL_SETMAX\n");
25		printf("#define NL_SETMAX	1023\n");
26	#endif
27	#ifndef NL_MSGMAX
28		printf("#undef	NL_MSGMAX\n");
29		printf("#define NL_MSGMAX	32767\n");
30	#endif
31	#ifndef NL_SETD
32		printf("#undef	NL_SETD\n");
33		printf("#define NL_SETD		1\n");
34	#endif
35	#ifndef NL_CAT_LOCALE
36		printf("#undef	NL_CAT_LOCALE\n");
37		printf("#define NL_CAT_LOCALE	1\n");
38	#endif
39	#if _lib_catopen
40		printf("#undef	nl_catd\n");
41		printf("#define	nl_catd		_ast_nl_catd\n");
42		printf("#undef	catopen\n");
43		printf("#define catopen		_ast_catopen\n");
44		printf("#undef	catgets\n");
45		printf("#define	catgets		_ast_catgets\n");
46		printf("#undef	catclose\n");
47		printf("#define catclose	_ast_catclose\n");
48	#endif
49		printf("\n");
50		printf("typedef void* nl_catd;\n");
51		printf("\n");
52		printf("#if _BLD_ast && defined(__EXPORT__)\n");
53		printf("#define extern		__EXPORT__\n");
54		printf("#endif\n");
55		printf("\n");
56		printf("extern nl_catd		catopen(const char*, int);\n");
57		printf("extern char*		catgets(nl_catd, int, int, const char*);\n");
58		printf("extern int		catclose(nl_catd);\n");
59		printf("\n");
60		printf("#undef	extern\n");
61		printf("\n");
62		return 0;
63	}
64}end
65