Re: C23 support in Autoconf

2024-05-02 Thread Florian Weimer
* Alan Coopersmith:

> https://gitlab.freedesktop.org/xorg/driver/xf86-video-vbox/-/commit/b66441a27fa85e2a3b63f10a0a5a846344327042

This change:

 #ifndef __cplusplus
+#if __STDC_VERSION__ >= 199901L
+#include 
+#else
 typedef enum
 {
 false = 0,
 true
 } bool;
+#endif
 # define RT_C_DECLS_BEGIN
 # define RT_C_DECLS_END
 #else
 # define RT_C_DECLS_BEGIN extern "C" {
 # define RT_C_DECLS_END }
 #endif

is not really ABI-compatible with the previous C version (although it
restores ABI compatibility with the C++ version).  Is this an installed
header?

I expect that quite a few projects will encounter problems like this
one.

Thanks,
Florian




Re: C23 support in Autoconf

2024-05-02 Thread Alan Coopersmith

On 5/2/24 04:01, Florian Weimer wrote:

* Alan Coopersmith:


https://gitlab.freedesktop.org/xorg/driver/xf86-video-vbox/-/commit/b66441a27fa85e2a3b63f10a0a5a846344327042


This change:

  #ifndef __cplusplus
+#if __STDC_VERSION__ >= 199901L
+#include 
+#else
  typedef enum
  {
  false = 0,
  true
  } bool;
+#endif
  # define RT_C_DECLS_BEGIN
  # define RT_C_DECLS_END
  #else
  # define RT_C_DECLS_BEGIN extern "C" {
  # define RT_C_DECLS_END }
  #endif

is not really ABI-compatible with the previous C version (although it
restores ABI compatibility with the C++ version).  Is this an installed
header?


No, it's an internal header, only used in compiling this single shared object,
so no ABI compatibility with prior versions is required.

--
-Alan Coopersmith- alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/solaris