delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/01/13/21:30:13

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Ruby 1.8.7pl330 + DJGPP (was Re: GCC-4.5.2)
Date: Thu, 13 Jan 2011 18:10:28 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <439f4628-5f1c-4790-bf81-1fd789bd1c66@l7g2000vbv.googlegroups.com>
References: <4D24895D DOT 5010701 AT iki DOT fi> <4D2BF57A DOT 8080206 AT iki DOT fi>
<1fe05fe1-8da1-4680-98d9-0394c965dc0c AT d8g2000yqf DOT googlegroups DOT com> <E1PdWsW-0000av-G3 AT fencepost DOT gnu DOT org>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1294971028 8768 127.0.0.1 (14 Jan 2011 02:10:28 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Fri, 14 Jan 2011 02:10:28 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: l7g2000vbv.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10,gzip(gfe)
Bytes: 3009
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

On Jan 13, 5:46=A0pm, Eli Zaretskii <e DOT  DOT  DOT  AT gnu DOT org> wrote:
> > From: Rugxulo <rugx DOT  DOT  DOT  AT gmail DOT com>
> > Newsgroups: comp.os.msdos.djgpp,comp.lang.ruby
> > Date: Thu, 13 Jan 2011 11:06:31 -0800 (PST)
>
> > -#if defined(__CYGWIN32__) || defined(_WIN32)
> > +//#if defined(__CYGWIN32__) || defined(_WIN32)
> > =A0#if defined __CYGWIN32__ || defined __MINGW32__
>
> ??? Why did you need to mess with Windows-related conditionals, when
> you were building a DJGPP port?

Believe it or not, it looks like this (lines 237 and 238), two back to
back:

#if defined(__CYGWIN32__) || defined(_WIN32)
#if defined __CYGWIN32__ || defined __MINGW32__

I had to change that else it wouldn't otherwise find the
valid_filename() function. I'm pretty sure that's a regression on
their end.

> > - =A0 =A0if ((fd =3D _open(s, O_CREAT|O_EXCL, 0666)) >=3D 0) {
> > - =A0_close(fd);
> > - =A0_unlink(s); =A0 =A0 /* don't leave it laying around */
> > + =A0 =A0if ((fd =3D open(s, O_CREAT|O_EXCL, 0666)) >=3D 0) {
> > + =A0close(fd);
> > + =A0unlink(s); =A0 =A0 =A0/* don't leave it laying around */
>
> Is this part common to Windows and DJGPP builds? =A0If so, it would be
> better to have a preprocessor conditional here to DTRT for each one of
> them.

I don't know enough preprocessor foo to be able to fix this properly.
Maybe there's a clean way, but my weak attempt didn't work. I guess I
could've just duplicated the code and stuffed it in the already-
existing "#if defined _DJGPP_" part. (It's a very weird file, does
various weird things. Not sure, but it seems to imply to have been
gleaned from Perl.)

http://www.ruby-lang.org/en/news/2010/12/25/ruby-1-8-7-p330-released/

- Raw text -


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