Mail Archives: djgpp/2011/01/13/19:08:53
> 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 -