|
From: sfeam <sf...@us...> - 2015-05-03 17:24:08
|
On Sunday, 03 May 2015 08:02:17 AM Tatsuro MATSUOKA wrote:
> ----- Original Message -----
>
> > From: Tatsuro MATSUOKA
> > To: tmacchant3; gnuplot-beta
> > Cc:
> > Date: 2015/5/3, Sun 07:39
> > Subject: Re: Cygwin build fails at in compling wxt_gui.cpp
> >
> > ----- Original Message -----
> >
> >> From: Tatsuro MATSUOKA
> >> To: gnuplot-beta
> >> Cc:
> >> Date: 2015/5/3, Sun 07:35
> >> Subject: Cygwin build fails at in compling wxt_gui.cpp
> >>
> >> Hello
> >>
> >> The cygwin version was bumped up to ver. 2.0.0 recently.
> >>> From the version up, the build of gnuplot on cygwin (32 and 64 bit)
> > fails
> >> at compiling wxt_gui.cpp
> >>
> >> ../../gnuplot/src/wxterminal/wxt_gui.cpp: In function 'int
> >> wxt_waitforinput(int)':
> >> ../../gnuplot/src/wxterminal/wxt_gui.cpp:3710:20: error: 'select'
> > was
> >> not declared in this scope
> >> timeout );
> >>
> >> Any suggestions?
> >
> >
> > I forgot to mention what source was used.
> > The source used is cvs version (ChangeLog 2015-05-02.)
> >
>
>
>
> The patch below
>
> #*******************************
> --- wxt_gui.orig.h 2014-12-27 08:21:48.000000000 +0900
> +++ wxt_gui.h 2015-05-03 07:53:12.766815500 +0900
> @@ -201,6 +201,12 @@
> * only needed here when using WXGTK
> * (or at least not needed on Windows) */
> # include <signal.h>
> +/* cygwin*/
> +/* According to POSIX.1-2001 */
> +#ifdef __CYGWIN__
> +#include <sys/select.h>
> +#endif
> +
> }
> #***********************************
>
> makes the compiling successful.
> However, select function is used in other places in the gnuplot code.
> I cannot figure out why the above is required for the current cygwin + wxwidgtes 2.8.
>
> Tatsuro
The call to select() is inside a block marked #ifdef WXT_MULTITHREADED
Maybe the new cygwin version now supports multithreading but the older
one did not?
Does the patch fix it also? It seems to me that other platforms in
addition to cygwin also may want this change.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff -urp gnuplot/src/wxterminal/wxt_gui.h gnuplot-cvs/src/wxterminal/wxt_gui.h
--- gnuplot/src/wxterminal/wxt_gui.h 2014-12-26 15:21:48.000000000 -0800
+++ gnuplot-cvs/src/wxterminal/wxt_gui.h 2015-05-03 10:17:01.984135939 -0700
@@ -201,6 +201,12 @@ extern "C" {
* only needed here when using WXGTK
* (or at least not needed on Windows) */
# include <signal.h>
+
+/* Needed for cygwin v2.0.0 and maybe others */
+#if defined(HAVE_SYS_SELECT_H) && defined(WXT_MULTITHREADED)
+#include <sys/select.h>
+#endif
+
}
/* interaction with wxt.trm(wxt_options) : plot number, enhanced state.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ethan
|