Files
clang-p2996/compiler-rt/test/sanitizer_common/TestCases/NetBSD/strmode.cpp
Nico Weber 74989aff53 compiler-rt: Rename cc files below test/sanitizer_common to cpp
See r367803 and similar other changes.

llvm-svn: 367863
2019-08-05 13:57:03 +00:00

21 lines
297 B
C++

// RUN: %clangxx -O0 -g %s -o %t && %run %t
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
int main(void) {
struct stat st;
char modep[15];
if (stat("/etc/hosts", &st))
exit(1);
strmode(st.st_mode, modep);
printf("%s\n", modep);
return 0;
}