Mail Archives: djgpp/2011/01/13/21:30:13
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 -