Debian Codegraph @

compiler-rt/test/sanitizer_common/TestCases/NetBSD/strmode.cpp

raw
1 // RUN: %clangxx -O0 -g %s -o %t && %run %t
2
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <sys/stat.h>
6 #include <unistd.h>
7
8 int main(void) {
9 struct stat st;
10 char modep[15];
11
12 if (stat("/etc/hosts", &st))
13 exit(1);
14
15 strmode(st.st_mode, modep);
16
17 printf("%s\n", modep);
18
19 return 0;
20 }