forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

support for sys/poll

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
reakt



Joined: 06 May 2005
Posts: 22
Location: Basingstoke, UK

PostPosted: Fri Mar 10, 2006 8:36 pm    Post subject: support for sys/poll Reply with quote

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
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Sat Mar 11, 2006 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
reakt



Joined: 06 May 2005
Posts: 22
Location: Basingstoke, UK

PostPosted: Sat Mar 11, 2006 7:35 pm    Post subject: Reply with quote

OK thanks. I will use select and socket events instead of POLLIN / POLLOUT, etc.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group