File imap-2002c-c++.diff of Package imap

--- src/c-client/c-client.h
+++ src/c-client/c-client.h
@@ -31,11 +31,6 @@
 
 #ifdef __cplusplus		/* help out people who use C++ compilers */
 extern "C" {
-  /* If you use gcc, you may also have to use -fno-operator-names */
-#define private cclientPrivate	/* private to c-client */
-#define and cclientAnd		/* C99 doesn't realize that ISO 646 is dead */
-#define or cclientOr
-#define not cclientNot
 #endif
 
 #include "mail.h"		/* primary interfaces */
@@ -47,7 +42,6 @@
 #include "misc.h"		/* miscellaneous utility routines */
 
 #ifdef __cplusplus		/* undo the C++ mischief */
-#undef private
 }
 #endif
 
--- src/c-client/mail.h
+++ src/c-client/mail.h
@@ -813,7 +813,11 @@
     unsigned int sequence : 1;	/* saved sequence bit */
     unsigned int dirty : 1;	/* driver internal use */
     unsigned int filter : 1;	/* driver internal use */
+#ifndef __cplusplus
   } private;
+#else
+  } cclientPrivate;
+#endif
 			/* internal date */
   unsigned int day : 5;		/* day of month (1-31) */
   unsigned int month : 4;	/* month of year (1-12) */
@@ -924,8 +928,13 @@
 SEARCHPGM {			/* search program */
   SEARCHSET *msgno;		/* message numbers */
   SEARCHSET *uid;		/* unique identifiers */
+#ifndef __cplusplus
   SEARCHOR *or;			/* or'ed in programs */
   SEARCHPGMLIST *not;		/* and'ed not program */
+#else
+  SEARCHOR *cclientOr;		/* or'ed in programs */
+  SEARCHPGMLIST *cclientNot;	/* and'ed not program */
+#endif
   SEARCHHEADER *header;		/* list of headers */
   STRINGLIST *bcc;		/* bcc recipients */
   STRINGLIST *body;		/* text in message body */
@@ -1108,8 +1117,12 @@
       char *text;		/* cache of fetched text */
     } search;
     STRING string;		/* stringstruct return hack */
+#ifndef __cplusplus
   } private;
-			/* reserved for use by main program */
+#else
+  } cclientPrivate;
+#endif
+			/* RESERVed for use by main program */
   void *sparep;			/* spare pointer */
   unsigned int spare : 1;	/* first spare bit */
   unsigned int spare2 : 1;	/* second spare bit */