[JDEV] longshot
Justin Kirby
justin at openaether.org
Sat Dec 14 01:13:10 CST 2002
The only thing that I can think of which would provide the same behavior
is to define it as a function...
#if defined I_HAVE_A_LAME_COMPILER
terror TERROR_NOTALLOWED_func(){
terror tmp;
tmp.code=405;
strcpy(tmp.msg,"Not Allowed");
return tmp;
}
#define TERROR_NOTALLOWED TERROR_NOTALLOWED_func()
#else
#define TERROR_NOTALLOWED (terror) { 405, "Not Allowed" }
#endif
This *might* work
Justin
On Fri, 2002-12-13 at 15:57, Nicholas Blair wrote:
> Anyone know if there is another way to write this type of statement in
> C:
>
> <from file="jabberd/lib/lib.h">
>
> #define TERROR_NOTALLOWED (terror) { 405, "Not Allowed" }
>
> </from>
>
> The Sun Forte compiler under Solaris don't seem to like this - anyone
> think of another way to define a constant struct?
>
> Thanks,
> Nicholas Blair
> nblair at doit.wisc.edu
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list