comparison desktop/dconf/patch-clang.patch @ 496:089b46d20c00

desktop: convert packages to clang
author David Demelier <markand@malikania.fr>
date Mon, 08 Apr 2019 20:15:00 +0200
parents
children
comparison
equal deleted inserted replaced
495:c54ecf0588bc 496:089b46d20c00
1 diff --git a/gvdb/gvdb-reader.c b/gvdb/gvdb-reader.c
2 index aa3154feb901f244fa184a66ac7198072c038c4f..638649b29d9a9fa2ebba1939ef7f72c92ef0a287 100644
3 --- a/gvdb/gvdb-reader.c
4 +++ b/gvdb/gvdb-reader.c
5 @@ -17,6 +17,7 @@
6 * Author: Ryan Lortie <desrt@desrt.ca>
7 */
8
9 +#define GVDB_USE_WEAK_SYMBOLS
10 #include "gvdb-reader.h"
11 #include "gvdb-format.h"
12
13 diff --git a/gvdb/gvdb-reader.h b/gvdb/gvdb-reader.h
14 index 39827737d94dc7889e53b609c25c7ac8e2b3b870..1e88e43dcc3c212e727d2bf0c771f8e86caa90d7 100644
15 --- a/gvdb/gvdb-reader.h
16 +++ b/gvdb/gvdb-reader.h
17 @@ -22,40 +22,55 @@
18
19 #include <glib.h>
20
21 +/* We cannot enable the weak attribute unconditionally here because both
22 + * gvdb/gvdb-reader.c and tests/dconf-mock-gvdb.c include this file. The
23 + * intention of using weak symbols here is to allow the latter to override
24 + * functions defined in the former, so functions in tests/dconf-mock-gvdb.c
25 + * must have strong bindings. */
26 +#ifdef GVDB_USE_WEAK_SYMBOLS
27 +# ifdef __GNUC__
28 +# define GVDB_GNUC_WEAK __attribute__((weak))
29 +# else
30 +# define GVDB_GNUC_WEAK
31 +# endif
32 +#else
33 +# define GVDB_GNUC_WEAK
34 +#endif
35 +
36 typedef struct _GvdbTable GvdbTable;
37
38 G_BEGIN_DECLS
39
40 -G_GNUC_INTERNAL
41 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
42 GvdbTable * gvdb_table_new_from_bytes (GBytes *bytes,
43 gboolean trusted,
44 GError **error);
45 -G_GNUC_INTERNAL
46 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
47 GvdbTable * gvdb_table_new (const gchar *filename,
48 gboolean trusted,
49 GError **error);
50 -G_GNUC_INTERNAL
51 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
52 void gvdb_table_free (GvdbTable *table);
53 -G_GNUC_INTERNAL
54 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
55 gchar ** gvdb_table_get_names (GvdbTable *table,
56 gint *length);
57 -G_GNUC_INTERNAL
58 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
59 gchar ** gvdb_table_list (GvdbTable *table,
60 const gchar *key);
61 -G_GNUC_INTERNAL
62 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
63 GvdbTable * gvdb_table_get_table (GvdbTable *table,
64 const gchar *key);
65 -G_GNUC_INTERNAL
66 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
67 GVariant * gvdb_table_get_raw_value (GvdbTable *table,
68 const gchar *key);
69 -G_GNUC_INTERNAL
70 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
71 GVariant * gvdb_table_get_value (GvdbTable *table,
72 const gchar *key);
73
74 -G_GNUC_INTERNAL
75 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
76 gboolean gvdb_table_has_value (GvdbTable *table,
77 const gchar *key);
78 -G_GNUC_INTERNAL
79 +G_GNUC_INTERNAL GVDB_GNUC_WEAK
80 gboolean gvdb_table_is_valid (GvdbTable *table);
81
82 G_END_DECLS