Mercurial > hg > octave-nkf > gnulib-hg
annotate lib/sys_ioctl.in.h @ 10778:ddc567d280d1
Treat Haiku like BeOS.
author | Ingo Weinhold <ingo_weinhold@gmx.de> |
---|---|
date | Mon, 10 Nov 2008 12:30:58 +0100 |
parents | 8668b19a7032 |
children | a29d6bab4448 |
rev | line source |
---|---|
10615 | 1 /* Substitute for and wrapper around <sys/ioctl.h>. |
2 Copyright (C) 2008 Free Software Foundation, Inc. | |
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 | |
15 along with this program; if not, write to the Free Software Foundation, | |
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | |
17 | |
18 #ifndef _GL_SYS_IOCTL_H | |
19 | |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10615
diff
changeset
|
20 #if __GNUC__ >= 3 |
10615 | 21 @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
|
22 #endif |
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 | |
29 #ifndef _GL_SYS_IOCTL_H | |
30 #define _GL_SYS_IOCTL_H | |
31 | |
32 /* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>, | |
33 but not in <sys/ioctl.h>. */ | |
34 #include <unistd.h> | |
35 | |
36 /* The definition of GL_LINK_WARNING is copied here. */ | |
37 | |
38 | |
39 /* Declare overridden functions. */ | |
40 | |
41 #ifdef __cplusplus | |
42 extern "C" { | |
43 #endif | |
44 | |
45 | |
46 #if @GNULIB_IOCTL@ | |
47 # if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ | |
48 # undef ioctl | |
49 # define ioctl rpl_ioctl | |
50 extern int ioctl (int fd, int request, ... /* {void *,char *} arg */); | |
51 # endif | |
52 #elif @SYS_IOCTL_H_HAVE_WINSOCK2_H@ | |
53 # undef ioctl | |
54 # define ioctl ioctl_used_without_requesting_gnulib_module_ioctl | |
55 #elif defined GNULIB_POSIXCHECK | |
56 # undef ioctl | |
57 # define ioctl(f,c,a) \ | |
58 (GL_LINK_WARNING ("ioctl does not portably work on sockets - " \ | |
59 "use gnulib module ioctl for portability"), \ | |
60 ioctl (f, c, a)) | |
61 #endif | |
62 | |
63 | |
64 #ifdef __cplusplus | |
65 } | |
66 #endif | |
67 | |
68 | |
69 #endif /* _GL_SYS_IOCTL_H */ | |
70 #endif /* _GL_SYS_IOCTL_H */ |