How to compile this program for DOS? (Developers)
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:
- How to compile this program for DOS? - rosegondon, 18.09.2021, 02:50 (Developers)
- How to compile this program for DOS? - sezeroz, 18.09.2021, 14:47
- How to compile this program for DOS? - rosegondon, 18.09.2021, 18:37
- How to compile this program for DOS? - tkchia, 18.09.2021, 21:16
- How to compile this program for DOS? - tkchia, 18.09.2021, 21:31
- How to compile this program for DOS? - rosegondon, 19.09.2021, 01:28
- How to compile this program for DOS? (patch) - Rugxulo, 19.09.2021, 06:20
- How to compile this program for DOS? (patch) - rosegondon, 19.09.2021, 09:40
- How to compile this program for DOS? (patch) - Rugxulo, 19.09.2021, 06:20
- How to compile this program for DOS? - rosegondon, 19.09.2021, 01:28
- How to compile this program for DOS? - rosegondon, 18.09.2021, 18:37
- How to compile this program for DOS? - sezeroz, 18.09.2021, 14:47