Include guards (#ifndef FNAME_H / #define FNAME_H / ... / #endif) do not actually solve the circular include problem. Usually (unless you really know what you're doing and have done it on purpose) a circular include is a problem waiting to happen, although there are situations where it will still work. These are usually situations where some or all of those includes are not actually needed by the module including them. In such a case, it can all work okay if everywhere else you #include "
file1.h"
but break if you #include "
file2.h"
somewhere. In that case, you can get lucky and the declarations will be in the right order if you start with the right file and in the wrong order otherwise.
So, I guess the bottom line is that this circular include may actually be a problem, but I haven't looked carefully at it so it may be that the includes are just done for convenience in the rest of the code, in which case it's fine.
By the way, the include guard idiom is actually to solve the multiple include situation where file1.h includes file2.h and file3.h does too, and then file4.h includes both file1.h and file3.h. In that case, the guards prevent file4.h from getting two copies of file2.h.
____________________________
I was charged with conspiracy to commit jay-walking, and accessory to changing lanes without signaling after the fact
.
++Adam H. Peterson