All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: "Tapani Pälli" <tapani.palli@intel.com>
Cc: emil.l.velikov@gmail.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] remove usage of 'c_plusplus' preprocessor macro
Date: Fri, 7 Aug 2015 14:11:29 +0200	[thread overview]
Message-ID: <20150807121128.GC24471@ulmo> (raw)
In-Reply-To: <1438933078-23480-1-git-send-email-tapani.palli@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 3372 bytes --]

On Fri, Aug 07, 2015 at 10:37:56AM +0300, Tapani Pälli wrote:
> Use only __cplusplus which is supported by the C++ standard.
> 
> Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
> ---
>  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 <laurent.pinchart@ideasonboard.com>
	Date:   Thu Nov 1 09:40:30 2012 +0000
	
	    kms: Make libkms.h usable in C++
	
	    Wrap the header in extern "C" { ... };.
	
	    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
	    Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>

Oh... looks like Laurent's changes might have been copy/paste from your
earlier commit:

	commit cfee5218b17a2741e5519ed44091171e01f0dbb2
	Author: Tapani Pälli <tapani.palli@intel.com>
	Date:   Fri Sep 23 14:17:42 2011 +0300
	
	    xf86drm.h : wrap C code for C++ compilation/linking
	
	    To enable usage of xf86drm.h from C++ programs/frameworks.
	
	    Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
	    [ickle: also wrap xf86drmMode.h]
	    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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 <stdint.h>
>  #include <drm.h>
>  
> -#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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-08-07 12:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  7:37 [PATCH 1/3] remove usage of 'c_plusplus' preprocessor macro Tapani Pälli
2015-08-07  7:37 ` [PATCH 2/3] intel: wrap intel_bufmgr.h C code for C++ compilation/linking Tapani Pälli
2015-08-07  7:37 ` [PATCH 3/3] modeprint: cleanup, remove compile warnings Tapani Pälli
2015-08-07 12:04   ` Thierry Reding
2015-08-07 15:05   ` Emil Velikov
2015-08-07 12:11 ` Thierry Reding [this message]
2015-08-07 12:16   ` [PATCH 1/3] remove usage of 'c_plusplus' preprocessor macro Tapani Pälli
2015-08-07 12:38     ` Thierry Reding
2015-08-07 13:30       ` Chris Wilson
2015-08-07 15:03   ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150807121128.GC24471@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tapani.palli@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.