Mercurial > octave
annotate liboctave/wrappers/stat-wrappers.h @ 33639:65b1cf6aa60a bytecode-interpreter tip
maint: Merge default to bytecode-interpreter
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Mon, 03 Jun 2024 14:38:47 -0400 |
parents | 7274354d68bf |
children |
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 // |
32632
2e484f9f1f18
maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
31706
diff
changeset
|
3 // Copyright (C) 2016-2024 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 //////////////////////////////////////////////////////////////////////// |
21909
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 #if ! defined (octave_stat_wrappers_h) |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 #define octave_stat_wrappers_h 1 |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
33166
7274354d68bf
for consistent coding style, use #if defined (X) instead of if defined X
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
29 #if defined (__cplusplus) |
21935 | 30 # include <ctime> |
31 #else | |
32 # include <stdbool.h> | |
33 # include <time.h> | |
34 #endif | |
35 | |
36 #include <sys/types.h> | |
37 | |
33166
7274354d68bf
for consistent coding style, use #if defined (X) instead of if defined X
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
38 #if defined (__cplusplus) |
21909
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 extern "C" { |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 #endif |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
42 extern OCTAVE_API int octave_mkdir_wrapper (const char *name, mode_t mode); |
21909
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
44 extern OCTAVE_API int octave_mkfifo_wrapper (const char *name, mode_t mode); |
21909
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
46 extern OCTAVE_API int octave_umask_wrapper (mode_t mode); |
21909
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
48 extern OCTAVE_API int |
21935 | 49 octave_stat_wrapper (const char *fname, mode_t *mode, ino_t *ino, |
50 dev_t *dev, nlink_t *nlink, uid_t *uid, | |
51 gid_t *gid, off_t *size, time_t *atime, | |
52 time_t *mtime, time_t *ctime, dev_t *rdev, | |
53 long *blksize, long *blocks); | |
54 | |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
55 extern OCTAVE_API int |
21935 | 56 octave_lstat_wrapper (const char *lname, mode_t *mode, ino_t *ino, |
57 dev_t *dev, nlink_t *nlink, uid_t *uid, | |
58 gid_t *gid, off_t *size, time_t *atime, | |
59 time_t *mtime, time_t *ctime, dev_t *rdev, | |
60 long *blksize, long *blocks); | |
61 | |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
62 extern OCTAVE_API int |
21935 | 63 octave_fstat_wrapper (int fid, mode_t *mode, ino_t *ino, |
64 dev_t *dev, nlink_t *nlink, uid_t *uid, | |
65 gid_t *gid, off_t *size, time_t *atime, | |
66 time_t *mtime, time_t *ctime, dev_t *rdev, | |
67 long *blksize, long *blocks); | |
68 | |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
69 extern OCTAVE_API bool octave_is_blk_wrapper (mode_t mode); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
70 extern OCTAVE_API bool octave_is_chr_wrapper (mode_t mode); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
71 extern OCTAVE_API bool octave_is_dir_wrapper (mode_t mode); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
72 extern OCTAVE_API bool octave_is_fifo_wrapper (mode_t mode); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
73 extern OCTAVE_API bool octave_is_lnk_wrapper (mode_t mode); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
74 extern OCTAVE_API bool octave_is_reg_wrapper (mode_t mode); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
75 extern OCTAVE_API bool octave_is_sock_wrapper (mode_t mode); |
21935 | 76 |
29231
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
77 extern OCTAVE_API bool octave_have_struct_stat_st_rdev (void); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
78 extern OCTAVE_API bool octave_have_struct_stat_st_blksize (void); |
4e196fbb28a5
Set API tags in files in liboctave/wrappers (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
27923
diff
changeset
|
79 extern OCTAVE_API bool octave_have_struct_stat_st_blocks (void); |
21935 | 80 |
33166
7274354d68bf
for consistent coding style, use #if defined (X) instead of if defined X
John W. Eaton <jwe@octave.org>
parents:
32632
diff
changeset
|
81 #if defined (__cplusplus) |
21909
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 } |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
83 #endif |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 |
d7cac41df82a
provide wrappers for some sys/stat functions
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
85 #endif |