From: "Smith A. Cat" Newsgroups: comp.os.msdos.djgpp Subject: Re: Default system behaviour Date: 10 Jul 1997 20:08:01 -0700 Organization: Blue Square Laboratories Lines: 24 Message-ID: <33C5A718.187F@primenet.com> References: <1 DOT 5 DOT 4 DOT 32 DOT 19970710213738 DOT 006a71a4 AT dce03 DOT ipt DOT br> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Cesar Scarpini Rabak wrote: > > I was called to help to troubleshoot a program of a coleague which is a > recent convert to DJGPP. > > In the middle of the code he makes the following functions call: > > system("dir /w/ogne/-p/s > dirs.txt"); > > It happened that his program would not list the subdirectories! > > Searching further we figure out that system from DJGPP libc searches first > the path for an executable matching the system call, and in the bin sub-dir, > there it was dir.exe (a specialized version of ls, btw). yes, and there are a bunch of other files which will do similar things with other DOS commands, which are there as "patches" to makefiles which expect UNIX commands to be available. i think the simplest way to deal with this, if it is a problem, is to keep those files zipped up, and only unzip 'em if you're going to run a gnuish makefile. i don't usually keep exe's on my system that i don't need. phil