#include <sys/types.h>
#include <stdlib.h>
#include <dirent.h>
int main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
di->d_name[0] == 0) exit(0); exit(1);}
The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines
#include <sys/types.h>
#include <stdlib.h>
#include <dirent.h>
int main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
di->d_name[0] == 0) exit(0); exit(1);}