MacArthur, Ian (SELEX GALILEO, UK) wrote:
>> c:\fltk-1.3.x-r6960\src\Fl_win32.cxx(236) : warning C4005: 
>> 'POLLIN' : macro redefinition
>>         C:\Program Files\Microsoft 
>> SDKs\Windows\v6.0A\\include\winsock2.h(1495) : see previous 
>> definition of 'POLLIN'
>> c:\fltk-1.3.x-r6960\src\Fl_win32.cxx(237) : warning C4005: 
>> 'POLLOUT' : macro redefinition
>>         C:\Program Files\Microsoft 
>> SDKs\Windows\v6.0A\\include\winsock2.h(1499) : see previous 
>> definition of 'POLLOUT'
>> c:\fltk-1.3.x-r6960\src\Fl_win32.cxx(238) : warning C4005: 
>> 'POLLERR' : macro redefinition
>>         C:\Program Files\Microsoft 
>> SDKs\Windows\v6.0A\\include\winsock2.h(1502) : see previous 
>> definition of 'POLLERR'
> 
> Well, it looks like MS finally got around to defining POLLIN, POLLOUT
> and POLLERR.
> 
> I guess we need to put an
> 
> #ifndef POLLIN
> #  define POLLIN 1
> #endif
> 
> And so forth then...

Yes, that seems appropriate. IIRC we had a report concerning this
also for FLTK 1.1 some time ago.

To be sure: Greg, would you please check what the definition
of POLL* in winsock2.h is? Hopefully the same ...

If we can fix it in a sensible way, we should do this for 1.1.10
as well before the (next) release (candidate).

>> c:\fltk-1.3.x-r6960\src\Fl_win32.cxx(1477) : error C2248: 
>> 'FORCE_POSITION' : cannot access protected enumerator 
>> declared in class 'Fl_Widget'
>>         ../..\FL/Fl_Widget.H(151) : see declaration of 
>> 'FORCE_POSITION'
>>         ../..\FL/Fl_Widget.H(91) : see declaration of 'Fl_Widget'
> 
> This is an odd one... Right enough, that enum is "protected" in
> Fl_Widget, and Fl_Group (and hence FL_Window) only derive from the
> public part of Fl_Widget...
> 
> But does that mean we can't look at the enum values...?
> 
> Why does no other compiler choke on this. Strange...

Somewhere in the Fl_Widget.H there is:

   friend class Fl_Group;

I don't know if there's a bug in the MS compiler, or if it
is correct, and I don't have the time to look at the code
right now.

Anyway, this has changed recently by combining all Fl_Widget
flags in one file, and maybe this needs to be checked again.

> I suppose we could put an:
> #ifdef _WIN32_
> public:
> #endif
> 
> Type of thing around the enum definition...?

Hmm, or make it public anyway, or maybe use a MS-specific
compiler version macro, something like MSVC_VER or whatever
it's called ...

Greg or anybody else, would you please be so kind to do a
compile test with 1.1.10-rc* as well to see what we need to
do for a release? TIA.

Albrecht
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to