Mercurial > octave
annotate liboctave/wrappers/fcntl-wrappers.c @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | 0a5b15007766 |
children | 597f3ee61a48 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
3 // Copyright (C) 2016-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
21911 | 25 |
26 // These functions may be provided by gnulib. We don't include gnulib | |
27 // headers directly in Octave's C++ source files to avoid problems that | |
28 // may be caused by the way that gnulib overrides standard library | |
29 // functions. | |
30 | |
31 #if defined (HAVE_CONFIG_H) | |
32 # include "config.h" | |
33 #endif | |
34 | |
35 #include <fcntl.h> | |
36 | |
37 #include "fcntl-wrappers.h" | |
38 | |
39 int | |
40 octave_fcntl_wrapper (int fd, int cmd, int arg) | |
41 { | |
42 return fcntl (fd, cmd, arg); | |
43 } | |
44 | |
45 int | |
46 octave_open_wrapper (const char *nm, int flags, mode_t mode) | |
47 { | |
48 return open (nm, flags, mode); | |
49 } | |
50 | |
51 int | |
52 octave_f_dupfd_wrapper (void) | |
53 { | |
54 #if defined (F_DUPFD) | |
55 return F_DUPFD; | |
56 #else | |
57 return -1; | |
58 #endif | |
59 } | |
60 | |
61 int | |
62 octave_f_getfd_wrapper (void) | |
63 { | |
64 #if defined (F_GETFD) | |
65 return F_GETFD; | |
66 #else | |
67 return -1; | |
68 #endif | |
69 } | |
70 | |
71 int | |
72 octave_f_getfl_wrapper (void) | |
73 { | |
74 #if defined (F_GETFL) | |
75 return F_GETFL; | |
76 #else | |
77 return -1; | |
78 #endif | |
79 } | |
80 | |
81 int | |
82 octave_f_setfd_wrapper (void) | |
83 { | |
84 #if defined (F_SETFD) | |
85 return F_SETFD; | |
86 #else | |
87 return -1; | |
88 #endif | |
89 } | |
90 | |
91 int | |
92 octave_f_setfl_wrapper (void) | |
93 { | |
94 #if defined (F_SETFL) | |
95 return F_SETFL; | |
96 #else | |
97 return -1; | |
98 #endif | |
99 } | |
100 | |
101 int | |
102 octave_o_append_wrapper (void) | |
103 { | |
104 #if defined (O_APPEND) | |
105 return O_APPEND; | |
106 #else | |
107 return -1; | |
108 #endif | |
109 } | |
110 | |
111 int | |
112 octave_o_async_wrapper (void) | |
113 { | |
114 #if defined (O_ASYNC) | |
115 return O_ASYNC; | |
116 #else | |
117 return -1; | |
118 #endif | |
119 } | |
120 | |
121 int | |
122 octave_o_creat_wrapper (void) | |
123 { | |
124 #if defined (O_CREAT) | |
125 return O_CREAT; | |
126 #else | |
127 return -1; | |
128 #endif | |
129 } | |
130 | |
131 int | |
132 octave_o_excl_wrapper (void) | |
133 { | |
134 #if defined (O_EXCL) | |
135 return O_EXCL; | |
136 #else | |
137 return -1; | |
138 #endif | |
139 } | |
140 | |
141 int | |
142 octave_o_nonblock_wrapper (void) | |
143 { | |
144 #if defined (O_NONBLOCK) | |
145 return O_NONBLOCK; | |
146 #else | |
147 return -1; | |
148 #endif | |
149 } | |
150 | |
151 int | |
152 octave_o_rdonly_wrapper (void) | |
153 { | |
154 #if defined (O_RDONLY) | |
155 return O_RDONLY; | |
156 #else | |
157 return -1; | |
158 #endif | |
159 } | |
160 | |
161 int | |
162 octave_o_rdwr_wrapper (void) | |
163 { | |
164 #if defined (O_RDWR) | |
165 return O_RDWR; | |
166 #else | |
167 return -1; | |
168 #endif | |
169 } | |
170 | |
171 int | |
172 octave_o_sync_wrapper (void) | |
173 { | |
174 #if defined (O_SYNC) | |
175 return O_SYNC; | |
176 #else | |
177 return -1; | |
178 #endif | |
179 } | |
180 | |
181 int | |
182 octave_o_trunc_wrapper (void) | |
183 { | |
184 #if defined (O_TRUNC) | |
185 return O_TRUNC; | |
186 #else | |
187 return -1; | |
188 #endif | |
189 } | |
190 | |
191 int | |
192 octave_o_wronly_wrapper (void) | |
193 { | |
194 #if defined (O_WRONLY) | |
195 return O_WRONLY; | |
196 #else | |
197 return -1; | |
198 #endif | |
199 } |