3) Add a definition if FIELD_OFFSET wrapped in #ifndef. This is the
least ugly option but would cause surprising results if one or
the other was changed.
Personally, I think this looks the best. As far as which is likely to
get accepted.. often you have to try first to find that out
On Tue, Apr 22, 2008 at 11:50:05PM +0900, Dmitry Timoshkov wrote:
Erik de Castro Lopo [EMAIL PROTECTED] wrote:
/* get pointer to object containing list element */
#define LIST_ENTRY(elem, type, field) \
-((type *)((char *)(elem) - (unsigned int)(((type *)0)-field)))
+((type
David Laight wrote:
On Tue, Apr 22, 2008 at 11:50:05PM +0900, Dmitry Timoshkov wrote:
Erik de Castro Lopo [EMAIL PROTECTED] wrote:
/* get pointer to object containing list element */
#define LIST_ENTRY(elem, type, field) \
-((type *)((char *)(elem) - (unsigned int)(((type
Erik de Castro Lopo [EMAIL PROTECTED] wrote:
/* get pointer to object containing list element */
#define LIST_ENTRY(elem, type, field) \
-((type *)((char *)(elem) - (unsigned int)(((type *)0)-field)))
+((type *)((char *)(elem) - (unsigned long)(((type *)0)-field)))
It should be
Dmitry Timoshkov wrote:
Erik de Castro Lopo [EMAIL PROTECTED] wrote:
/* get pointer to object containing list element */
#define LIST_ENTRY(elem, type, field) \
-((type *)((char *)(elem) - (unsigned int)(((type *)0)-field)))
+((type *)((char *)(elem) - (unsigned long)(((type
Erik de Castro Lopo [EMAIL PROTECTED] wrote:
/* get pointer to object containing list element */
#define LIST_ENTRY(elem, type, field) \
-((type *)((char *)(elem) - (unsigned int)(((type *)0)-field)))
+((type *)((char *)(elem) - (unsigned long)(((type *)0)-field)))
It should be
Dmitry Timoshkov wrote:
Erik de Castro Lopo [EMAIL PROTECTED] wrote:
FIELD_OFFSET is defined in include/winnt.h.
Now I could include winnt.h into include/wine/list.h but that doesn't
seem right. I could also copy it,but having two definitions of the
same macro is also not right.