libsysprof: add inside guards to prevent stray includes

This requires that things use #include <sysprof.h> now instead
of individual includes. A few cases are still allowed in the
libsysprof-capture library to make copy/paste embedding easier.
This commit is contained in:
Christian Hergert
2019-05-08 17:06:56 -07:00
parent 219b48f668
commit 7ea6ca43ec
35 changed files with 107 additions and 22 deletions

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-profile.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <glib-object.h>
#include "sysprof-version-macros.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-symbol-resolver.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-source.h"
G_BEGIN_DECLS

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-source.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-symbol-resolver.h"
G_BEGIN_DECLS

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
G_BEGIN_DECLS

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-symbol-resolver.h"
G_BEGIN_DECLS

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-capture-types.h"
G_BEGIN_DECLS

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-profiler.h"
#include "sysprof-version-macros.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <glib.h>
#include "sysprof-capture-types.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-source.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <gio/gio.h>
#include <linux/perf_event.h>

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-source.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-source.h"

View File

@ -18,11 +18,14 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#define G_LOG_DOMAIN "sp-process-model-item"
#include "config.h"
#include <string.h>
#include "sysprof-process-model-item.h"
#ifdef __linux__
# include "sysprof-proc-source.h"
#endif

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include <gio/gio.h>

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <gio/gio.h>
#include "sysprof-version-macros.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <gio/gio.h>
#include "sysprof-version-macros.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include "sysprof-capture-writer.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <glib-object.h>
#include "sysprof-version-macros.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <glib-object.h>
#include "sysprof-capture-writer.h"

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include "sysprof-version-macros.h"
#include <glib.h>

View File

@ -20,6 +20,10 @@
#pragma once
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
# error "Only <sysprof.h> can be included directly."
#endif
#include <glib-object.h>
#include "sysprof-address.h"

View File

@ -31,6 +31,8 @@ G_BEGIN_DECLS
# include "sysprof-profile.h"
# include "sysprof-profiler.h"
# include "sysprof-map-lookaside.h"
# include "sysprof-process-model.h"
# include "sysprof-process-model-item.h"
# include "sysprof-source.h"
# include "sysprof-elf-symbol-resolver.h"
# include "sysprof-jitmap-symbol-resolver.h"