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:11:29 +0200 Message-ID: <20150807121128.GC24471@ulmo> References: <1438933078-23480-1-git-send-email-tapani.palli@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0060789200==" Return-path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTPS id E554D6E1AB for ; Fri, 7 Aug 2015 05:12:13 -0700 (PDT) Received: by wibxm9 with SMTP id xm9so63235683wib.1 for ; Fri, 07 Aug 2015 05:12:12 -0700 (PDT) In-Reply-To: <1438933078-23480-1-git-send-email-tapani.palli@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 --===============0060789200== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vOmOzSkFvhd7u8Ms" Content-Disposition: inline --vOmOzSkFvhd7u8Ms Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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: 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_ > =20 > -#if defined(__cplusplus) || defined(c_plusplus) > +#if defined(__cplusplus) > extern "C" { > #endif > =20 > @@ -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); > =20 > -#if defined(__cplusplus) || defined(c_plusplus) > +#if defined(__cplusplus) > }; > #endif > =20 > diff --git a/xf86drm.h b/xf86drm.h > index e3a19dc..360e04a 100644 > --- a/xf86drm.h > +++ b/xf86drm.h > @@ -39,7 +39,7 @@ > #include > #include > =20 > -#if defined(__cplusplus) || defined(c_plusplus) > +#if defined(__cplusplus) > extern "C" { > #endif > =20 > @@ -759,7 +759,7 @@ extern int drmPrimeFDToHandle(int fd, int prime_fd, u= int32_t *handle); > extern char *drmGetPrimaryDeviceNameFromFd(int fd); > extern char *drmGetRenderDeviceNameFromFd(int fd); > =20 > -#if defined(__cplusplus) || defined(c_plusplus) > +#if defined(__cplusplus) > } > #endif > =20 > 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_ > =20 > -#if defined(__cplusplus) || defined(c_plusplus) > +#if defined(__cplusplus) > extern "C" { > #endif > =20 > @@ -508,7 +508,7 @@ extern int drmModeCreatePropertyBlob(int fd, const vo= id *data, size_t size, > extern int drmModeDestroyPropertyBlob(int fd, uint32_t id); > =20 > =20 > -#if defined(__cplusplus) || defined(c_plusplus) > +#if defined(__cplusplus) > } > #endif > =20 > --=20 > 2.1.0 >=20 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel --vOmOzSkFvhd7u8Ms Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVxKBvAAoJEN0jrNd/PrOhDlwP/2sBzQIz3ZoaHivoYF3UHFyU cLw1GQHNQesXkeWJzD0Akiu4P1rFCRuu/HgYc3B7hR+hSwCHPlAVV56oFGcGSp6K l/4r60/uOct2kvEIB9ZbAoYPZjIU9iNUVZXjW7eFGwrzOuW3ZsAEz5qmB9OhBRPq REesfdN2cIV7x83DlfP1ZR0lYDDy6YX4aNfJEgTvoHuNjLlrJ9WArEwVSNZJezQb gx2CBJ14pl4Efw0HBDR1Yjqv6O9eFM3dffWoFxboHnKlS/PhY0fAeZ5ZZNM0IJj8 8H6hkFgG725KyD+z1NBP4uL1YZ/3WTjhlFNol/RCdSNeYUzMz0RV7kDGwUyFloNa 5PYNVSM9GR9caby3JvBna30cj5nYVfeGIPPma5XpzzXiBvlP/x7V74x8l0Eu3r4N yJcEBRqCx+MdAZnQYPZNV08QW+aIw+RQz2Dyiw+Zvyg0h2RGVx6nxlaahja5QpRU pNU+SCO2IvsW55OFdUv/5vewuUmo5hyVpgQfxTnIRwUfwOs/QrGP8hHmJ9m/B0cF MXsPs6D5NEq3EltLFZitKK0OMDFz027yhtX4dPahUbFKBxZzMOToqWqgGzbup9s4 dcnPQsSCat1OQY10szo307s1kOZGwVC8/zVcE2u37hpoYABksFzHz1pRMRr9qhyX SjiJizu2hLKYNlxpJtiW =tWY3 -----END PGP SIGNATURE----- --vOmOzSkFvhd7u8Ms-- --===============0060789200== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0060789200==--