Mercurial > hg > octave-shane > gnulib-hg
annotate lib/sys_ioctl.in.h @ 17249:e542fd46ad6f
maint: update all copyright year number ranges
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Tue, 01 Jan 2013 00:50:58 +0000 |
parents | bb182ee4a09d |
children | 344018b6e5d7 |
rev | line source |
---|---|
10615 | 1 /* Substitute for and wrapper around <sys/ioctl.h>. |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16366
diff
changeset
|
2 Copyright (C) 2008-2013 Free Software Foundation, Inc. |
10615 | 3 |
4 This program is free software; you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
6 the Free Software Foundation; either version 2, or (at your option) | |
7 any later version. | |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
16366
bb182ee4a09d
maint: replace FSF snail-mail addresses with URLs
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
15 along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
10615 | 16 |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
17 #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13088
diff
changeset
|
18 |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10615
diff
changeset
|
19 #if __GNUC__ >= 3 |
10615 | 20 @PRAGMA_SYSTEM_HEADER@ |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10615
diff
changeset
|
21 #endif |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13136
diff
changeset
|
22 @PRAGMA_COLUMNS@ |
10615 | 23 |
24 /* The include_next requires a split double-inclusion guard. */ | |
25 #if @HAVE_SYS_IOCTL_H@ | |
26 # @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@ | |
27 #endif | |
28 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
29 #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
30 #define _@GUARD_PREFIX@_SYS_IOCTL_H |
10615 | 31 |
32 /* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>, | |
12497
e2d59f164e76
Avoid future namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12451
diff
changeset
|
33 but not in <sys/ioctl.h>. |
e2d59f164e76
Avoid future namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12451
diff
changeset
|
34 But avoid namespace pollution on glibc systems. */ |
e2d59f164e76
Avoid future namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12451
diff
changeset
|
35 #ifndef __GLIBC__ |
e2d59f164e76
Avoid future namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12451
diff
changeset
|
36 # include <unistd.h> |
e2d59f164e76
Avoid future namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12451
diff
changeset
|
37 #endif |
10615 | 38 |
12943
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
39 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
40 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
41 /* The definition of _GL_WARN_ON_USE is copied here. */ |
10615 | 42 |
43 | |
44 /* Declare overridden functions. */ | |
45 | |
46 #if @GNULIB_IOCTL@ | |
13136
2241c7e2a3f8
ioctl: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
47 # if @REPLACE_IOCTL@ |
12943
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
48 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
49 # undef ioctl |
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
50 # define ioctl rpl_ioctl |
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
51 # endif |
13077 | 52 _GL_FUNCDECL_RPL (ioctl, int, |
53 (int fd, int request, ... /* {void *,char *} arg */)); | |
54 _GL_CXXALIAS_RPL (ioctl, int, | |
55 (int fd, int request, ... /* {void *,char *} arg */)); | |
56 # else | |
13136
2241c7e2a3f8
ioctl: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
57 # if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1 |
12943
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
58 _GL_FUNCDECL_SYS (ioctl, int, |
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
59 (int fd, int request, ... /* {void *,char *} arg */)); |
13136
2241c7e2a3f8
ioctl: Fix C++ test error on mingw.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
60 # endif |
13088
dbbdff0be05d
Fix ioctl's protoype on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
13077
diff
changeset
|
61 _GL_CXXALIAS_SYS (ioctl, int, |
dbbdff0be05d
Fix ioctl's protoype on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
13077
diff
changeset
|
62 (int fd, int request, ... /* {void *,char *} arg */)); |
13077 | 63 # endif |
12943
2c1c5f9d6a39
sys_ioctl: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
64 _GL_CXXALIASWARN (ioctl); |
11801
a29d6bab4448
Make it possible to use module 'gethostname' without module 'close' or 'ioctl'.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
65 #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ |
10615 | 66 # undef ioctl |
67 # define ioctl ioctl_used_without_requesting_gnulib_module_ioctl | |
68 #elif defined GNULIB_POSIXCHECK | |
69 # undef ioctl | |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
70 # if HAVE_RAW_DECL_IOCTL |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
71 _GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
72 "use gnulib module ioctl for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
73 # endif |
10615 | 74 #endif |
75 | |
76 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
77 #endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
78 #endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ |