I believe I had to do something similar to make sipXtackLib to compile with
VS2008, so the way you propose to implement it I think is the correct way.
On Thu, Oct 22, 2009 at 3:09 PM, Хныкин Евгений <hsil...@gmail.com> wrote:

> Hello everyone.
> I have got MSVS2008 under Windows 7. And latest "sipxtapi" sources.
> When i try to compile sipXtackLib, i get some errors:
>
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(45) : error C2011:
> 'pollfd' : 'struct' type redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1506) :
> see declaration of 'pollfd'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(61) : warning C4005:
> 'POLLIN' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1495) :
> see previous definition of 'POLLIN'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(62) : warning C4005:
> 'POLLPRI' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1496) :
> see previous definition of 'POLLPRI'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(63) : warning C4005:
> 'POLLOUT' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1499) :
> see previous definition of 'POLLOUT'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(64) : warning C4005:
> 'POLLRDNORM' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1493) :
> see previous definition of 'POLLRDNORM'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(65) : warning C4005:
> 'POLLWRNORM' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1498) :
> see previous definition of 'POLLWRNORM'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(66) : warning C4005:
> 'POLLRDBAND' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1494) :
> see previous definition of 'POLLRDBAND'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(67) : warning C4005:
> 'POLLWRBAND' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1500) :
> see previous definition of 'POLLWRBAND'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(82) : warning C4005:
> 'POLLERR' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1502) :
> see previous definition of 'POLLERR'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(83) : warning C4005:
> 'POLLHUP' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1503) :
> see previous definition of 'POLLHUP'
> 1>e:\sipxtapi\sipxtacklib\include\resparse\poll.h(84) : warning C4005:
> 'POLLNVAL' : macro redefinition
> 1> c:\program files\microsoft sdks\windows\v6.0a\include\winsock2.h(1504) :
> see previous definition of 'POLLNVAL'
>
> I opened winsock2.h and there is exists section:
>
> #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
>
> typedef struct pollfd {
>
> SOCKET fd;
> SHORT events;
> SHORT revents;
>
> } WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD;
>
> #endif // (_WIN32_WINNT >= 0x0600)
>
> Yes, a can to define _WIN32_WINNT as 0x0500, but i would find more best
> solution. Can i change poll.h, move similar definitions to
> #if(_WIN32_WINNT < 0x0600)
> #endif
> or i'll get other mistakes?
>
> _______________________________________________
> sipxtapi-dev mailing list
> sipxtapi-dev@list.sipfoundry.org
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
>
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev@list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to