X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com From: Eli Zaretskii To: djgpp AT delorie DOT com In-reply-to: <1fe05fe1-8da1-4680-98d9-0394c965dc0c AT d8g2000yqf DOT googlegroups DOT com> (message from Rugxulo on Thu, 13 Jan 2011 11:06:31 -0800 (PST)) Subject: Re: Ruby 1.8.7pl330 + DJGPP (was Re: GCC-4.5.2) 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> Message-Id: Date: Thu, 13 Jan 2011 18:46:52 -0500 Reply-To: djgpp AT delorie DOT com > From: Rugxulo > 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) > #if defined __CYGWIN32__ || defined __MINGW32__ ??? Why did you need to mess with Windows-related conditionals, when you were building a DJGPP port? > - if ((fd = _open(s, O_CREAT|O_EXCL, 0666)) >= 0) { > - _close(fd); > - _unlink(s); /* don't leave it laying around */ > + if ((fd = open(s, O_CREAT|O_EXCL, 0666)) >= 0) { > + close(fd); > + unlink(s); /* don't leave it laying around */ Is this part common to Windows and DJGPP builds? If so, it would be better to have a preprocessor conditional here to DTRT for each one of them.