Sync usage with man page.
[netbsd-mini2440.git] / lib / libc / include / resolv_mt.h
blobf4f6c0a52a775ec672cb9fa8a071e20f47177f48
1 /* $NetBSD: resolv_mt.h,v 1.1.1.1 2009/04/12 15:33:32 christos Exp $ */
3 #ifndef _RESOLV_MT_H
4 #define _RESOLV_MT_H
6 #include <sys/types.h>
7 #include <netinet/in.h>
8 #include <arpa/nameser.h>
9 #include <resolv.h>
11 /* Access functions for the libresolv private interface */
13 int __res_enable_mt(void);
14 int __res_disable_mt(void);
16 /* Per-thread context */
18 typedef struct {
19 int no_hosts_fallback_private;
20 int retry_save;
21 int retry_private;
22 char inet_nsap_ntoa_tmpbuf[255*3];
23 char sym_ntos_unname[20];
24 char sym_ntop_unname[20];
25 char p_option_nbuf[40];
26 char p_time_nbuf[40];
27 char precsize_ntoa_retbuf[sizeof "90000000.00"];
28 char loc_ntoa_tmpbuf[sizeof
29 "1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"];
30 char p_secstodate_output[15];
31 } mtctxres_t;
33 /* Thread-specific data (TSD) */
35 mtctxres_t *___mtctxres(void);
36 #define mtctxres (___mtctxres())
38 /* Various static data that should be TSD */
40 #define sym_ntos_unname (mtctxres->sym_ntos_unname)
41 #define sym_ntop_unname (mtctxres->sym_ntop_unname)
42 #define inet_nsap_ntoa_tmpbuf (mtctxres->inet_nsap_ntoa_tmpbuf)
43 #define p_option_nbuf (mtctxres->p_option_nbuf)
44 #define p_time_nbuf (mtctxres->p_time_nbuf)
45 #define precsize_ntoa_retbuf (mtctxres->precsize_ntoa_retbuf)
46 #define loc_ntoa_tmpbuf (mtctxres->loc_ntoa_tmpbuf)
47 #define p_secstodate_output (mtctxres->p_secstodate_output)
49 #endif /* _RESOLV_MT_H */