How to compile this program for DOS? (Developers)
Hello rosegondon, hello sezeros,
> 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
>
Whitespace issue (argh!). There is a tab character after the first #endif in the rejected patch portion --- you will need to edit the patch to add it in (or maybe change spaces into tabs).
Actually I think sezeros's patch throws away a bit too much code. The Unix-specific code (#ifdef unix ... #endif) tries to gather some bits of randomness by calling gettimeofday(...):
#ifdef unix
FILE *rf;
size_t ct;
gettimeofday(&tv, (struct timezone *) NULL);
trash[1] = tv.tv_sec;
trash[2] = tv.tv_usec;
...
#define OS_KNOWN 1
#endif
... and DJGPP does support gettimeofday(...). Unfortunately, the patch will disable the code, which will reduce the amount of randomness the program can use. There is probably a better way...
Thank you!
---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"
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