~ubuntu-branches/ubuntu/raring/gnutls26/raring

« back to all changes in this revision

Viewing changes to gl/sys_socket.in.h

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler, 20_tests-select.diff
  • Date: 2011-11-15 19:10:06 UTC
  • mfrom: (12.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20111115191006-ewpl0pfwe6et0mra
Tags: 2.12.14-3
[20_tests-select.diff] Do not run gnulib test-select test anymore. The
test fails on kfreebsd-i386, the gnutls library does not use select().
Closes: #648247

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#else
41
41
/* Normal invocation convention.  */
42
42
 
43
 
#ifndef _GL_SYS_SOCKET_H
 
43
#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
44
44
 
45
45
#if @HAVE_SYS_SOCKET_H@
46
46
 
50
50
   <sys/types.h>.  */
51
51
# include <sys/types.h>
52
52
 
 
53
/* On FreeBSD 6.4, <sys/socket.h> defines some macros that assume that NULL
 
54
   is defined.  */
 
55
# include <stddef.h>
 
56
 
53
57
/* The include_next requires a split double-inclusion guard.  */
54
58
# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
55
59
 
57
61
 
58
62
#endif
59
63
 
60
 
#ifndef _GL_SYS_SOCKET_H
61
 
#define _GL_SYS_SOCKET_H
 
64
#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
 
65
#define _@GUARD_PREFIX@_SYS_SOCKET_H
62
66
 
63
67
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
64
68
 
104
108
 
105
109
#endif
106
110
 
 
111
/* Get struct iovec.  */
 
112
/* But avoid namespace pollution on glibc systems.  */
 
113
#if ! defined __GLIBC__
 
114
# include <sys/uio.h>
 
115
#endif
 
116
 
107
117
#if @HAVE_SYS_SOCKET_H@
108
118
 
109
119
/* A platform that has <sys/socket.h>.  */
142
152
   suggests that getaddrinfo should be available on all Windows
143
153
   releases. */
144
154
 
145
 
 
146
155
# if @HAVE_WINSOCK2_H@
147
156
#  include <winsock2.h>
148
157
# endif
173
182
 
174
183
# endif
175
184
 
 
185
/* Rudimentary 'struct msghdr'; this works as long as you don't try to
 
186
   access msg_control or msg_controllen.  */
 
187
struct msghdr {
 
188
  void *msg_name;
 
189
  socklen_t msg_namelen;
 
190
  struct iovec *msg_iov;
 
191
  int msg_iovlen;
 
192
  int msg_flags;
 
193
};
 
194
 
176
195
#endif
177
196
 
 
197
/* Fix some definitions from <winsock2.h>.  */
 
198
 
178
199
#if @HAVE_WINSOCK2_H@
179
200
 
180
201
# if !GNULIB_defined_rpl_fd_isset
203
224
 
204
225
#endif
205
226
 
 
227
/* Hide some function declarations from <winsock2.h>.  */
 
228
 
 
229
#if @HAVE_WINSOCK2_H@
 
230
# if !defined _@GUARD_PREFIX@_UNISTD_H
 
231
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
232
#   undef close
 
233
#   define close close_used_without_including_unistd_h
 
234
#  else
 
235
    _GL_WARN_ON_USE (close,
 
236
                     "close() used without including <unistd.h>");
 
237
#  endif
 
238
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
239
#   undef gethostname
 
240
#   define gethostname gethostname_used_without_including_unistd_h
 
241
#  else
 
242
    _GL_WARN_ON_USE (gethostname,
 
243
                     "gethostname() used without including <unistd.h>");
 
244
#  endif
 
245
# endif
 
246
# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
 
247
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
248
#   undef select
 
249
#   define select select_used_without_including_sys_select_h
 
250
#  else
 
251
    _GL_WARN_ON_USE (select,
 
252
                     "select() used without including <sys/select.h>");
 
253
#  endif
 
254
# endif
 
255
#endif
 
256
 
206
257
/* Wrap everything else to use libc file descriptors for sockets.  */
207
258
 
208
 
#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
209
 
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
210
 
#  undef close
211
 
#  define close close_used_without_including_unistd_h
212
 
# else
213
 
   _GL_WARN_ON_USE (close,
214
 
                    "close() used without including <unistd.h>");
215
 
# endif
216
 
#endif
217
 
 
218
 
#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
219
 
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
220
 
#  undef gethostname
221
 
#  define gethostname gethostname_used_without_including_unistd_h
222
 
# else
223
 
   _GL_WARN_ON_USE (gethostname,
224
 
                    "gethostname() used without including <unistd.h>");
225
 
# endif
226
 
#endif
227
 
 
228
259
#if @GNULIB_SOCKET@
229
260
# if @HAVE_WINSOCK2_H@
230
261
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
614
645
# endif
615
646
#endif
616
647
 
617
 
#if @HAVE_WINSOCK2_H@
618
 
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
619
 
#  undef select
620
 
#  define select select_used_without_including_sys_select_h
621
 
# else
622
 
   _GL_WARN_ON_USE (select,
623
 
                    "select() used without including <sys/select.h>");
624
 
# endif
625
 
#endif
626
 
 
627
648
#if @GNULIB_ACCEPT4@
628
649
/* Accept a connection on a socket, with specific opening flags.
629
650
   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
657
678
# endif
658
679
#endif
659
680
 
660
 
#endif /* _GL_SYS_SOCKET_H */
661
 
#endif /* _GL_SYS_SOCKET_H */
 
681
#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
 
682
#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
662
683
#endif