I read larbin source code recently. But I have a doubt. I the global.h file define the global class, at the end of this file have a macro like this:
But in the fetch/fetchPipe.cc file, call this macro like this:
The question is why use global:: to call this macro? I think use
is ok. Any body can tell me why?
preguntado el 30 de julio de 12 a las 13:07
The source code is a complete mess, it won't even compile. It seems that
global.h has been changed between version 2.2.2 and the current version 2.6.3 without addressing those changes in
fetch/fetchPipe.h. Also have a look at those include statements in
This code is outdated and not standard C++. There are several other things wrong. But back to your question: yes,
setPoll(n, POLLOUT); should be sufficient. Using
global::setPoll will not result in a bug, since this will expand to
global::global::pollfds[global::posPoll].fd = fds; global::pollfds[global::posPoll].events = event; global::posPoll++;
global es un
struct (consulte la sección del Mike Seymour's comment).