#include "os_dos.h"
#define BINARY_FILE_IO
#define USE_EXE_NAME
#define SYNC_DUP_CLOSE
#define USE_TERM_CONSOLE
#ifdef DJGPP
# include <fcntl.h>
# define USE_LONG_FNAME _USE_LFN
# define USE_FNAME_CASE
# define HAVE_PUTENV
# define HAVE_STDARG_H
#else
# define SHORT_FNAME
#endif
#define HAVE_STDLIB_H
#define HAVE_STRING_H
#define HAVE_FCNTL_H
#define HAVE_STRCSPN
#define HAVE_STRICMP
#define HAVE_STRFTIME
#define HAVE_STRNICMP
#define HAVE_MEMSET
#define HAVE_QSORT
#define HAVE_ST_MODE
#if defined(__DATE__) && defined(__TIME__)
# define HAVE_DATE_TIME
#endif
#define BREAKCHECK_SKIP 1
#define HAVE_AVAIL_MEM
#ifdef __BORLANDC__
# if __BORLANDC__ < 0x450
# define _RTLENTRYF
# endif
#endif
#define FNAME_ILLEGAL "\"*?><|"
#include <dos.h>
#include <dir.h>
#include <time.h>
#ifdef DJGPP
# include <unistd.h>
# define HAVE_LOCALE_H
# define setlocale(c, p) djgpp_setlocale()
#endif
#ifndef DJGPP
typedef long off_t;
#endif
#define TEMPDIRNAMES "$TMP", "$TEMP", "c:\\TMP", "c:\\TEMP", ""
#define TEMPNAMELEN 128
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM 256
#endif
#ifndef DFLT_MAXMEMTOT
# define DFLT_MAXMEMTOT 0
#endif
#ifdef DJGPP
# define BASENAMELEN (_USE_LFN?250:8)
#else
# define BASENAMELEN 8
#endif
#define MSDOS_MOUSE_LEFT 0x01
#define MSDOS_MOUSE_RIGHT 0x02
#define MSDOS_MOUSE_MIDDLE 0x04
#ifdef DJGPP
int mch_rename(const char *OldFile, const char *NewFile);
#else
# define mch_rename(src, dst) rename(src, dst)
#endif
#ifdef DJGPP
# define vim_mkdir(x, y) mkdir((char *)(x), y)
#else
# define vim_mkdir(x, y) mkdir((char *)(x))
#endif
#define mch_rmdir(x) rmdir((char *)(x))
#define mch_setenv(name, val, x) setenv(name, val, x)