|
From: S. D. M. <ma...@ni...> - 2013-02-28 20:28:54
|
We were able to work around the issue within the plugin. On Thu, Jan 3, 2013 at 9:30 PM, Tom Henderson <to...@to...> wrote: > On 01/02/2013 12:38 PM, S. David Mattes wrote: >> >> Hi, >> >> I was reviewing the code changes from revision 257 for arbitrary LSI >> prefix specification: >> http://openhip.svn.sourceforge.net/openhip/?rev=257&view=rev >> >> We are trying to build a VPLS plugin outside of OpenHIP and, because >> of the use of the HCNF global variable within a macro definition, we >> are now having compilation problems. >> >> The macro in question is defined in hip_funcs.h: >> >> http://openhip.svn.sourceforge.net/viewvc/openhip/hip/trunk/src/include/hip/hip_funcs.h?r1=257&r2=256&pathrev=257 >> >> /* LSI functions */ >> #define LSI_PREFIX ((((struct sockaddr_in *) \ >> (&HCNF.lsi_prefix))->sin_addr.s_addr)) >> #define IS_LSI32(a) ((a & htonl(0xFF000000L)) == LSI_PREFIX) >> >> Generally, I'm wondering if it's considered good practice to use >> global variables in macro definitions, and specifically if there's >> another way to achieve this functionality? > > > What compilation error are you having? Would it be solved by hiding the > variable behind a helper function in hip_util.c? > > In general, there are too many (unprotected) globals in the code but perhaps > we can band-aid this one and leave the broader issue for later. > > - Tom >> >> >> Thank you, >> David >> >> >> ------------------------------------------------------------------------------ >> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery >> and much more. Keep your Java skills current with LearnJavaNow - >> 200+ hours of step-by-step video tutorials by Java experts. >> SALE $49.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122612 >> _______________________________________________ >> Openhip-developers mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openhip-developers >> > |