[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / scandir.c
blob20b5e1191700fab254ee63bf6db5121f613f4361
1 // REQUIRES: (linux && !android) || freebsd
3 // RUN: rm -rf %t-dir
4 // RUN: mkdir -p %t-dir
5 // RUN: touch %t-dir/a %t-dir/b %t-dir/c
7 // RUN: %clang %s -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1
9 #include <dirent.h>
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
14 int main(int argc, char **argv) {
15 struct dirent **dirpp = NULL;
16 int count = scandir(TEMP_DIR, &dirpp, NULL, NULL);
17 fprintf(stderr, "count is %d\n", count);
18 if (count >= 0) {
19 for (int i = 0; i < count; ++i) {
20 fprintf(stderr, "found %s\n", dirpp[i]->d_name);
21 free(dirpp[i]);
23 free(dirpp);
25 return 0;