From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 1/3] remove usage of 'c_plusplus' preprocessor macro Date: Fri, 7 Aug 2015 14:38:49 +0200 Message-ID: <20150807123848.GB25792@ulmo> References: <1438933078-23480-1-git-send-email-tapani.palli@intel.com> <20150807121128.GC24471@ulmo> <55C4A18A.1050200@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0977656411==" Return-path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CFE86E1E4 for ; Fri, 7 Aug 2015 05:39:34 -0700 (PDT) Received: by wibhh20 with SMTP id hh20so64211595wib.0 for ; Fri, 07 Aug 2015 05:39:32 -0700 (PDT) In-Reply-To: <55C4A18A.1050200@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Tapani =?utf-8?B?UMOkbGxp?= Cc: emil.l.velikov@gmail.com, Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0977656411== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Content-Disposition: inline --hHWLQfXTYDoKhP50 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 07, 2015 at 03:16:10PM +0300, Tapani P=C3=A4lli wrote: >=20 >=20 > On 08/07/2015 03:11 PM, Thierry Reding wrote: > >On Fri, Aug 07, 2015 at 10:37:56AM +0300, Tapani P=C3=A4lli wrote: > >>Use only __cplusplus which is supported by the C++ standard. > >> > >>Signed-off-by: Tapani P=C3=A4lli > >>--- > >> libkms/libkms.h | 4 ++-- > >> xf86drm.h | 4 ++-- > >> xf86drmMode.h | 4 ++-- > >> 3 files changed, 6 insertions(+), 6 deletions(-) > > > >This looks fine to me, I can't find any mention of c_plusplus on the > >internet. Let's see what Laurent says, who added this in commit: > > > > commit 9fa4a4b1a894fa8fffe2075bc3376b7fa5e18104 > > Author: Laurent Pinchart > > Date: Thu Nov 1 09:40:30 2012 +0000 > >=09 > > kms: Make libkms.h usable in C++ > >=09 > > Wrap the header in extern "C" { ... };. > >=09 > > Signed-off-by: Laurent Pinchart > > Reviewed-by: Jakob Bornecrantz > > > >Oh... looks like Laurent's changes might have been copy/paste from your > >earlier commit: >=20 > :) yeah, I'm not the source for this evil though, I recall this addition = was > made during the review! Indeed, looks like your original post: http://lists.freedesktop.org/archives/dri-devel/2011-September/014552.html didn't have it. Since Chris amended the commit, perhaps he had a reason to add it. Chris? Thierry > > commit cfee5218b17a2741e5519ed44091171e01f0dbb2 > > Author: Tapani P=C3=A4lli > > Date: Fri Sep 23 14:17:42 2011 +0300 > >=09 > > xf86drm.h : wrap C code for C++ compilation/linking > >=09 > > To enable usage of xf86drm.h from C++ programs/frameworks. > >=09 > > Signed-off-by: Tapani P=C3=A4lli > > [ickle: also wrap xf86drmMode.h] > > Signed-off-by: Chris Wilson > > > >Thierry > > > >>diff --git a/libkms/libkms.h b/libkms/libkms.h > >>index c00b159..930a2bf 100644 > >>--- a/libkms/libkms.h > >>+++ b/libkms/libkms.h > >>@@ -29,7 +29,7 @@ > >> #ifndef _LIBKMS_H_ > >> #define _LIBKMS_H_ > >> > >>-#if defined(__cplusplus) || defined(c_plusplus) > >>+#if defined(__cplusplus) > >> extern "C" { > >> #endif > >> > >>@@ -75,7 +75,7 @@ int kms_bo_map(struct kms_bo *bo, void **out); > >> int kms_bo_unmap(struct kms_bo *bo); > >> int kms_bo_destroy(struct kms_bo **bo); > >> > >>-#if defined(__cplusplus) || defined(c_plusplus) > >>+#if defined(__cplusplus) > >> }; > >> #endif > >> > >>diff --git a/xf86drm.h b/xf86drm.h > >>index e3a19dc..360e04a 100644 > >>--- a/xf86drm.h > >>+++ b/xf86drm.h > >>@@ -39,7 +39,7 @@ > >> #include > >> #include > >> > >>-#if defined(__cplusplus) || defined(c_plusplus) > >>+#if defined(__cplusplus) > >> extern "C" { > >> #endif > >> > >>@@ -759,7 +759,7 @@ extern int drmPrimeFDToHandle(int fd, int prime_fd,= uint32_t *handle); > >> extern char *drmGetPrimaryDeviceNameFromFd(int fd); > >> extern char *drmGetRenderDeviceNameFromFd(int fd); > >> > >>-#if defined(__cplusplus) || defined(c_plusplus) > >>+#if defined(__cplusplus) > >> } > >> #endif > >> > >>diff --git a/xf86drmMode.h b/xf86drmMode.h > >>index 1c10023..4de7bbb 100644 > >>--- a/xf86drmMode.h > >>+++ b/xf86drmMode.h > >>@@ -36,7 +36,7 @@ > >> #ifndef _XF86DRMMODE_H_ > >> #define _XF86DRMMODE_H_ > >> > >>-#if defined(__cplusplus) || defined(c_plusplus) > >>+#if defined(__cplusplus) > >> extern "C" { > >> #endif > >> > >>@@ -508,7 +508,7 @@ extern int drmModeCreatePropertyBlob(int fd, const = void *data, size_t size, > >> extern int drmModeDestroyPropertyBlob(int fd, uint32_t id); > >> > >> > >>-#if defined(__cplusplus) || defined(c_plusplus) > >>+#if defined(__cplusplus) > >> } > >> #endif > >> > >>-- > >>2.1.0 > >> > >>_______________________________________________ > >>dri-devel mailing list > >>dri-devel@lists.freedesktop.org > >>http://lists.freedesktop.org/mailman/listinfo/dri-devel --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVxKbYAAoJEN0jrNd/PrOhscQQAJ2DLcoN/zyAFroo8qKzUM5i 5/s87jRRGKsOqKtslbdleK9/KYlQ5P8EO4TEH8GQZPbyv1H/yYgWdqmfqG2jQ7UK 5Y2XTad/mjVpWvO42RPY4QYcD+r4E2ZF+j6JzfFR7SZBAMhA5qwN05nUgWFkPaS5 28Wy9hqSGOMICE57DIe38RX+aqEOyNxFqfYl6Ta/+Ns2m3TpecVkZGO2z6S/znFS Yy5t4QeBmTc/vFwFCgTqgFv1KeWLIkor1VmAuCVDtL2Dg3QGCpVd9Dz7hlpUSDKW n5i9aKnJU0OzZjrCFL6trfaX02U39toCl+iZKzk1ILa3Jna3f37WFbz7LErG04Jd XMXKY5Dvn3Iss177velo51jlbm9juNIdCoMjcKU4ZBvYqmhGMDi0BaYKMI2hkTuI DSq5rieF9lkoDDaafMSudEWVsCkqsajA3JkS/BD3T0aVURBKDB5B37A5PEuxViFI bsaLrbq/HtSa2DteOpRQbNBXzkYmK9UbDJksB9gl2mg6TU9aAFV0VJVc/5bO0R7M goZ9te6jaAg1mBva+4NHOVaQdO2wsHfYy0UssQlRH97yGkm2+cJ9eGK9HlI7nICV kGlgVyi9L+Z4qB4Xn5ltfebOL/W/vZKCdyW1egHlczWsOVF92TonGGrUjKMM6SWa WaB7W2zB+3vN+9yGqosg =j0gU -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50-- --===============0977656411== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0977656411==--