[OpenAFS-devel] help with conflicting macros in C

Neulinger, Nathan nneul@umr.edu
Mon, 1 Apr 2002 10:56:42 -0600


Given:

#define min(a,b) ......
struct mydate
{
	int hour;
	int min;
	int sec;
};

Is there any way to make that work? I can #undef min, but that breaks
things later. I could #undef min, then #define min, but that seems goofy
to me and might potentially change the def of min, but I suppose I can
just pick a standard definition.=20

Is there any standard preprocessor directive to temporarily disable
macros?

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216