No.

compiling curses
gcc -fno-common -g -O2 -pipe -I. -I/Users/elliotth/Projects/ruby/ruby
-I/Users/elliotth/Projects/ruby/ruby
-I/Users/elliotth/Projects/ruby/ruby/ext/curses -DHAVE_NCURSES_H
-DHAVE_ISENDWIN -DHAVE_UNGETCH -DHAVE_BEEP -DHAVE_GETNSTR -DHAVE_WGETNSTR
-DHAVE_DOUPDATE -DHAVE_FLASH -DHAVE_DELETELN -DHAVE_WDELETELN -DHAVE_KEYPAD
-DHAVE_KEYNAME -DHAVE_INIT_COLOR -DHAVE_WRESIZE -DHAVE_RESIZETERM  -c
curses.c
In file included from curses.c:22:
/usr/include/ncurses.h:282: error: conflicting types for `wchar_t'
/usr/include/stdlib.h:77: error: previous declaration of `wchar_t'
make[1]: *** [curses.o] Error 1
make: *** [all] Error 1

This does, though, and if it doesn't break other OSes looks like the least
unpleasant patch yet:

Index: curses.c
===================================================================
RCS file: /src/ruby/ext/curses/curses.c,v
retrieving revision 1.20
diff -u -r1.20 curses.c
--- curses.c    15 Aug 2003 03:01:52 -0000      1.20
+++ curses.c    17 Aug 2003 08:20:23 -0000
@@ -14,11 +14,8 @@
  */
 
 #include "ruby.h"
-
-#include <stdio.h>
 #include "rubyio.h"
 
-#define _XOPEN_SOURCE_EXTENDED 1
 #if defined(HAVE_NCURSES_H)
 # include <ncurses.h>
 #elif defined(HAVE_NCURSES_CURSES_H)
@@ -43,6 +40,8 @@
 # endif
 #endif
 #endif
+
+#define _XOPEN_SOURCE_EXTENDED 1
 
 #ifdef HAVE_INIT_COLOR
 # define USE_COLOR 1

 --elliott

-----Original Message-----
From: nobu.nokada / softhome.net
To: ruby-core / ruby-lang.org
Sent: 8/17/03 3:58 AM
Subject: Re: curses.c and Mac OS X

Hi,

At Sun, 17 Aug 2003 08:57:16 +0900,
Ryan Davis wrote:
> > |This nasty patch allows the current CVS version of Ruby to build on

> > Mac OS
> > |X. Without it, you get:

It's my fault, sorry.

> > Hmm, how did other OS X users succeed to compile?
> > Will Anyone confirm whether this is his problem or our problem?
> 
> I can confirm.
> 
> I'm using:
> 
> + Mac OS X 10.2.6 (latest non-beta OS),
> + December 2002 Developer Tools (latest non-beta dev tools).
> + latest cvs update to HEAD (2003-08-16 T 16:55 UTC-8)
> + clean build
> 
> I can also confirm that his patch fixes the error.

Can this patch fix the error?


Index: curses.c =================================================================== RCS file: /cvs/ruby/src/ruby/ext/curses/curses.c,v retrieving revision 1.20 diff -u -2 -p -r1.20 curses.c --- curses.c 15 Aug 2003 03:01:52 -0000 1.20 +++ curses.c 17 Aug 2003 02:57:49 -0000 @@ -14,10 +14,9 @@ */ -#include "ruby.h" +#define _XOPEN_SOURCE_EXTENDED 1 -#include <stdio.h> +#include "ruby.h" #include "rubyio.h" -#define _XOPEN_SOURCE_EXTENDED 1 #if defined(HAVE_NCURSES_H) # include <ncurses.h>
-- Nobu Nakada ********************************************************************* This e-mail and any attachment is confidential. It may only be read, copied and used by the intended recipient(s). If you are not the intended recipient(s), you may not copy, use, distribute, forward, store or disclose this e-mail or any attachment. If you are not the intended recipient(s) or have otherwise received this e-mail in error, you should destroy it and any attachment and notify the sender by reply e-mail or send a message to sysadmin / bluearc.com *********************************************************************