Message-ID: <39219CC4.EC6D90A@softhome.net> Date: Tue, 16 May 2000 22:08:52 +0300 From: Laurynas Biveinis X-Mailer: Mozilla 4.72 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: DJGPP Workers Subject: Minor GCC & DJGPP header problem Content-Type: text/plain; charset=iso-8859-4 Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com It is not (as far as I can see) related to the previous discussion: Excerpt from one GCC internal include file (gcc/system.h): #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif And from DJGPP's stddef.h: #define offsetof(s_type, mbr) ((size_t) &((s_type *)0)->mbr) offsetof in DJGPP is defined uncoditionally, so there are lots of harmless but annoying warnings like In file included from ../../gcc/../include/libiberty.h:132, from ../../gcc/system.h:563, from ../../gcc/cppmain.c:24: d:/djgpp/include/stddef.h:12: warning: `offsetof' redefined I see two solutions: 1) as it is done with NULL in stdio.h: #undef offsetof #define offsetof we_dont_care_about_previous_def 2) as gcc does #ifndef offsetof #define offsetof we_care_about_previous_def #endif Which one (or noone) is OK? Laurynas Biveinis