#ifndef VMS_COMPAT_H
#define VMS_COMPAT_H
/*
 * VMS compatibility shims for building DoomsDay 2000 on OpenVMS 9.x
 * Uses our own VT-based curses replacement since VMS curses output is
 * broken on VMS 9.x x86-64 under QEMU.
 */

#ifdef __VMS

#ifndef __GNUC__
#define __attribute__(x)
#endif

#include "vms_curses.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <math.h>

/* VMS file path conventions */
#define SAVE_FILE   "DOOM.DAT"
#define SCORE_FILE  "DOOM.SCB"
#define OPT_FILE    "DOOM.OPT"

/* VMS lacks random() -- use rand() */
#ifndef random
#define random rand
#define srandom srand
#endif

#else /* Unix */

#include <ncurses.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <math.h>

#define SAVE_FILE   "doom.dat"
#define SCORE_FILE  "doom.scb"
#define OPT_FILE    "doom.opt"

#endif /* __VMS */

#endif /* VMS_COMPAT_H */
