[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r7028: Only use __builtin_offsetof with gcc 4 or later (in tor/trunk: . src/common)



Author: nickm
Date: 2006-08-11 03:42:11 -0400 (Fri, 11 Aug 2006)
New Revision: 7028

Modified:
   tor/trunk/
   tor/trunk/src/common/util.h
Log:
 r7337@Kushana:  nickm | 2006-08-11 00:42:04 -0700
 Only use __builtin_offsetof with gcc 4 or later



Property changes on: tor/trunk
___________________________________________________________________
Name: svk:merge
   - 17f730b7-d419-0410-b50f-85ee4b70197a:/local/or/tor/trunk:8245
1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
96637b51-b116-0410-a10e-9941ebb49b64:/tor/branches/spec:7005
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7014
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/mmap:7030
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/trans-ap:7315
c95137ef-5f19-0410-b913-86e773d04f59:/tor/trunk:7335
   + 17f730b7-d419-0410-b50f-85ee4b70197a:/local/or/tor/trunk:8245
1f724f9b-111a-0410-b636-93f1a77c1813:/local/or/tor/trunk:8207
96637b51-b116-0410-a10e-9941ebb49b64:/tor/branches/spec:7005
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/eventdns:7014
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/mmap:7030
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/oo-connections:6950
c95137ef-5f19-0410-b913-86e773d04f59:/tor/branches/trans-ap:7315
c95137ef-5f19-0410-b913-86e773d04f59:/tor/trunk:7337

Modified: tor/trunk/src/common/util.h
===================================================================
--- tor/trunk/src/common/util.h	2006-08-11 07:41:21 UTC (rev 7027)
+++ tor/trunk/src/common/util.h	2006-08-11 07:42:11 UTC (rev 7028)
@@ -97,7 +97,7 @@
 #define tor_memdup(s, n)       _tor_memdup(s, n DMALLOC_ARGS)
 
 /** Return the offset of <b>member</b> within the type <b>tp</b>, in bytes */
-#ifdef __GNUC__
+#if defined(__GNUC__) && __GNUC__ > 3
 #define STRUCT_OFFSET(tp, member) __builtin_offsetof(tp, member)
 #else
  #define STRUCT_OFFSET(tp, member) \