delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/11/08/03:46:24

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT nohavenot DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 'The system cannot execute the specified program' (again)
Date: Sat, 8 Nov 2008 03:41:21 -0500
Organization: Aioe.org NNTP Server
Lines: 63
Message-ID: <gf3jca$32p$1@aioe.org>
References: <6nk3hhFm2at0U1 AT mid DOT uni-berlin DOT de>
NNTP-Posting-Host: BW0KeZm3CShCykloOUjLTA.user.aioe.org
Mime-Version: 1.0
X-Complaints-To: abuse AT aioe DOT org
NNTP-Posting-Date: Sat, 8 Nov 2008 08:41:46 +0000 (UTC)
X-Notice: Filtered by postfilter v. 0.7.4
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-Priority: 3
X-MSMail-Priority: Normal
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Andreas Eibach" <aeibach AT mail DOT com> wrote in message
news:6nk3hhFm2at0U1 AT mid DOT uni-berlin DOT de...
> after a little odyssey in the net, I've finally found the culprit why my
> batch-capable small C application does not accept longer lines than
(about)
> 189/190 characters, which makes it very unusable for recursive operation
> through a vast directory tree.

I found that I was limited to 64 character paths in DOS - unless - I
specified the exact full pathname.  Specifying the exact full pathname
allows me to completely recurse all my Windows directories with LFN's using
Henrik Haftmann's DOSLFN (or Jason Hood's updated version).  I found this to
be true for real mode MS-DOS v7.10 (from Win98 SE).  It works with both
DJGPP and OpenWatcom so I don't think it's a DJGPP feature.  Also, it might
not be true  for other DOS versions.

> This old thread from 2006:
[...]
> finally brought some insight that djgpp uses a 16-bit stub that will make
> any 32bit program _look_ like a 16 bit app for MSDOS.

True.

> Is there - after 2 years - still no way to circumvent this (compiling
> options?) apart from silly workarounds I already read about in the thread
> from 2 years ago?

You could try Daniel Borca's DJELF.  It's a version of DJGPP which produces
ELF executables.  Chris Giese's MBLOAD is a Multiboot loader for DOS and
will load ELF binaries produced for DOS (not Linux, etc.).  You should also
be able to use DOSGRUB to start DOS ELFs from DOS.
http://www.geocities.com/dborca/djgpp/elf/djelf.html

> Second question: Would it be *theoretically* possible to live without that
> 16bit stub

Yes, with conditions.  DOS can't directly execute a 32-bit application since
it's 16-bit.  So, the condition is that you have a separate executable
loader for that executable type (which would contain the DOS 16-bit loader
code and code to transition to 32-bits).  If DJGPP implemented it's 16-bit
DPMI startup stub as an DPMI executable loader as a DOS application or as a
int 0x21 TSR 'exec' function extension, you'd be set.

> Second question: Would it be *theoretically* possible to live without that
> 16bit stub, so that 32bit programs are also recognized as 32bit?

Yes, it's possible.  I'd like to see DJGPP produce pure 32-bit applications:
multi-boot protocol (either ELF or a.out "kludge") and unstubbed DPMI with a
separate loader.  Even though there is DJELF, it produces flat binaries
which is different from the two address space method currently used by
DJGPP.

> I can only say I *DO* need very long lines in my batch file, because
people
> with deep directory trees do not even need to have directories with a
> certain number of characters, but only the grade of tree depth will
> automatically make paths quite long.

Well, the only suggestion I have is to use the full exact path...


Rod Pemberton

- Raw text -


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