-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace select with poll in nopoll #36
base: nopoll_yocto
Are you sure you want to change the base?
Conversation
@@ -66,7 +66,7 @@ noPollPtr nopoll_io_wait_select_create (noPollCtx * ctx) | |||
* | |||
* @param fd_group The fd group to be deallocated. | |||
*/ | |||
void nopoll_io_wait_select_destroy (noPollCtx * ctx, noPollPtr fd_group) | |||
void nopoll_io_wait_select_destroy (noPollCtx * ctx, noPollPtr __fd_group) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables with double underscores
are generally reserved by libc as private namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Numerous nopoll modules violate this rule, with numerous function names, parameter names, and variable names that start with double underscores.
So the question for us would be how to deal with software we didn't write that has already been written to a standard we don't agree with.
In this specific case, I thought it was best to just conform to the naming convention already being used in this module, nopoll_io.c.
src/nopoll_decl.h
Outdated
@@ -216,7 +216,8 @@ | |||
#include <sys/socket.h> | |||
#include <netinet/in.h> | |||
#include <arpa/inet.h> | |||
#include <sys/select.h> | |||
/* #include <sys/select.h> */ | |||
#define NOPOLL_HAVE_POLL 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be automatically detected with autoconf if not then we should add the test to configure script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try without the #define.
Replace select with poll in nopoll.