Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

How to compile this program for DOS? (Developers)

posted by sezeroz, 18.09.2021, 14:47

If you patch it like the following, it does compile.
(Not run-tested at all, though.)


--- otp.c~
+++ otp.c
@@ -55,8 +55,12 @@
 #ifdef WIN32
 #include <windows.h>
 #endif
-
-#ifdef unix
+#ifdef __DJGPP
+#define __far
+#define _intdos intdos
+#define _REGS REGS
+#endif
+#if defined(unix) && !defined(__DJGPP)
 #include <sys/time.h>
 extern int getpid(), getppid(), gethostid();
 #endif
@@ -189,7 +193,7 @@
 #ifdef MSDOS
     union _REGS ri, ro;
 #endif
-#ifdef unix
+#if defined(unix) && !defined(__DJGPP)
     struct timeval tv;
 #endif
     
@@ -340,7 +344,7 @@
 #define OS_KNOWN 1
 #endif
 
-#ifdef unix
+#if defined(unix) && !defined(__DJGPP)
     FILE *rf;
     size_t ct;

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 180 users online (0 registered, 180 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum