From: "Matthew W. S. Bell" Subject: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit. Date: Sat, 03 Apr 2010 02:59:16 +0100 Message-ID: <1270259956.4292.6.camel@ibis.bells> Reply-To: matthew@bells23.org.uk, dri-devel@lists.sourceforge.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7344245209766232038==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: dri-devel@lists.sourceforge.net List-Id: dri-devel@lists.freedesktop.org --===============7344245209766232038== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-QW9aZy/+CKZsM1uaOrvG" --=-QW9aZy/+CKZsM1uaOrvG Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =46rom d457b05faabde1a51b8e4b8f6fc13af9f07809f8 Mon Sep 17 00:00:00 2001 drm_handle_t appears to be assigned values from void*. As such unsigned int is certainly not the same size on 64-bit. Convert to uintptr_t in all cases as it is defined for this purpose. I fear this patch changes ABI, but I am not sure. Matthew W.S. Bell --- include/drm/drm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drm/drm.h b/include/drm/drm.h index 4822159..95141a2 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -40,7 +40,7 @@ =20 #include #include -typedef unsigned int drm_handle_t; +typedef uintptr_t drm_handle_t; =20 #else /* One of the BSDs */ =20 @@ -54,7 +54,7 @@ typedef int32_t __s32; typedef uint32_t __u32; typedef int64_t __s64; typedef uint64_t __u64; -typedef unsigned long drm_handle_t; +typedef uintptr_t drm_handle_t; =20 #endif =20 --=20 1.7.0 --=-QW9aZy/+CKZsM1uaOrvG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAABAgAGBQJLtqDmAAoJEDyn+gO8EoIoW3EH/Airn1WqPbJ86HUHz6c42Wvm Pw40XJFRO7ZwAFL3onyeJXO3Sw9Zdfi/RmozyqJPtCSi2Q2JaJEcABlMmbrwY3V7 vwz1opkoQay3o1FPJN0ddfUzWDqlXWskrrSM3vu4BzTRhGxnUBLFaXf3TjCYRIGJ RVB4/BAVKIrMUyRfJB5UZE1wrCXwXrOl8RPbyImibLMUy43kLxUqn7gWvHX2pyeL QbPajMAfK/r01gkqmY+X7X1UXAt3vani+o1STVErkU81GjClF1auEOB5Lk4X6T8+ HIWSbVUXd22NrCQVS56XWQiX7JkxwFmXGPSBf+pm7yfv88vkjx4VDIULc1XCL8Q= =eBR9 -----END PGP SIGNATURE----- --=-QW9aZy/+CKZsM1uaOrvG-- --===============7344245209766232038== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --===============7344245209766232038== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel --===============7344245209766232038==--