~ubuntu-branches/ubuntu/quantal/gnutls26/quantal

« back to all changes in this revision

Viewing changes to gl/tests/ioctl.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ioctl.c --- wrappers for Windows ioctl function
2
2
 
3
 
   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
3
   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
23
23
 
24
24
#include <stdarg.h>
25
25
 
26
 
#define WIN32_LEAN_AND_MEAN
 
26
#if HAVE_IOCTL
 
27
 
 
28
/* Provide a wrapper with the POSIX prototype.  */
 
29
# undef ioctl
 
30
int
 
31
rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
 
32
{
 
33
  void *buf;
 
34
  va_list args;
 
35
 
 
36
  va_start (args, request);
 
37
  buf = va_arg (args, void *);
 
38
  va_end (args);
 
39
 
 
40
  return ioctl (fd, request, buf);
 
41
}
 
42
 
 
43
#else /* mingw */
 
44
 
 
45
# define WIN32_LEAN_AND_MEAN
27
46
/* Get winsock2.h. */
28
 
#include <sys/socket.h>
 
47
# include <sys/socket.h>
29
48
 
30
49
/* Get set_winsock_errno, FD_TO_SOCKET etc. */
31
 
#include "w32sock.h"
 
50
# include "w32sock.h"
32
51
 
33
52
int
34
 
rpl_ioctl (int fd, int req, ...)
 
53
ioctl (int fd, int req, ...)
35
54
{
36
55
  void *buf;
37
56
  va_list args;
49
68
 
50
69
  return r;
51
70
}
 
71
 
 
72
#endif