How to compile this program for DOS? (Developers)
patch.exe from UnxUtils failed, same for patch.exe from Perl for Windows.
Error message:
patching file otp.c
Hunk #2 FAILED at 193.
patch unexpectedly ends in middle of line
Hunk #3 succeeded at 344 with fuzz 2.
1 out of 3 hunks FAILED -- saving rejects to file otp.c.rej
otp.c.rej contents:
***************
*** 189,195 ****
#ifdef MSDOS
union _REGS ri, ro;
#endif
- #ifdef unix
struct timeval tv;
#endif
--- 193,199 ----
#ifdef MSDOS
union _REGS ri, ro;
#endif
+ #if defined(unix) && !defined(__DJGPP)
struct timeval tv;
#endif
> 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;
>
---
echo g=ffff:0|debug>nul
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