r***@gmail.com
2015-12-17 01:18:43 UTC
(trijezdci):
The _stat functions are documented on the Microsoft site.
I also assume those will work on DOS, not only on Windows.
(MarcoV):
If you move to Windows, best leave your Dos legacy at the door.
Windows NT and Dos are mostly unrelated. Windows 64-bit doesn't
even run dos apps.
(trijezdci):
Well, BSD, Linux and MacOS X -- 64 bit or not -- do run DOS apps
via a utility called DOSbox which many folks are using and this
allows you to share directories with the host system. It is
therefore desirable to have M2C build and run under DOSbox.
(Nemo):
Turbo C 2.01 is available from the Borland Musuem (via the
Wayback Machine) and is easilly installed under DOSbox.
Okay, so here's the deal: I think talking about DOS (here) is
a waste of time. I seriously doubt that anyone here (besides me)
is interested. I don't think it's worth worrying about, but hey,
some of you did mention it.
I would not waste my time with TurboC (for many reasons). I
would personally recommend OpenWatcom or DJGPP. OW at least
tries to be portable across platforms (so if stat works, it
should "mostly" work on all targets). DJGPP is fairly POSIX
heavy, so you shouldn't usually have to write DOS-specific code.
Both can be cross-compilers (and tested under various emulations
atop foreign host OSes).
In raw DOS, I failed to build this "new" M2C with latest DJGPP,
but an older version (GCC 3.4.6) did build and run it okay
when used under (Linux) DOSEMU (LFNs!). One file of mine seemed
okay (after fixing a few errant semicolons), but the other seemingly
had problems with variant records (but the switch didn't seem to
help, are multiple switches allowed?). Do you want me to host a
binary build of that somewhere? Probably pointless since, as
mentioned, Win64 doesn't run it. (Even DOSEMU isn't widely
propagated in Linux circles for various reasons. Although yes,
DOSEMU does also work under x64.)
I would not recommend here running (esp. compiling!) under DOSBox
at all. It's not a "real" DOS, only for games. But DOSEMU is Linux
only. I would recommend QEMU or VBox with an appropriate disk image
(which I can provide, if needed). You could also make a bootable
USB, if you find that more convenient.
Didn't you mention bootstrapping via M2M? There's also a few others,
e.g. FST or GPM/PC or GPM/DJGPP. I also had built (and "installed")
M2C 0.6 via DJGPP under DOSEMU a while back (but never published
binaries because I didn't clean up or fix the makefile, hence it
wasn't easily reproducible). Would anyone be interested in that?
(Doubt it.)
Look, I hate to be so cynical and pessimistic. But I doubt anyone
here really worries about extreme portability to such things as DOS
(or Amiga or whatever else you mentioned, Plan 9?). As much as I
really hate to say it, keep it simple: Mac, Win, Linux (aka, Windows
or POSIX). Alas, I'm no great DOS programmer, but I'm willing to
help, if at all possible.
The _stat functions are documented on the Microsoft site.
I also assume those will work on DOS, not only on Windows.
(MarcoV):
If you move to Windows, best leave your Dos legacy at the door.
Windows NT and Dos are mostly unrelated. Windows 64-bit doesn't
even run dos apps.
(trijezdci):
Well, BSD, Linux and MacOS X -- 64 bit or not -- do run DOS apps
via a utility called DOSbox which many folks are using and this
allows you to share directories with the host system. It is
therefore desirable to have M2C build and run under DOSbox.
(Nemo):
Turbo C 2.01 is available from the Borland Musuem (via the
Wayback Machine) and is easilly installed under DOSbox.
Okay, so here's the deal: I think talking about DOS (here) is
a waste of time. I seriously doubt that anyone here (besides me)
is interested. I don't think it's worth worrying about, but hey,
some of you did mention it.
I would not waste my time with TurboC (for many reasons). I
would personally recommend OpenWatcom or DJGPP. OW at least
tries to be portable across platforms (so if stat works, it
should "mostly" work on all targets). DJGPP is fairly POSIX
heavy, so you shouldn't usually have to write DOS-specific code.
Both can be cross-compilers (and tested under various emulations
atop foreign host OSes).
In raw DOS, I failed to build this "new" M2C with latest DJGPP,
but an older version (GCC 3.4.6) did build and run it okay
when used under (Linux) DOSEMU (LFNs!). One file of mine seemed
okay (after fixing a few errant semicolons), but the other seemingly
had problems with variant records (but the switch didn't seem to
help, are multiple switches allowed?). Do you want me to host a
binary build of that somewhere? Probably pointless since, as
mentioned, Win64 doesn't run it. (Even DOSEMU isn't widely
propagated in Linux circles for various reasons. Although yes,
DOSEMU does also work under x64.)
I would not recommend here running (esp. compiling!) under DOSBox
at all. It's not a "real" DOS, only for games. But DOSEMU is Linux
only. I would recommend QEMU or VBox with an appropriate disk image
(which I can provide, if needed). You could also make a bootable
USB, if you find that more convenient.
Didn't you mention bootstrapping via M2M? There's also a few others,
e.g. FST or GPM/PC or GPM/DJGPP. I also had built (and "installed")
M2C 0.6 via DJGPP under DOSEMU a while back (but never published
binaries because I didn't clean up or fix the makefile, hence it
wasn't easily reproducible). Would anyone be interested in that?
(Doubt it.)
Look, I hate to be so cynical and pessimistic. But I doubt anyone
here really worries about extreme portability to such things as DOS
(or Amiga or whatever else you mentioned, Plan 9?). As much as I
really hate to say it, keep it simple: Mac, Win, Linux (aka, Windows
or POSIX). Alas, I'm no great DOS programmer, but I'm willing to
help, if at all possible.