Rename gl_TMPFILE.
[gnulib.git] / modules / ioctl
1 Description:
2 ioctl() function: issue device specific requests on files, devices, or sockets.
3
4 Files:
5 lib/ioctl.c
6 lib/w32sock.h
7
8 Depends-on:
9 sys_ioctl
10 sys_socket
11 errno
12
13 configure.ac:
14 AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
15 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
16 if test "$ac_cv_header_winsock2_h" = yes; then
17   dnl Even if the 'socket' module is not used here, another part of the
18   dnl application may use it and pass file descriptors that refer to
19   dnl sockets to the ioctl() function. So enable the support for sockets.
20   AC_LIBOBJ([ioctl])
21   gl_REPLACE_SYS_IOCTL_H
22 else
23   AC_CHECK_FUNCS([ioctl])
24   dnl On glibc systems, the second parameter is 'unsigned long int request',
25   dnl not 'int request'. We cannot simply cast the function pointer, but
26   dnl instead need a wrapper.
27   AC_CACHE_CHECK([for ioctl with POSIX signature],
28     [gl_cv_func_ioctl_posix_signature],
29     [AC_COMPILE_IFELSE(
30        [AC_LANG_PROGRAM(
31           [[#include <sys/ioctl.h>]],
32           [[extern int ioctl (int, int, ...);]])
33        ],
34        [gl_cv_func_ioctl_posix_signature=yes],
35        [gl_cv_func_ioctl_posix_signature=no])
36     ])
37   if test $gl_cv_func_ioctl_posix_signature != yes; then
38     REPLACE_IOCTL=1
39     AC_LIBOBJ([ioctl])
40     gl_REPLACE_SYS_IOCTL_H
41   fi
42 fi
43 gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
44
45 Makefile.am:
46
47 Include:
48 <sys/ioctl.h>
49
50 License:
51 LGPLv2+
52
53 Maintainer:
54 Paolo Bonzini, Simon Josefsson, Bruno Haible