freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] Re: djgpp and uppercase vs. lowercase file names


From: Eli Zaretskii
Subject: Re: [Devel] Re: djgpp and uppercase vs. lowercase file names
Date: Sun, 21 Nov 2004 07:30:49 +0200

> From: Ned Konz <address@hidden>
> Date: Sat, 20 Nov 2004 10:13:20 -0800
> Cc: Werner LEMBERG <address@hidden>,
>  address@hidden
> 
> > We check for win32 by testing whether COMSPEC is defined and the
> > output of the `ver' program contains the string `Windows'.
> 
> But that would include DOS-based (i.e. not Win32) versions of Windows like 
> 3.1.

No, it won't: on Windows 3.1, command.com didn't report "Windows".
However, looking at COMSPEC is not good anyway, see below.

> Often (that is, by default) the environment variable %COMSPEC% includes the 
> string "cmd.exe" on Win32. When it does, you can use that as a pointer to 
> CMD.

Not so easily: the OP was using the DJGPP port of Make, which is a DOS
program as far as Windows is concerned, and for DOS programs, Windows
changes the value of COMSPEC when it creates the environment block for
the program, so that COMSPEC points to command.com, not to cmd.exe.

> But you *can* check the existence of %windir%\system32\cmd.exe and use it if 
> you find it (or is it better to use %SystemRoot%\system32\cmd.exe instead?).

I will look what Windows-related variables are kept in the DOS
program's environment block, and get back to you.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]