ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/01/13/19:08:53

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
From: Eli Zaretskii <eliz AT gnu DOT org>
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: <E1PdWsW-0000av-G3@fencepost.gnu.org>
Date: Thu, 13 Jan 2011 18:46:52 -0500
Reply-To: djgpp AT delorie DOT com

> From: Rugxulo <rugxulo 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)
>  #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.

- Raw text -


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