diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-05-21 20:00:21 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-05-21 20:00:21 +0000 |
commit | dc52fd7d42edd09558865fbbce62d4abfb1a5c42 (patch) | |
tree | 4cefaa4226ed6f8dfba246319847717fbe656140 | |
parent | 03992f616f4b2289e66b156db940cd2240256e60 (diff) | |
download | netpbm-mirror-dc52fd7d42edd09558865fbbce62d4abfb1a5c42.tar.gz netpbm-mirror-dc52fd7d42edd09558865fbbce62d4abfb1a5c42.tar.xz netpbm-mirror-dc52fd7d42edd09558865fbbce62d4abfb1a5c42.zip |
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
-rw-r--r-- | doc/HISTORY | 2 | ||||
-rw-r--r-- | lib/pam.h | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index 23445add..f3c2aabf 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -6,6 +6,8 @@ CHANGE HISTORY not yet BJH Release 10.39.00 + PAM_STRUCT_SIZE: cast pointer to ulong instead of uint. + pamthreshold: fix totally bogus threshold selection with simple thresholding. 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) \ |