X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.224.192.199 with SMTP id dr7mr16957666qab.4.1358252258530; Tue, 15 Jan 2013 04:17:38 -0800 (PST) Newsgroups: comp.os.msdos.djgpp Date: Tue, 15 Jan 2013 04:17:38 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO NNTP-Posting-Host: 65.13.115.246 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Reading /dev/null seems broken. From: rugxulo AT gmail DOT com Injection-Date: Tue, 15 Jan 2013 12:17:38 +0000 Content-Type: text/plain; charset=ISO-8859-1 Bytes: 3514 Lines: 55 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi, On Monday, January 14, 2013 10:18:07 PM UTC-6, Nick Bowler wrote: > > I've been playing around with DJGPP in dosemu, trying to build one of my > own C projects using the GNU build system (autoconf, automake, etc.) Surprisingly, this isn't AutoTools' fault! (grumble grumble) ;-) > I installed the latest versions from the "current" directory on the DJGPP > FTP site. /current/ as in 2.03p2 libc? Okay. > After some minor configuration struggles, the configure script mostly > worked, until it came time to run config.status (a shell script which gets > generated and run by the main configure script). At this point, the entire > system would (apparently) lock up. I tracked this down to one line in the > script which reads from /dev/null, which looks like this: > > if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then > > Sure enough, the lockup can easily be reproduced from the DJGPP bash > prompt with a similar command: > > sed 's/x//' < /dev/null > /dev/null > > which hangs in the same way. If I omit the >/dev/null redirection, then > endless garbage data is spewed to the console instead of the expected > nothing at all. > > On a "real" POSIX-y system, this should exit with success since reading > from /dev/null will always return 0 (EOF). I replaced the entire test > with a simple "true" in the config.status script, and things ran fine. > > Another instance came up later during the build, with a command similar > > to: > > cat /dev/null > file > > This is expected to produce an empty output file, but instead, gigabytes > of garbage are written. Seems to be pretty much the same root problem. > > While in this case I can work around these problems, should DJGPP be > presenting a /dev/null that works properly? I had this same problem and finally investigated it a little over a year ago (using Ruby 1.8.7 as example). See the old thread from 2012-12-21 titled 'Ruby 1.8.7 p352 (DOSEMU + sh -c "./configure && make")'. https://groups.google.com/forum/?fromgroups=#!searchin/comp.os.msdos.djgpp/ruby/comp.os.msdos.djgpp/f3YuJqfFHug/ReNuu-yCwQEJ Long story short: 'Upgrading the /usr/lib/dosemu/drive_z/kernel.sys file to latest 2040 version apparently "seems" to have fixed it to work without needing a patch to configure.' http://sourceforge.net/projects/freedos/files/Kernel/2041/ke2041_86f32.zip/download