FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
emscripten/tests/fcntl-misc/src.c at universal-python · JavaScriptIOT/emscripten · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
JavaScriptIOT
/
emscripten
Public
forked from
emscripten-core/emscripten
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
emscripten
/
tests
/
fcntl-misc
/
src.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (28 loc) · 747 Bytes
Breadcrumbs
emscripten
/
tests
/
fcntl-misc
/
src.c
Copy path
File metadata and controls
33 lines (28 loc) · 747 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include
<assert.h>
#include
<stdio.h>
#include
<errno.h>
#include
<sys/stat.h>
#include
<fcntl.h>
#include
<string.h>
int
main
() {
struct
stat
s
;
int
f
=
open
(
"/test"
,
O_RDWR
,
0777
);
assert
(
f
);
printf
(
"posix_fadvise: %d\n"
,
posix_fadvise
(
f
,
3
,
2
,
POSIX_FADV_DONTNEED
));
printf
(
"errno: %d\n"
,
errno
);
printf
(
"\n"
);
errno
=
0
;
printf
(
"posix_fallocate: %d\n"
,
posix_fallocate
(
f
,
3
,
2
));
printf
(
"errno: %d\n"
,
errno
);
stat
(
"/test"
,
&
s
);
printf
(
"st_size: %d\n"
,
s
.
st_size
);
memset
(
&
s
,
0
,
sizeof
s
);
printf
(
"\n"
);
errno
=
0
;
printf
(
"posix_fallocate2: %d\n"
,
posix_fallocate
(
f
,
3
,
7
));
printf
(
"errno: %d\n"
,
errno
);
stat
(
"/test"
,
&
s
);
printf
(
"st_size: %d\n"
,
s
.
st_size
);
memset
(
&
s
,
0
,
sizeof
s
);
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL