delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/16/07:00:30

From: 065211 AT bud DOT cc DOT swin DOT edu DOT au (MURPHY, Jeremy W)
Newsgroups: comp.os.msdos.djgpp
Subject: back slash compatibility prob
Date: 16 Dec 2002 11:47:49 GMT
Organization: Swinburne University of Technology
Lines: 31
Message-ID: <atkeh5$1fh$1@c3p0.cc.swin.edu.au>
NNTP-Posting-Host: bud.cc.swin.edu.au
X-Trace: c3p0.cc.swin.edu.au 1040039269 1521 136.186.1.113 (16 Dec 2002 11:47:49 GMT)
X-Complaints-To: abuse AT swin DOT edu DOT au
NNTP-Posting-Date: 16 Dec 2002 11:47:49 GMT
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Howdy,

not sure if my previous post went through, but I've refined my question 
anyway, so forgive me for repeating myself.

I haven't programmed in djgpp for a while, so I'm a bit out of touch with
its idiosyncrasies.

I notice that if TMPDIR="c:/djgpp/tmp", it comes up as "c:\djgpp\tmp" in
a program if you use getenv() or tmpnam(), which I assume is the correct
behaviour, it makes sense.

Problem is that I'm compiling and running some C which had UNIX in mind,
and so is using the result of getenv() as part of a call to system(), and 
the backslashes are getting eaten up, or something.
So calling system("uname -s > c:\djgpp\tmp/dj200000 2>&1") is resulting 
in: 
c:\djgpp\tmp/dj400000: c:djgpptmp/dj200000: No such file or directory 
(ENOENT)

If this is all correct behaviour for djgpp, is my only course of action 
to modify the C program?

I'm sort of hoping that there's something wrong with my installation, 
because I've seen these errors before and never investigated them, but 
everything else runs fine (except Pakke, but that's another story).

Thanks, cheers.

Jeremy

- Raw text -


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