]> rtime.felk.cvut.cz Git - ulut.git/commitdiff
The UL_OFFSETOF return type changed to size_t
authorppisa <ppisa>
Tue, 8 Jul 2008 21:09:27 +0000 (21:09 +0000)
committerppisa <ppisa>
Tue, 8 Jul 2008 21:09:27 +0000 (21:09 +0000)
to silence enormous number of warnings on 64-bit systems.

The dependence on size_t could be problem in some specific
target configurations although.

ulut/ul_utdefs.h

index 3cf4b27d0c8a9b275450425b42cede361543295a..6b5eb4ee773c0f556fbbee6f48903a604f734aef 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
 #ifndef UL_OFFSETOF
 /* offset of structure field */
 #define UL_OFFSETOF(_type,_member) \
-                ((int)&(((_type*)0)->_member))
+                ((size_t)&(((_type*)0)->_member))
 #endif /*UL_OFFSET*/
 
 #ifndef UL_CONTAINEROF