void compile(const char *compiler_path, const char *fname) {
#if defined(unix) || defined(__unix__)
    if(!fork()) {
        execl(compiler_path, compiler_path, "-oprog", fname, 0);
    } else {
        wait(0);
    }
#else   /* assume win32 */
    char cmd_line[512];
    STARTUPINFO si;
    PROCESS_INFORMATION proc_info;

    memset(&si, 0, sizeof si);
    si.cb = sizeof si;

    sprintf(cmd_line, "%s %s %s", compiler_path, "-oprog", fname);
    CreateProcess(compiler_path, cmd_line, 0, 0, 0, 0, 0, 0, &si, &proc_info);

    WaitForSingleObject(proc_info.hProcess, UINT_MAX);
    CloseHandle(proc_info.hProcess);
    CloseHandle(proc_info.hThread);
#endif
}