Re: L4Re: Why was EXTERN_C_BEGIN/END replaced?

2025-06-23 Thread Marcus Haehnel

Hi Paul, Hi L4Re Hackers,

while examining this discussion and also while doing a bit of porting 
work I revisited that decision we discussed here.
The choice to go with __BEGIN_DECLS was not ideal, since the __ in the 
beginning already indicates that this is a name internal to the libc and 
/ or the compiler and cdefs.h is not a POSIX standard header.


So to rectify this we have introduced an additional define specific to 
L4Re [0] which uses L4_BEGIN_DECLS and L4_END_DECLS. The L4 naming 
should avoid further name clashes which was the cause of the initial 
change and this should be available irrespective of C library or 
compiler support. We still also define __BEGIN_DECLS and __END_DECLS to 
be backwards compatible for now.


I just thought I'd bring this up here, since we just recently had this 
discussion and you might have to adapt code. So maybe it is a good idea 
to go with the new symbol right away :)


Best regards,

- Marcus

[0] 
https://github.com/kernkonzept/l4re-core/commit/9908610b97c86ef6fae55db44d525e9ec79138c5



On 2025-05-19 22:35, Adam Lackorzynski wrote:

Hi Paul,

On Sat May 17, 2025 at 23:56:56 +0200, Paul Boddie wrote:

Hello,

Taking the opportunity to use a newer snapshot of L4Re, I notice that
EXTERN_C_BEGIN and EXTERN_C_END now cause errors like this:

error: unknown type name 
‘DO_NOT_USE_EXTERN_C_END_ANY_MORE__USE__END_DECLS’


The commit introducing this behaviour seems to be this one:

https://github.com/kernkonzept/l4re-core/commit/
e04b50e0e4f7c7a3316a2d8b658db6d81bd3e88d

It would appear that throughout L4Re, a mass renaming has occurred 
from these
symbols to __BEGIN_DECLS and __END_DECLS. Was there a particular 
reason for


EXTERN_C_BEGIN/EXTERN_C_END were self-made defines and we changed that
to the more commonly used __BEGIN_DECLS/__END_DECLS (as seen in
cdefs.h).


Adam
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]

___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]


Re: L4Re: Why was EXTERN_C_BEGIN/END replaced?

2025-05-19 Thread Adam Lackorzynski
Hi Paul,

On Sat May 17, 2025 at 23:56:56 +0200, Paul Boddie wrote:
> Hello,
> 
> Taking the opportunity to use a newer snapshot of L4Re, I notice that 
> EXTERN_C_BEGIN and EXTERN_C_END now cause errors like this:
> 
> error: unknown type name ‘DO_NOT_USE_EXTERN_C_END_ANY_MORE__USE__END_DECLS’
> 
> The commit introducing this behaviour seems to be this one:
> 
> https://github.com/kernkonzept/l4re-core/commit/
> e04b50e0e4f7c7a3316a2d8b658db6d81bd3e88d
> 
> It would appear that throughout L4Re, a mass renaming has occurred from these 
> symbols to __BEGIN_DECLS and __END_DECLS. Was there a particular reason for 

EXTERN_C_BEGIN/EXTERN_C_END were self-made defines and we changed that
to the more commonly used __BEGIN_DECLS/__END_DECLS (as seen in
cdefs.h).


Adam
___
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]