- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 2 selects in hpux 11.31?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2009 10:52 AM
01-14-2009 10:52 AM
2 selects in hpux 11.31?
I'm trying to build the code on 11.31 and I'm getting errors which I've boiled down to selects during the compile.
here are parts of the manpage of select.
on 11.11 select(2)
#include
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set
*errorfds, struct timeval *timeout);
11.31 select(2)
#include
int pselect(int nfds, fd_set *__restrict readfds,
fd_set *__restrict writefds, fd_set *__restrict errorfds,
const struct timespec *__restrict timeout,
const sigset_t *__restrict sigmask);
int select(int nfds, fd_set *__restrict readfds,
fd_set *__restrict writefds, fd_set *__restrict errorfds
struct timeval *__restrict timeout);
void FD_CLR(int fd, fd_set *fdset);
int FD_ISSET(int fd, fd_set *fdset);
void FD_SET(int fd, fd_set *fdset);
void FD_ZERO(fd_set *fdset);
For Backward Compatibility Only: (_XOPEN_SOURCE_EXTENDED not defined)
#include
int select(size_t nfds, int *readfds, int *writefds,
int *exceptds, const struct timeval *timeout);
In 11.31, there are 2 types of select statements. One for backwards comaptability???.... which is expecting in int as the 3rd argument which we aren't passing because in both 11.11 and 11.23, its using the other select.
any ideas why this is happening and what I can do?
also, what has changes between 11.11 11.23 and 11.31 that would cause this?
Thanks.
CRS
- Tags:
- select
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2009 02:27 PM
01-14-2009 02:27 PM
Re: 2 selects in hpux 11.31?
What were the error messages _before_ you
boiled them down?
> which is expecting in int as the 3rd
> argument which we aren't passing because in
> both 11.11 and 11.23, its using the other
> select.
Huh?
> any ideas why this is happening [...]
Why _what_, exactly, is happening? You seem
to have boiled all the useful info out of
your problem report.
> [...] and what I can do?
Not sure yet.
Other than those fancy new "__restrict"
keywords, what's the difference between the
old declaration of select() and the new one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2009 03:30 PM
01-14-2009 03:30 PM
Re: 2 selects in hpux 11.31?
thanks for you time.
## Compiling unixipc.cpp to unixipc.o
aCC -AA -mt +Olit=all -Wc,on +DO11.31 +W829 +W849 -D_REENTRANT -DCMBUILD=\""-.----"\" -DOS_IS_UNIX -DOS_IS_HPUX -DOS_IS_HPUX11_31 -DOS_IS_HPUX11 -g -DCM_HAS_UNIXSOCK -DCM_HAS_RPC -DHAVE_PNG_LIBRARY=1 -DHAVE_ZLIB_LIBRARY=1 -DHAVE_BZIP2_LIBRARY=1 +Z \
-I../include \
-c unixipc.cpp -o unixipc.o
"unixipc.cpp", line 131: warning #2191-D: type qualifier is meaningless on
cast type
const CMUnixIPCRep* rep = static_cast
^
"unixipc.cpp", line 138: warning #2191-D: type qualifier is meaningless on
cast type
const CMUnixIPCRep* rep = static_cast
^
"unixipc.cpp", line 144: warning #2191-D: type qualifier is meaningless on
cast type
const CMUnixIPCRep* rep = static_cast
^
"unixipc.cpp", line 152: warning #2191-D: type qualifier is meaningless on
cast type
const CMUnixIPCRep* rep = static_cast
^
"unixipc.cpp", line 158: warning #2191-D: type qualifier is meaningless on
cast type
const CMUnixIPCRep* rep = static_cast
^
"unixipc.cpp", line 165: warning #2191-D: type qualifier is meaningless on
cast type
const CMUnixIPCRep* rep = static_cast
^
"unixipc.cpp", line 264: error #2167: argument of type "fd_set *" is
incompatible with parameter of type "int *"
int rc = ::select( rep->fd + 1, &r, NULL, NULL, &tv );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2009 05:01 PM
01-14-2009 05:01 PM
Re: 2 selects in hpux 11.31?
Then you need to select the proper namespace so you don't get the wrong one. It seems you must define _XOPEN_SOURCE_EXTENDED.
>any ideas why this is happening and what I can do?
Because 11.31 is UNIX 2003 branded and had to change?
>what has change between 11.11 11.23 and 11.31 that would cause this?
The changes just look like syntactic sugar, required to meet the standard.
warning #2191-D: type qualifier is meaningless on cast type
const CMUnixIPCRep* rep = static_cast
You need to remove this const:
... = static_cast
error #2167: argument of type "fd_set *" is incompatible with parameter of type "int *"
int rc = ::select(rep->fd + 1, &r, NULL, NULL, &tv);
You need to change your -Ds so you get the other select(2). You can compile with -E -.i to see what you are getting.
Or you can use a hammer to change your argument from fd_set* to int*.
>Steven: what's the difference between the old declaration of select() and the new one?
int* vs fd_set*. Which is very clear now that we have the error message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2010 04:11 AM
04-19-2010 04:11 AM
Re: 2 selects in hpux 11.31?
"#include
"#include
This way, the right select definition is loaded before the wrong one preventing the wrong to be used. Now everyting is compiled.