Hi Dirk,
A similar problem has been seen by other users when using Microsoft
Visual C++ 2008 Express Edition.
The problem turned out to be apparently an error in Microsoft's header
file. Here is a message from Anthony Owen at the Australian Synchrotron
with his fix.
*******************************************************************
Hi Mark,
It turns out that the issue was with the Microsoft SDK. The SDK is
installed as part of the Visual Studio Package.
I tried SDK 6.0V and SDK 7.0 and got the same problem. It was narrowed
down to be the version being incorrectly detected in the file:
C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\sdkddkver.h
<snip>
#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
#define _WIN32_WINNT 0x0601
#endif
<snip>
It was defining 0x0601 which appears to be Windows 7.
With this changed to 0x0503 (Windows XP SP3) and ASYN reverted to its
original form, POLLIN is not defined and ASYN uses FAKE_POLL.
It compiled and executed successfully.
Hope this helps if you have to use Visual Express!
Best Regards,
Anthony Owen
*******************************************************************
So the header file was incorrectly setting the system version to be
0x0601, which is Windows 7, even though it was an XP system. That then
caused POLLIN to be defined when it should not have been.
Is there a similar problem in Visual Studio 10?
Mark
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dirk Zimoch
Sent: Monday, November 15, 2010 10:58 AM
To: EPICS
Subject: asyn driver on Windows XP
Hi all,
I have a problem with the latest version of asyn driver on Windows XP.
It tries to use a function WSAPoll() that does not exist in XP, only in
Vista and newer. However I do not want use an old version of asyn driver
without that function because of all the new features and bugfixes.
The code in question is:
#if defined(__rtems__)
# define USE_SOCKTIMEOUT
#else
# define USE_POLL
# if defined(vxWorks)
# define FAKE_POLL
# elif defined(_WIN32)
# if defined(POLLIN)
# define poll(fd,nfd,t) WSAPoll(fd,nfd,t)
# else
# define FAKE_POLL
# endif
# else
# include <sys/poll.h>
# endif
#endif
It seems I have POLLIN defined but no WSAPoll.
I am using the compiler from Visual Studio 10.
Any idea?
Dirk
- References:
- asyn driver on Windows XP Dirk Zimoch
- Navigate by Date:
- Prev:
asyn driver on Windows XP Dirk Zimoch
- Next:
Re: asyn driver on Windows XP Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
asyn driver on Windows XP Dirk Zimoch
- Next:
Re: asyn driver on Windows XP Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|