
// from <dirent.h>
const size_t dirent_d_name_offset = 8;
const size_t dirent_d_name_size = 256;
const size_t dirent_remaining_size = 0;
static if (size_t.sizeof == 4)
    const size_t DIR_struct_size = 80;
else
    const size_t DIR_struct_size = 136;

// from <stdlib.h>
const int RAND_MAX = 2147483647;

// from <stdio.h>
static if (size_t.sizeof == 4)
    const size_t FILE_struct_size = 88;
else
    const size_t FILE_struct_size = 152;
const int EOF = -1;
const int FOPEN_MAX = 20;
const int FILENAME_MAX = 1024;
const int TMP_MAX = 308915776;
const int L_tmpnam = 1024;
const int PATH_MAX = 1024;

// from <sys/types.h>
alias long     Coff_t;
alias size_t   Csize_t;
alias Clong_t  Ctime_t;
alias Culong_t Cclock_t;

// from <time.h>
const uint CLOCKS_PER_SEC = 100;
struct tm {
    int tm_sec;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    int tm_isdst;
    Clong_t tm_gmtoff;
    char * tm_zone;
}

static assert(tm.tm_sec.offsetof == 0);
static assert(tm.tm_min.offsetof == 4);
static assert(tm.tm_hour.offsetof == 8);
static assert(tm.tm_mday.offsetof == 12);
static assert(tm.tm_mon.offsetof == 16);
static assert(tm.tm_year.offsetof == 20);
static assert(tm.tm_wday.offsetof == 24);
static assert(tm.tm_yday.offsetof == 28);
static assert(tm.tm_isdst.offsetof == 32);


