* [PATCH] intel: wrap intel_bufmgr.h C code for C++ compilation/linking
@ 2015-07-01 11:37 Tapani Pälli
2015-07-03 15:44 ` Emil Velikov
0 siblings, 1 reply; 4+ messages in thread
From: Tapani Pälli @ 2015-07-01 11:37 UTC (permalink / raw)
To: dri-devel
(We need this include in porting changes for the OpenGL ES
conformance suite.)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
---
intel/intel_bufmgr.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
index 285919e..f061454 100644
--- a/intel/intel_bufmgr.h
+++ b/intel/intel_bufmgr.h
@@ -38,6 +38,10 @@
#include <stdint.h>
#include <stdio.h>
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
struct drm_clip_rect;
typedef struct _drm_intel_bufmgr drm_intel_bufmgr;
@@ -308,4 +312,8 @@ int drm_intel_get_eu_total(int fd, unsigned int *eu_total);
/** @{ */
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
#endif /* INTEL_BUFMGR_H */
--
2.1.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] intel: wrap intel_bufmgr.h C code for C++ compilation/linking
2015-07-01 11:37 [PATCH] intel: wrap intel_bufmgr.h C code for C++ compilation/linking Tapani Pälli
@ 2015-07-03 15:44 ` Emil Velikov
2015-07-27 9:59 ` Tapani Pälli
0 siblings, 1 reply; 4+ messages in thread
From: Emil Velikov @ 2015-07-03 15:44 UTC (permalink / raw)
To: Tapani Pälli, dri-devel; +Cc: emil.l.velikov
On 01/07/15 12:37, Tapani Pälli wrote:
> (We need this include in porting changes for the OpenGL ES
> conformance suite.)
>
> Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
> ---
> intel/intel_bufmgr.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
> index 285919e..f061454 100644
> --- a/intel/intel_bufmgr.h
> +++ b/intel/intel_bufmgr.h
> @@ -38,6 +38,10 @@
> #include <stdint.h>
> #include <stdio.h>
>
> +#if defined(__cplusplus) || defined(c_plusplus)
> +extern "C" {
> +#endif
> +
Strongly in favour - I've been pondering on this for a very long time.
Just a question - is there a compiler that care about (something from
the last decade) that does not define __cplusplus but c_plusplus ?
Afaict the former is defined since (at least) the 1998 C++ standard,
while the latter is extremely rare, and mostly mentioned as decrecated.
-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] intel: wrap intel_bufmgr.h C code for C++ compilation/linking
2015-07-03 15:44 ` Emil Velikov
@ 2015-07-27 9:59 ` Tapani Pälli
2015-07-28 15:25 ` Emil Velikov
0 siblings, 1 reply; 4+ messages in thread
From: Tapani Pälli @ 2015-07-27 9:59 UTC (permalink / raw)
To: Emil Velikov, dri-devel
On 07/03/2015 06:44 PM, Emil Velikov wrote:
> On 01/07/15 12:37, Tapani Pälli wrote:
>> (We need this include in porting changes for the OpenGL ES
>> conformance suite.)
>>
>> Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
>> ---
>> intel/intel_bufmgr.h | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
>> index 285919e..f061454 100644
>> --- a/intel/intel_bufmgr.h
>> +++ b/intel/intel_bufmgr.h
>> @@ -38,6 +38,10 @@
>> #include <stdint.h>
>> #include <stdio.h>
>>
>> +#if defined(__cplusplus) || defined(c_plusplus)
>> +extern "C" {
>> +#endif
>> +
> Strongly in favour - I've been pondering on this for a very long time.
> Just a question - is there a compiler that care about (something from
> the last decade) that does not define __cplusplus but c_plusplus ?
I don't know, this was just copy paste from other file.
> Afaict the former is defined since (at least) the 1998 C++ standard,
> while the latter is extremely rare, and mostly mentioned as decrecated.
For me it is ok to drop c_plusplus, no strong opinion.
> -Emil
>
// Tapani
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] intel: wrap intel_bufmgr.h C code for C++ compilation/linking
2015-07-27 9:59 ` Tapani Pälli
@ 2015-07-28 15:25 ` Emil Velikov
0 siblings, 0 replies; 4+ messages in thread
From: Emil Velikov @ 2015-07-28 15:25 UTC (permalink / raw)
To: Tapani Pälli; +Cc: ML dri-devel
On 27 July 2015 at 10:59, Tapani Pälli <tapani.palli@intel.com> wrote:
> On 07/03/2015 06:44 PM, Emil Velikov wrote:
>>
>> On 01/07/15 12:37, Tapani Pälli wrote:
>>>
>>> (We need this include in porting changes for the OpenGL ES
>>> conformance suite.)
>>>
>>> Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
>>> ---
>>> intel/intel_bufmgr.h | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
>>> index 285919e..f061454 100644
>>> --- a/intel/intel_bufmgr.h
>>> +++ b/intel/intel_bufmgr.h
>>> @@ -38,6 +38,10 @@
>>> #include <stdint.h>
>>> #include <stdio.h>
>>> +#if defined(__cplusplus) || defined(c_plusplus)
>>> +extern "C" {
>>> +#endif
>>> +
>>
>> Strongly in favour - I've been pondering on this for a very long time.
>> Just a question - is there a compiler that care about (something from
>> the last decade) that does not define __cplusplus but c_plusplus ?
>
>
> I don't know, this was just copy paste from other file.
>
>> Afaict the former is defined since (at least) the 1998 C++ standard,
>> while the latter is extremely rare, and mostly mentioned as decrecated.
>
>
> For me it is ok to drop c_plusplus, no strong opinion.
>
That'll be great. Thanks.
-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-28 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 11:37 [PATCH] intel: wrap intel_bufmgr.h C code for C++ compilation/linking Tapani Pälli
2015-07-03 15:44 ` Emil Velikov
2015-07-27 9:59 ` Tapani Pälli
2015-07-28 15:25 ` Emil Velikov
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.