[freetds] always poll, even without poll(2)
James K. Lowden
jklowden at freetds.org
Sat Dec 20 01:24:55 EST 2008
I added src/replacements/fakepoll.c tonight. Quite a bit cleaner than
what I found on the 'Net, if I do say so myself, but the guts are the
same. You can learn a lot about poll/select by working on a function that
does one in terms of the other.
Currently it's named "fakepoll()" because when I named it "poll()", it
supplanted poll(2) on my machine. (Quite helpful for debugging it, btw!)
Clearly there's a little autoconf work ahead. (Freddy, if you know how to
make fakepoll be used only when there's no poll(2), I'd be grateful if
you'd show me. I didn't want to add the whole contents of fakepoll.h to
replacements.h.)
Always having poll/fakepoll around will mean we can drop #if USE_POLL from
the code, as well as all references to select(2). Probably we should
rename tds_select to tds_poll at the same time....
--jkl
More information about the FreeTDS
mailing list