From dc52fd7d42edd09558865fbbce62d4abfb1a5c42 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 21 May 2007 20:00:21 +0000 Subject: PAM_STRUCT_SIZE: cast pointer to ulong instead of uint git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@305 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/pam.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/pam.h') diff --git a/lib/pam.h b/lib/pam.h index e66b831d..8f9f5d12 100644 --- a/lib/pam.h +++ b/lib/pam.h @@ -118,8 +118,13 @@ struct pam { member named x. This is useful in conjunction with the 'len' value to determine which fields are present in the structure. */ + +/* Some compilers are really vigilant and recognize it as an error + to cast a 64 bit address to a 32 bit type. Hence the roundabout + casting in PAM_MEMBER_OFFSET. +*/ #define PAM_MEMBER_OFFSET(mbrname) \ - ((unsigned int)(char*)&((struct pam *)0)->mbrname) + ((size_t)(unsigned long)(char*)&((struct pam *)0)->mbrname) #define PAM_MEMBER_SIZE(mbrname) \ sizeof(((struct pam *)0)->mbrname) #define PAM_STRUCT_SIZE(mbrname) \ -- cgit 1.4.1