| View previous topic :: View next topic |
| Author |
Message |
reakt
Joined: 06 May 2005 Posts: 22 Location: Basingstoke, UK
|
Posted: Fri Mar 10, 2006 8:36 pm Post subject: support for sys/poll |
|
|
Hi,
I have two questions - firstly, is support for sys/poll something that is planned for PSPSDK?
Secondly, can somebody help me come up with a workaround for the timebeing?...
I'm working on a porting project and I need sys/poll.h. I notice this is not in the PSPSDK yet (unless I'm mistaken). Since I'm using Cygwin, I copied /usr/include/sys/poll.h to /usr/local/pspdev/psp/include/sys and the compiler is happy at least! The linker on the other hand is complaining of an undefined reference to poll. I did some searching and found that poll is part of the standard C library. I added -lc to my Makefile but still no luck. I always get the same error:
/cygdrive/d/code/test.cpp:156: undefined reference to `poll'
Any ideas? Thanks!
PS: Perhaps I can help with the porting of sys/poll to the PSPSDK - where do I start - i.e. which source files are used as the starting point? Thanks
UPDATE
---------
I found a workaround - to use select() instead of poll() - there was an example of how to do this in the source for libcurl. I do still need the datatypes from poll.h for this workaround, just not the implementation of poll(). |
|
| Back to top |
|
 |
danzel
Joined: 04 Nov 2005 Posts: 182
|
Posted: Sat Mar 11, 2006 2:45 pm Post subject: |
|
|
| You should be able to use select fine with no work arounds, the include you need is <sys/fd_set.h> iirc |
|
| Back to top |
|
 |
reakt
Joined: 06 May 2005 Posts: 22 Location: Basingstoke, UK
|
Posted: Sat Mar 11, 2006 7:35 pm Post subject: |
|
|
| OK thanks. I will use select and socket events instead of POLLIN / POLLOUT, etc. |
|
| Back to top |
|
 |
|