Albrecht Schlosser wrote:
> MacArthur, Ian (SELEX GALILEO, UK) wrote:
>> Greg 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 
>>> c:\fltk-1.3.x-r6960\src\Fl_win32.cxx(238) : warning C4005: 'POLLERR' : 
>>> macro redefinition [..]
>>
>> I guess we need to put an
>> #ifndef POLLIN
>> #  define POLLIN 1
>> #endif
>>
> Yes, that seems appropriate. [..]
> To be sure: Greg, would you please check what the definition of POLL* in 
> winsock2.h is?

        Here's what's defined in the winsock2.h file:

---- snip
#if(_WIN32_WINNT >= 0x0600)

/* Event flag definitions for WSAPoll(). */

#define POLLRDNORM  0x0100
#define POLLRDBAND  0x0200
#define POLLIN      (POLLRDNORM | POLLRDBAND)
#define POLLPRI     0x0400

#define POLLWRNORM  0x0010
#define POLLOUT     (POLLWRNORM)
#define POLLWRBAND  0x0020

#define POLLERR     0x0001
#define POLLHUP     0x0002
#define POLLNVAL    0x0004
---- snip

        So if I read that right, the net effect is:

#define POLLIN  0x0300
#define POLLOUT 0x0010
#define POLLERR 0x0001

        ..and what we have in FLTK is:

# define POLLIN  1
# define POLLOUT 4
# define POLLERR 8

        ..which is quite different.

        I guess that's why they call it winsock "2" ?

>>> 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'

> Somewhere in the Fl_Widget.H there is:
>    friend class Fl_Group;

        I think that error line in Fl_win32.cxx is part of Fl_X::make()'s 
definition,
        so not sure how the "friend class Fl_Group" would help..?

--- snip
1375: Fl_X* Fl_X::make(Fl_Window* w) {
1376:  Fl_Group::current(0); // get rid of very common user bug: forgot end()
[..]
1477:    if (!(w->flags() & Fl_Widget::FORCE_POSITION)) {
1478:      xp = yp = CW_USEDEFAULT;
1479:    } else {
--- snip
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to