[brlcad-commits] SF.net SVN: brlcad:[37527] brlcad/trunk/include/bu.h
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <bo...@us...> - 2010-02-02 20:09:27
|
Revision: 37527 http://brlcad.svn.sourceforge.net/brlcad/?rev=37527&view=rev Author: bob1961 Date: 2010-02-02 20:09:17 +0000 (Tue, 02 Feb 2010) Log Message: ----------- The cast to long is now part of the bu_offsetof definition. Modified Paths: -------------- brlcad/trunk/include/bu.h Modified: brlcad/trunk/include/bu.h =================================================================== --- brlcad/trunk/include/bu.h 2010-02-02 20:08:38 UTC (rev 37526) +++ brlcad/trunk/include/bu.h 2010-02-02 20:09:17 UTC (rev 37527) @@ -1765,12 +1765,15 @@ * Files using bu_offsetof or bu_offsetofarray will need to include * stddef.h in order to get offsetof() */ +/* FIXME - this is a temporary cast. The bu_structparse sp_offset member + * should be a size_t. + */ #ifndef offsetof # define bu_offsetof(_t, _m) (size_t)(&(((_t *)0)->_m)) # define bu_offsetofarray(_t, _m) (size_t)((((_t *)0)->_m)) #else -# define bu_offsetof(_t, _m) offsetof(_t, _m) -# define bu_offsetofarray(_t, _m) offsetof(_t, _m[0]) +# define bu_offsetof(_t, _m) (long)offsetof(_t, _m) +# define bu_offsetofarray(_t, _m) (long)offsetof(_t, _m[0]) #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |