From: Jarkko Hietaniemi Date: Sat, 5 May 2001 17:25:00 +0000 (+0000) Subject: Add preemptive #undefs for some of the shorter and more prone X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8e3b0fb0cb9321810604b285f562851680b538c;p=p5sagit%2Fp5-mst-13.2.git Add preemptive #undefs for some of the shorter and more prone to collision regcomp.h #defines. (Background: the MASK collided with a system header #define in Rhapsody.) p4raw-id: //depot/perl@9996 --- diff --git a/regcomp.h b/regcomp.h index b292ba3..b9542c9 100644 --- a/regcomp.h +++ b/regcomp.h @@ -132,6 +132,10 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */ #define ARG_VALUE(arg) (arg) #define ARG__SET(arg,val) ((arg) = (val)) +#undef ARG +#undef ARG1 +#undef ARG2 + #define ARG(p) ARG_VALUE(ARG_LOC(p)) #define ARG1(p) ARG_VALUE(ARG1_LOC(p)) #define ARG2(p) ARG_VALUE(ARG2_LOC(p)) @@ -139,6 +143,9 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */ #define ARG1_SET(p, val) ARG__SET(ARG1_LOC(p), (val)) #define ARG2_SET(p, val) ARG__SET(ARG2_LOC(p), (val)) +#undef NEXT_OFF +#undef NODE_ALIGN + #ifndef lint # define NEXT_OFF(p) ((p)->next_off) # define NODE_ALIGN(node) @@ -151,6 +158,11 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */ #define SIZE_ALIGN NODE_ALIGN +#undef OP +#undef OPERAND +#undef MASK +#undef STRING + #define OP(p) ((p)->type) #define OPERAND(p) (((struct regnode_string *)p)->string) #define MASK(p) ((char*)OPERAND(p)) @@ -159,6 +171,11 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */ #define STR_SZ(l) ((l + sizeof(regnode) - 1) / sizeof(regnode)) #define NODE_SZ_STR(p) (STR_SZ(STR_LEN(p))+1) +#undef NODE_ALIGN +#undef ARG_LOC +#undef NEXTOPER +#undef PREVOPER + #define NODE_ALIGN(node) #define ARG_LOC(p) (((struct regnode_1 *)p)->arg1) #define ARG1_LOC(p) (((struct regnode_2 *)p)->arg1)