Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

mawk 1.3.4 20240622 for DOS (Announce)

posted by Rugxulo Homepage, Usono, 21.08.2024, 23:25

> I reproduced the problem in a Watcom win32 build of mawk. That eliminates
> mingw and MSVCRT.DLL.

Yes, BTW, that is a nice advantage of OpenWatcom. (MSVCRT is a "known DLL", cannot be overridden, and frankly shouldn't be relied upon by user programs. The fact that there are multiple newer version MSVCRT runtime .DLLs is also an annoyance. You can usually link it statically, but most people don't.)

> Note how the win32 version of test2.exe inserts extraneous arguments when
> it uses the system() C library call, but the DOS version doesn't.

What, the extra "/c"? Although I may be misunderstanding, as you know "%COMSPEC% /c my.bat" is often how most programs shell out. But you don't need to explicitly call the shell if not using a .BAT file.

In other words, some compilers treat system("runme") as system("command /c runme"). They don't try to be clever and only do it for .BATs, they do it for everything. (DJGPP is a little smarter than most here.) In particular, Turbo Pascal's Exec function (in most, but not all, TP-compatible compilers) explicitly needs something like Exec(getenv('COMSPEC'),' /c ' + myEXEname);

 

Complete thread:

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