I want to use <stdatomic.h> in dbus-sysdeps.h, but if we do that, we
won't be able to include that header into C++ code on all compilers.
Move the declarations for new internal Windows-specific functions
introduced in commit
17a23d08
"dbus_threads_init_default, dbus_threads_init: be safe to call at any time"
into their own header.
Signed-off-by: Simon McVittie <smcv@collabora.com>
dbus-sysdeps-thread-win.c
)
set(DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS}
+ dbus-init-win.h
dbus-sockets-win.h
dbus-sysdeps-win.h
)
$(wince_source) \
dbus-backtrace-win.c \
dbus-file-win.c \
+ dbus-init-win.h \
dbus-pipe-win.c \
dbus-sockets-win.h \
dbus-sysdeps-win.c \
extern "C"
{
-#include "dbus-sysdeps-win.h"
+#include "dbus-init-win.h"
}
class DBusInternalInit
--- /dev/null
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright © 2013 Intel Corporation
+ * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later
+ *
+ * Do not include other private headers in this one, particularly
+ * dbus-sysdeps.h: it gets included into C++ code which is not
+ * compatible with our use of <stdatomic.h>.
+ */
+
+#ifndef DBUS_INIT_WIN_H
+#define DBUS_INIT_WIN_H
+
+void _dbus_threads_windows_init_global (void);
+void _dbus_threads_windows_ensure_ctor_linked (void);
+
+#endif
*/
#include <config.h>
+#include "dbus-init-win.h"
#include "dbus-internals.h"
#include "dbus-sysdeps.h"
#include "dbus-sysdeps-win.h"
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_get_install_root (DBusString *str);
-void _dbus_threads_windows_init_global (void);
-void _dbus_threads_windows_ensure_ctor_linked (void);
-
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_getsid(char **sid, dbus_pid_t process_id);