repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
compiler-rt
/
test
/
sanitizer_common
/
TestCases
/
Posix
/
lstat64.cpp
blob
22ab3068274eea174b6d92f21ec540f659af02e1
1
// REQUIRES: linux
2
// RUN: %clangxx -O0 -g %s -o %t && %run %t
3
4
#include <assert.h>
5
#include <stdlib.h>
6
#include <sys/stat.h>
7
8
int
main
(
void
) {
9
struct
stat64 st
;
10
11
assert
(!
lstat64
(
"/dev/null"
, &
st
));
12
#if defined(__sun__) && defined(__svr4__)
13
assert
(
S_ISLNK
(
st
.
st_mode
));
14
#else
15
assert
(
S_ISCHR
(
st
.
st_mode
));
16
#endif
17
18
return
0
;
19
}