~nutznboltz-deactivatedaccount/ubuntu/precise/gnutls26/fix-lp926350

« back to all changes in this revision

Viewing changes to lib/gl/netdb.in.h

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
Tags: 2.12.11-1
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Provide a netdb.h header file for systems lacking it (read: MinGW).
2
 
   Copyright (C) 2008-2010 Free Software Foundation, Inc.
 
2
   Copyright (C) 2008-2011 Free Software Foundation, Inc.
3
3
   Written by Simon Josefsson.
4
4
 
5
5
   This program is free software; you can redistribute it and/or modify
20
20
   It is intended to provide definitions and prototypes needed by an
21
21
   application.  */
22
22
 
23
 
#ifndef _GL_NETDB_H
 
23
#ifndef _@GUARD_PREFIX@_NETDB_H
24
24
 
25
25
#if __GNUC__ >= 3
26
26
@PRAGMA_SYSTEM_HEADER@
27
27
#endif
 
28
@PRAGMA_COLUMNS@
28
29
 
29
30
#if @HAVE_NETDB_H@
30
31
 
33
34
 
34
35
#endif
35
36
 
36
 
#ifndef _GL_NETDB_H
37
 
#define _GL_NETDB_H
 
37
#ifndef _@GUARD_PREFIX@_NETDB_H
 
38
#define _@GUARD_PREFIX@_NETDB_H
38
39
 
39
 
/* Get netdb.h definitions such as struct hostent for MinGW.  */
 
40
/* Get <netdb.h> definitions such as 'socklen_t' on IRIX 6.5 and OSF/1 4.0 and
 
41
   'struct hostent' on MinGW.  */
40
42
#include <sys/socket.h>
41
43
 
 
44
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
45
 
42
46
/* The definition of _GL_ARG_NONNULL is copied here.  */
43
47
 
44
48
/* The definition of _GL_WARN_ON_USE is copied here.  */
50
54
 
51
55
# if !@HAVE_STRUCT_ADDRINFO@
52
56
 
 
57
#  ifdef __cplusplus
 
58
extern "C" {
 
59
#  endif
 
60
 
 
61
#  if !GNULIB_defined_struct_addrinfo
53
62
/* Structure to contain information about address of a service provider.  */
54
63
struct addrinfo
55
64
{
62
71
  char *ai_canonname;           /* Canonical name for service location.  */
63
72
  struct addrinfo *ai_next;     /* Pointer to next in list.  */
64
73
};
 
74
#   define GNULIB_defined_struct_addrinfo 1
 
75
#  endif
 
76
 
 
77
#  ifdef __cplusplus
 
78
}
 
79
#  endif
 
80
 
65
81
# endif
66
82
 
67
83
/* Possible values for `ai_flags' field in `addrinfo' structure.  */
148
164
   socket addresses.
149
165
   For more details, see the POSIX:2001 specification
150
166
   <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
151
 
extern int getaddrinfo (const char *restrict nodename,
152
 
                        const char *restrict servname,
153
 
                        const struct addrinfo *restrict hints,
154
 
                        struct addrinfo **restrict res)
155
 
     _GL_ARG_NONNULL ((4));
 
167
_GL_FUNCDECL_SYS (getaddrinfo, int,
 
168
                  (const char *restrict nodename,
 
169
                   const char *restrict servname,
 
170
                   const struct addrinfo *restrict hints,
 
171
                   struct addrinfo **restrict res)
 
172
                  _GL_ARG_NONNULL ((4)));
156
173
# endif
 
174
_GL_CXXALIAS_SYS (getaddrinfo, int,
 
175
                  (const char *restrict nodename,
 
176
                   const char *restrict servname,
 
177
                   const struct addrinfo *restrict hints,
 
178
                   struct addrinfo **restrict res));
 
179
_GL_CXXALIASWARN (getaddrinfo);
157
180
 
158
181
# if !@HAVE_DECL_FREEADDRINFO@
159
182
/* Free `addrinfo' structure AI including associated storage.
160
183
   For more details, see the POSIX:2001 specification
161
184
   <http://www.opengroup.org/susv3xsh/getaddrinfo.html>.  */
162
 
extern void freeaddrinfo (struct addrinfo *ai) _GL_ARG_NONNULL ((1));
 
185
_GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai)
 
186
                                      _GL_ARG_NONNULL ((1)));
163
187
# endif
 
188
_GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai));
 
189
_GL_CXXALIASWARN (freeaddrinfo);
164
190
 
165
 
# if !@HAVE_DECL_GAI_STRERROR@
 
191
# if @REPLACE_GAI_STRERROR@
 
192
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
193
#   undef gai_strerror
 
194
#   define gai_strerror rpl_gai_strerror
 
195
#  endif
 
196
_GL_FUNCDECL_RPL (gai_strerror, const char *, (int ecode));
 
197
_GL_CXXALIAS_RPL (gai_strerror, const char *, (int ecode));
 
198
# else
 
199
#  if !@HAVE_DECL_GAI_STRERROR@
166
200
/* Convert error return from getaddrinfo() to a string.
167
201
   For more details, see the POSIX:2001 specification
168
202
   <http://www.opengroup.org/susv3xsh/gai_strerror.html>.  */
169
 
extern const char *gai_strerror (int ecode);
 
203
_GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode));
 
204
#  endif
 
205
_GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode));
170
206
# endif
 
207
_GL_CXXALIASWARN (gai_strerror);
171
208
 
172
209
# if !@HAVE_DECL_GETNAMEINFO@
173
210
/* Convert socket address to printable node and service names.
174
211
   For more details, see the POSIX:2001 specification
175
212
   <http://www.opengroup.org/susv3xsh/getnameinfo.html>.  */
176
 
extern int getnameinfo (const struct sockaddr *restrict sa, socklen_t salen,
 
213
_GL_FUNCDECL_SYS (getnameinfo, int,
 
214
                  (const struct sockaddr *restrict sa, socklen_t salen,
 
215
                   char *restrict node, socklen_t nodelen,
 
216
                   char *restrict service, socklen_t servicelen,
 
217
                   int flags)
 
218
                  _GL_ARG_NONNULL ((1)));
 
219
# endif
 
220
/* Need to cast, because on glibc systems, the seventh parameter is
 
221
                        unsigned int flags.  */
 
222
_GL_CXXALIAS_SYS_CAST (getnameinfo, int,
 
223
                       (const struct sockaddr *restrict sa, socklen_t salen,
177
224
                        char *restrict node, socklen_t nodelen,
178
225
                        char *restrict service, socklen_t servicelen,
179
 
                        int flags)
180
 
     _GL_ARG_NONNULL ((1));
181
 
# endif
 
226
                        int flags));
 
227
_GL_CXXALIASWARN (getnameinfo);
182
228
 
183
229
/* Possible flags for getnameinfo.  */
184
230
# ifndef NI_NUMERICHOST
216
262
 
217
263
#endif
218
264
 
219
 
#endif /* _GL_NETDB_H */
220
 
#endif /* _GL_NETDB_H */
 
265
#endif /* _@GUARD_PREFIX@_NETDB_H */
 
266
#endif /* _@GUARD_PREFIX@_NETDB_H */