pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/glib2



Module Name:    pkgsrc
Committed By:   nros
Date:           Fri Dec  6 14:36:59 UTC 2019

Modified Files:
        pkgsrc/devel/glib2: distinfo
Added Files:
        pkgsrc/devel/glib2/patches: patch-glib_gmacros.h

Log Message:
Fix use glib with c++ compilers that define __STDC_VERSION__

Some c++ compilers define __STDC_VERSION__ but don't provide _Static_assert
This causes usage of glib to break on these compilers.


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 pkgsrc/devel/glib2/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/glib2/patches/patch-glib_gmacros.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/glib2/distinfo
diff -u pkgsrc/devel/glib2/distinfo:1.261 pkgsrc/devel/glib2/distinfo:1.262
--- pkgsrc/devel/glib2/distinfo:1.261   Thu Nov 28 18:11:48 2019
+++ pkgsrc/devel/glib2/distinfo Fri Dec  6 14:36:58 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.261 2019/11/28 18:11:48 jperkin Exp $
+$NetBSD: distinfo,v 1.262 2019/12/06 14:36:58 nros Exp $
 
 SHA1 (glib-2.62.3.tar.xz) = a8970ea4a9fbaf3050172d63f17372ead2894798
 RMD160 (glib-2.62.3.tar.xz) = 1aca0cf7e3a64e18eeea3d928e15280062a06f55
@@ -16,6 +16,7 @@ SHA1 (patch-gio_tests_gdbus-export.c) = 
 SHA1 (patch-glib_gatomic.c) = 875ad9c828dcf2add356d4988d14fb4f1985aef8
 SHA1 (patch-glib_gatomic.h) = 21294cac483c3379198283c54fe6e24af3e630b1
 SHA1 (patch-glib_glibconfig.h.in) = 1964b5fb15317e681dad426d4862e3f48c4274f7
+SHA1 (patch-glib_gmacros.h) = 641107ccb6b285c472ed6cb337e53e4764f8d6a8
 SHA1 (patch-glib_gmain.c) = b361e4f7fa285c1d9317468c2b1be390e8190e8b
 SHA1 (patch-glib_gtypes.h) = a659b770c55a8071a6e6afd8a9fccdf723e086e6
 SHA1 (patch-glib_meson.build) = bc429f6537c6dd5fa99137c35c0627a97d48a850

Added files:

Index: pkgsrc/devel/glib2/patches/patch-glib_gmacros.h
diff -u /dev/null pkgsrc/devel/glib2/patches/patch-glib_gmacros.h:1.1
--- /dev/null   Fri Dec  6 14:36:59 2019
+++ pkgsrc/devel/glib2/patches/patch-glib_gmacros.h     Fri Dec  6 14:36:58 2019
@@ -0,0 +1,14 @@
+$NetBSD: patch-glib_gmacros.h,v 1.1 2019/12/06 14:36:58 nros Exp $
+* on some compilers __STDC_VERSION__ is defined when using c++
+  but _Static_assert is not available
+--- glib/gmacros.h.orig        2019-12-06 12:21:18.948881370 +0000
++++ glib/gmacros.h
+@@ -734,7 +734,7 @@
+ #ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */
+ #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
+ #define G_PASTE(identifier1,identifier2)      G_PASTE_ARGS (identifier1, identifier2)
+-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
++#if defined(__STDC_VERSION__) && !defined(__cplusplus) && __STDC_VERSION__ >= 201112L
+ #define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
+ #elif (defined(__cplusplus) && __cplusplus >= 201103L) || \
+       (defined(__cplusplus) && defined (_MSC_VER) && (_MSC_VER >= 1600)) || \



Home | Main Index | Thread Index | Old Index