Jeremy Huddleston Sequoia
b8ab93dfbc
list: Use offsetof() and typeof() to determine member offsets within a structure
...
Some compilers have difficulty with the previous implementation which
relies on undefined behavior according to the C standard. Using
offsetof() from <stddef.h> (which most likely just uses
__builtin_offsetof on modern compilers) allows us to accomplish this
without ambiguity.
This fix also requires support for typeof(). If your compiler does not
support typeof(), then the old implementation will be used. If you see
failures in test/list, please try a more modern compiler.
v2: Added fallback if typeof() is not present.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net >
2012-08-29 16:09:20 -07:00
..
2009-11-11 21:40:20 -08:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2009-01-30 16:36:45 -08:00
2012-08-29 16:09:20 -07:00
2012-07-09 23:06:41 -07:00
2012-03-21 13:54:42 -07:00
2012-05-14 13:31:00 +01:00
2012-07-02 10:09:08 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-22 13:12:56 +10:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-05-17 08:50:44 +10:00
2012-07-10 00:31:02 -07:00
2012-07-25 23:30:53 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-07-09 23:06:41 -07:00
2012-07-25 23:30:53 -07:00
2012-07-06 10:35:20 +01:00
2012-06-07 14:13:51 +10:00
2012-03-22 13:12:56 +10:00
2012-03-21 13:54:42 -07:00
2010-01-06 19:47:53 +06:00
2012-08-29 16:09:20 -07:00
2012-08-07 16:20:07 -07:00
2012-08-21 07:54:07 +10:00
2012-03-21 13:54:42 -07:00
2012-05-01 11:36:30 +10:00
2012-03-21 13:54:42 -07:00
2012-07-17 16:08:04 +01:00
2012-07-07 10:37:11 +01:00
2012-07-07 10:37:11 +01:00
2012-07-05 13:40:27 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-04-18 10:21:49 +03:00
2012-05-16 10:59:35 +10:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-05-14 13:17:08 +01:00
2012-03-21 13:54:42 -07:00
2012-07-25 09:27:11 -07:00
2012-07-07 10:39:09 +01:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2009-04-14 10:35:44 -04:00
2012-07-09 23:06:41 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2011-12-05 14:32:45 -08:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-06-22 10:51:00 +10:00
2012-03-21 13:54:42 -07:00
2012-07-06 10:20:19 +01:00
2012-07-10 00:31:02 -07:00
2012-05-03 14:59:23 +10:00
2012-03-21 13:54:42 -07:00
2009-10-15 01:17:44 +02:00
2011-12-03 10:19:12 -08:00