Quick solution for bug 5906 (ClibPDF + IMAP)

From: Date: Sat, 17 Mar 2001 22:11:31 +0000
Subject: Quick solution for bug 5906 (ClibPDF + IMAP)
Groups: php.dev 
Request: Send a blank email to php-dev+get-49261@lists.php.net to get a copy of this message
Bug 5906 is a fatal compile error which occurs when including both IMAP and ClibPDF support. Problem: IMAP headers define T, which collide with a cpdflib function declaration. Solution: Get rid of it before incuding cpdflib.h. T is unused anyway, but if someone someday decides to use T in the imap module he is in for a suprise. Here is the offending snippet from mail.h: #define NIL 0 /* convenient name */ #define T 1 /* opposite of NIL */ Ofcourse anyone defining a macro named T in a lib for public consumption should be shot. And NIL too for that matter. I guess this just adds to the cozy old-broken-mess feeling that surrounds c-client. Regards, Fredrik -- Do fish get thirsty? Fredrik Öhrn Chalmers University of Technology ohrn@chl.chalmers.se Sweden Index: php_cpdf.h =================================================================== RCS file: /repository/php4/ext/cpdf/php_cpdf.h,v retrieving revision 1.6 diff -u -r1.6 php_cpdf.h --- php_cpdf.h 2000/07/02 23:46:38 1.6 +++ php_cpdf.h 2001/03/17 21:50:54 @@ -33,6 +33,13 @@ #if HAVE_CPDFLIB +/* IMAP headers define T, which collide with a cpdflib function declaration. + Get rid of it before incuding cpdflib.h since T isn't unused anyway. */ + +#ifdef T +#undef T +#endif + #include <cpdflib.h> extern zend_module_entry cpdf_module_entry;

« previous php.dev (#49261) next »