delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/26/08:10:40

Message-ID: <002701c204ae$4fa83700$0102a8c0@acceleron>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: <djgpp-workers AT delorie DOT com>, "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020526125433 DOT 29049A-100000 AT is>
Subject: Re: emacs under w2k
Date: Sun, 26 May 2002 22:09:50 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Reply-To: djgpp-workers AT delorie DOT com

Eli,
> > > I seem to recall that some recent Windows version (W2K? XP?) doesn't
> > > like this method, though.  Hmm.
> >
> > Yes, I don't think it works reliably. See Andrew Cottrell's mail
entitled "Re:
> > Make 3.791 on Windows 2000 test" and dated Tue, 24 Jul 2001 22:28:43
+1000.
See below for the details of this to save time.

> Thanks.  Andrew, does the text work on W2K/XP if I use a real file
> instead of nul?
The testing shows that the command interpreter cmd.exe works fine, but the
other command interpreter command.com does not work correctly. Please see
below for my test cases and results along with updated info on the original
problem (added XP test results).

I tried the following commands and only the \dj204 directory exists (before
the test is run).
@if exist \dj204\nul @echo here1
@if exist \dj204\djgpp.env @echo here2
command.com /c if exist \dj204\nul @echo here1_1
command.com /c if exist \dj204\djgpp.env @echo here2_2
@if not exist \dj204\nul @echo here3
@if not exist \dj204\djgpp.env @echo here4
@if exist \dj2041\nul @echo here5
@if exist \dj2041\djgpp.env @echo here6
@if not exist \dj2041\nul @echo here7
@if not exist \dj2041\djgpp.env @echo here8
command.com /c if not exist \glob\nul md \glob
command.com /c if not exist \glob\nul md \glob
@if not exist \glob1\nul md \glob1
@if not exist \glob1\nul md \glob1


The output was:-
DJGPP_204 D:\DJ204>test
here1
here2
DJGPP_204 D:\DJ204>command.com /c if exist \dj204\nul @echo here1_1
DJGPP_204 D:\DJ204>command.com /c if exist \dj204\djgpp.env @echo here2_2
Bad command or file name
here7
here8
DJGPP_204 D:\DJ204>command.com /c if not exist \glob\nul md \glob
DJGPP_204 D:\DJ204>command.com /c if not exist \glob\nul md \glob
Extended Error 183

If I modify the test for djgpp.env to include the filename in quotes as per
the following line the "Bad command or file name" error goes away, I can't
see why I would need to put quotes arround the filename when it is a valid
SFN format, LFN where there are spaces needs quotes. Any ideas?
command.com /c if exist "\dj204\djgpp.env" @echo here2_2

======================= PREVIOUS EMAIL INFO WITH ADDITIONAL XP TESTING
RESULTS ==========================
The previous email regarding "Extended Error 183" issue and additional XP
testing:-
1) Reproducable Windows 2000 & XP command line prompt:
    DJGPP_204 D:\dj204\gnu\make-3.791>command.com /c if not exist glob\nul
md glob
    Extended Error 183

Tests on Win2000 box:
1) If I run the following in the cmd.exe prompt there is no error, even on
the second or subsequent attempts.
    if not exist glob\nul md glob
2) If I run the following in the command prompt there the output informs me
the echo is on
    command.com /C if not exist glob\nul echo
3) If there is no glob directory the following command runs okay the first
time it is run, but the second time and until the glob directory is deleted
the error occurs.
     command.com /C if not exist glob\nul md glob

Conclusion for "Extended Error 183":
Windows 2000 & XP command.com is not able to perform the test for a
directory as
per DOS and Winodows 9x via a check for directory\nul.

Hope this helps.

Andrew



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019