On Sun, 26 May 2013, Carlos R. Mafra escribió: > On Sun, 26 May 2013 at 20:29:15 +0200, Rodolfo García Peñas wrote: > > > > +#endif /* WMSWITCHMENU_H */ > > > > diff --git a/src/winspector.c b/src/winspector.c > > > > index 41d3afb..59b56f2 100644 > > > > --- a/src/winspector.c > > > > +++ b/src/winspector.c > > > > @@ -47,6 +47,7 @@ > > > > #include "client.h" > > > > #include "wmspec.h" > > > > #include "misc.h" > > > > +#include "switchmenu.h" > > > > > > > > #include <WINGs/WUtil.h> > > > > > > Shouldn't switchmenu.h include at least the definition of WScreen? > > > > Yes/No. > > > > Yes, because switchmenu.h includes WScreen and WWindow types, defined at > > screen.h and window.h. > > No, because switchmenu.h is included before screen.h and window.h includes. > > You can't rely on the order in which the files are included because otherwise > things become fragile and simple changes can break the build. > > > Here, you can choose the right option. I will do the patch if needed. > > It's better to include them, see rule #9 of that guide.
Sure. One thing more before send the patches again, see below. > [mafra@rMBP:wmaker.git]$ gcc src/switchmenu.h > src/switchmenu.h:25:23: error: unknown type name ‘WScreen’ > src/switchmenu.h:25:37: error: unknown type name ‘WWindow’ > src/switchmenu.h:26:21: error: unknown type name ‘WScreen’ Ok, there are many files with this problem, so: 1. I could make the patch for all of them, including switchmenu.h 2. I send the new switchmenu.h and then send the patch for all of them. Of course, I prefer the first option, because: a) less work for me. b) less traffic with old patches c) the patches I sent don't creates any new problem > but I guess one also needs to change the #include "config.h" > to #include "../config.h" in src/wconfig.h.in +1, but we should check that all is ok after the change. New variables... > Many .h files do not currently "compile". > > > -- > To unsubscribe, send mail to [email protected]. -- ||// //\\// Rodolfo "kix" Garcia ||\\// //\\ http://www.kix.es/ -- To unsubscribe, send mail to [email protected].
