lib: force user to include `<babeltrace2/babeltrace.h>`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 Jul 2019 05:33:02 +0000 (01:33 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 10 Jul 2019 15:25:15 +0000 (11:25 -0400)
This patch makes all the library headers except
`<babeltrace2/babeltrace.h>` refuse to be included directly. This will
allow us to change how those headers are organized, and even remove some
if needed (as long as we move the existing content to another existing
header), because we know the user does not include specific headers.

To do this, the main `<babeltrace2/babeltrace.h>` defines
`__BT_IN_BABELTRACE_H`, and each specific header does:

    #ifndef __BT_IN_BABELTRACE_H
    # error "Please include <babeltrace2/babeltrace.h> instead."
    #endif

at the beginning.

Because each specific header has the guarantee that it is included from
`<babeltrace2/babeltrace.h>`, they don't include
`<babeltrace2/func-status.h>`: `<babeltrace2/babeltrace.h>` includes it,
and clears the private status definitions itself at the end. Therefore
this patch removes `undef-func-status.h`.

Some parts of the project need to have access to the `__BT_FUNC_STATUS_*`
definitions. To do that, they do:

    #define __BT_IN_BABELTRACE_H
    #include <babeltrace2/func-status.h>

Because `<babeltrace2/babeltrace.h>` is now manually written and
maintained, this patch removes `extras/gen-babeltrace-h.py` which we
used to generate it from `include/Makefile.am`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Icc3bf0bec18a465024b316f02f84df7a75429b87
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1671
Tested-by: jenkins <jenkins@lttng.org>
109 files changed:
extras/gen-babeltrace-h.py [deleted file]
include/Makefile.am
include/babeltrace2/babeltrace.h
include/babeltrace2/current-thread.h
include/babeltrace2/error-cause-const.h
include/babeltrace2/error-const.h
include/babeltrace2/func-status.h
include/babeltrace2/graph/component-class-const.h
include/babeltrace2/graph/component-class-filter-const.h
include/babeltrace2/graph/component-class-filter.h
include/babeltrace2/graph/component-class-sink-const.h
include/babeltrace2/graph/component-class-sink.h
include/babeltrace2/graph/component-class-source-const.h
include/babeltrace2/graph/component-class-source.h
include/babeltrace2/graph/component-class.h
include/babeltrace2/graph/component-const.h
include/babeltrace2/graph/component-filter-const.h
include/babeltrace2/graph/component-sink-const.h
include/babeltrace2/graph/component-source-const.h
include/babeltrace2/graph/connection-const.h
include/babeltrace2/graph/graph-const.h
include/babeltrace2/graph/graph.h
include/babeltrace2/graph/message-const.h
include/babeltrace2/graph/message-discarded-events-const.h
include/babeltrace2/graph/message-discarded-events.h
include/babeltrace2/graph/message-discarded-packets-const.h
include/babeltrace2/graph/message-discarded-packets.h
include/babeltrace2/graph/message-event-const.h
include/babeltrace2/graph/message-event.h
include/babeltrace2/graph/message-iterator.h
include/babeltrace2/graph/message-message-iterator-inactivity-const.h
include/babeltrace2/graph/message-message-iterator-inactivity.h
include/babeltrace2/graph/message-packet-beginning-const.h
include/babeltrace2/graph/message-packet-beginning.h
include/babeltrace2/graph/message-packet-end-const.h
include/babeltrace2/graph/message-packet-end.h
include/babeltrace2/graph/message-stream-beginning-const.h
include/babeltrace2/graph/message-stream-beginning.h
include/babeltrace2/graph/message-stream-const.h
include/babeltrace2/graph/message-stream-end-const.h
include/babeltrace2/graph/message-stream-end.h
include/babeltrace2/graph/port-const.h
include/babeltrace2/graph/port-input-const.h
include/babeltrace2/graph/port-output-const.h
include/babeltrace2/graph/port-output-message-iterator.h
include/babeltrace2/graph/query-executor-const.h
include/babeltrace2/graph/query-executor.h
include/babeltrace2/graph/self-component-class-filter.h
include/babeltrace2/graph/self-component-class-sink.h
include/babeltrace2/graph/self-component-class-source.h
include/babeltrace2/graph/self-component-filter.h
include/babeltrace2/graph/self-component-port-input-message-iterator.h
include/babeltrace2/graph/self-component-port-input.h
include/babeltrace2/graph/self-component-port-output.h
include/babeltrace2/graph/self-component-port.h
include/babeltrace2/graph/self-component-sink.h
include/babeltrace2/graph/self-component-source.h
include/babeltrace2/graph/self-component.h
include/babeltrace2/graph/self-message-iterator.h
include/babeltrace2/logging.h
include/babeltrace2/plugin/plugin-const.h
include/babeltrace2/plugin/plugin-dev.h
include/babeltrace2/plugin/plugin-set-const.h
include/babeltrace2/property.h
include/babeltrace2/trace-ir/clock-class-const.h
include/babeltrace2/trace-ir/clock-class.h
include/babeltrace2/trace-ir/clock-snapshot-const.h
include/babeltrace2/trace-ir/event-class-const.h
include/babeltrace2/trace-ir/event-class.h
include/babeltrace2/trace-ir/event-const.h
include/babeltrace2/trace-ir/event.h
include/babeltrace2/trace-ir/field-class-const.h
include/babeltrace2/trace-ir/field-class.h
include/babeltrace2/trace-ir/field-const.h
include/babeltrace2/trace-ir/field-path-const.h
include/babeltrace2/trace-ir/field.h
include/babeltrace2/trace-ir/packet-const.h
include/babeltrace2/trace-ir/packet-context-field.h
include/babeltrace2/trace-ir/packet.h
include/babeltrace2/trace-ir/stream-class-const.h
include/babeltrace2/trace-ir/stream-class.h
include/babeltrace2/trace-ir/stream-const.h
include/babeltrace2/trace-ir/stream.h
include/babeltrace2/trace-ir/trace-class-const.h
include/babeltrace2/trace-ir/trace-class.h
include/babeltrace2/trace-ir/trace-const.h
include/babeltrace2/trace-ir/trace.h
include/babeltrace2/types.h
include/babeltrace2/undef-func-status.h [deleted file]
include/babeltrace2/util.h
include/babeltrace2/value-const.h
include/babeltrace2/value.h
include/babeltrace2/version.h
src/bindings/python/bt2/bt2/native_bt.i
src/common/common.h
src/lib/babeltrace2.c
src/lib/current-thread.c
src/lib/error.c
src/lib/error.h
src/lib/func-status.h
src/lib/lib-logging.c
src/lib/logging.c
src/lib/property.h
src/lib/util.c
src/lib/value.c
src/lib/value.h
src/logging/log.h
src/plugins/comp-logging.h
tests/ctf-writer/ctf_writer.c

diff --git a/extras/gen-babeltrace-h.py b/extras/gen-babeltrace-h.py
deleted file mode 100644 (file)
index b83f262..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-import re
-
-
-class _Section:
-    def __init__(self, title, filenames):
-        self.title = title
-        self.filenames = filenames
-
-
-def _get_sections(file):
-    sections = []
-    cur_title = None
-    cur_filenames = []
-
-    for line in file:
-        m = re.match(r'^# (.+API.*)$', line)
-
-        if m:
-            if cur_filenames:
-                sections.append(_Section(cur_title, cur_filenames))
-                cur_title = None
-                cur_filenames = []
-
-            cur_title = m.group(1)
-            continue
-
-        m = re.match(r'^\s+(babeltrace2/.+\.h).*$', line)
-
-        if m:
-            if m.group(1) != 'babeltrace2/babeltrace.h':
-                cur_filenames.append(m.group(1))
-
-            continue
-
-        if re.match(r'^noinst_HEADERS.*', line):
-            break
-
-    if cur_filenames:
-        sections.append(_Section(cur_title, cur_filenames))
-
-    return sections
-
-
-def _c_includes_from_sections(sections):
-    src = ''
-
-    for section in sections:
-        # CTF writer is not part of the Babeltrace library
-        if 'ctf' in section.title.lower():
-            continue
-
-        src += '/* {} */\n'.format(section.title)
-        lines = []
-
-        for filename in sorted(section.filenames):
-            # not part of the API
-            if 'func-status' in filename:
-                continue
-
-            lines.append('#include <{}>\n'.format(filename))
-
-        lines.sort()
-        src += ''.join(lines)
-        src += '\n'
-
-    return src[:-1]
-
-
-def _main():
-    with open('include/Makefile.am') as f:
-        sections = _get_sections(f)
-
-    print('''#ifndef BABELTRACE2_BABELTRACE_H
-#define BABELTRACE2_BABELTRACE_H
-
-/*
- * Babeltrace API
- *
- * Copyright 2010-2018 EfficiOS Inc. <http://www.efficios.com/>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-''')
-    print(_c_includes_from_sections(sections))
-    print('#endif /* BABELTRACE2_BABELTRACE_H */')
-
-
-if __name__ == '__main__':
-    _main()
index 95a3327e9f9bd965f5e343627ba7291f9892dc02..72fa2761e2b560c5508c9b4e593b4eb0300ab9d4 100644 (file)
@@ -2,14 +2,13 @@
 babeltrace2includedir = "$(includedir)/babeltrace2"
 babeltrace2include_HEADERS = \
        babeltrace2/babeltrace.h \
-       babeltrace2/func-status.h \
        babeltrace2/current-thread.h \
        babeltrace2/error-cause-const.h \
        babeltrace2/error-const.h \
+       babeltrace2/func-status.h \
        babeltrace2/logging.h \
        babeltrace2/property.h \
        babeltrace2/types.h \
-       babeltrace2/undef-func-status.h \
        babeltrace2/util.h \
        babeltrace2/value-const.h \
        babeltrace2/value.h \
index bd988688fb85c8b3ad5fc8fd7cee017289d9c806..11eab6b6b0a44169e41eca4f9353095d654987aa 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * Babeltrace API
  *
- * Copyright 2010-2018 EfficiOS Inc. <http://www.efficios.com/>
+ * Copyright 2010-2019 EfficiOS Inc. <http://www.efficios.com/>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * SOFTWARE.
  */
 
+/*
+ * Tell the specific headers that they are included from this header.
+ *
+ * Do NOT define `__BT_IN_BABELTRACE_H` in user code.
+ */
+#ifndef __BT_IN_BABELTRACE_H
+# define __BT_IN_BABELTRACE_H
+#endif
+
+/* Need by some of the following included headers */
+#include <babeltrace2/func-status.h>
+
 /* Core API */
 #include <babeltrace2/current-thread.h>
 #include <babeltrace2/error-cause-const.h>
 #include <babeltrace2/trace-ir/trace-const.h>
 #include <babeltrace2/trace-ir/trace.h>
 
-/* Plugin and plugin development API */
-#include <babeltrace2/plugin/plugin-const.h>
-#include <babeltrace2/plugin/plugin-dev.h>
-#include <babeltrace2/plugin/plugin-set-const.h>
-
-/* Graph, component, and message API */
+/* Component class API */
 #include <babeltrace2/graph/component-class-const.h>
 #include <babeltrace2/graph/component-class-filter-const.h>
 #include <babeltrace2/graph/component-class-filter.h>
 #include <babeltrace2/graph/component-class-source-const.h>
 #include <babeltrace2/graph/component-class-source.h>
 #include <babeltrace2/graph/component-class.h>
+#include <babeltrace2/graph/self-component-class-filter.h>
+#include <babeltrace2/graph/self-component-class-sink.h>
+#include <babeltrace2/graph/self-component-class-source.h>
+
+/* Component API */
 #include <babeltrace2/graph/component-const.h>
 #include <babeltrace2/graph/component-filter-const.h>
 #include <babeltrace2/graph/component-sink-const.h>
 #include <babeltrace2/graph/component-source-const.h>
-#include <babeltrace2/graph/connection-const.h>
-#include <babeltrace2/graph/graph-const.h>
-#include <babeltrace2/graph/graph.h>
+#include <babeltrace2/graph/self-component-filter.h>
+#include <babeltrace2/graph/self-component-port-input.h>
+#include <babeltrace2/graph/self-component-port-output.h>
+#include <babeltrace2/graph/self-component-port.h>
+#include <babeltrace2/graph/self-component-sink.h>
+#include <babeltrace2/graph/self-component-source.h>
+#include <babeltrace2/graph/self-component.h>
+
+/* Message iterator API */
+#include <babeltrace2/graph/message-iterator.h>
+#include <babeltrace2/graph/port-output-message-iterator.h>
+#include <babeltrace2/graph/self-component-port-input-message-iterator.h>
+#include <babeltrace2/graph/self-message-iterator.h>
+
+/* Message API */
 #include <babeltrace2/graph/message-const.h>
 #include <babeltrace2/graph/message-discarded-events-const.h>
 #include <babeltrace2/graph/message-discarded-events.h>
 #include <babeltrace2/graph/message-discarded-packets.h>
 #include <babeltrace2/graph/message-event-const.h>
 #include <babeltrace2/graph/message-event.h>
-#include <babeltrace2/graph/message-iterator.h>
 #include <babeltrace2/graph/message-message-iterator-inactivity-const.h>
 #include <babeltrace2/graph/message-message-iterator-inactivity.h>
 #include <babeltrace2/graph/message-packet-beginning-const.h>
 #include <babeltrace2/graph/message-stream-const.h>
 #include <babeltrace2/graph/message-stream-end-const.h>
 #include <babeltrace2/graph/message-stream-end.h>
+
+/* Graph API */
+#include <babeltrace2/graph/connection-const.h>
+#include <babeltrace2/graph/graph-const.h>
+#include <babeltrace2/graph/graph.h>
 #include <babeltrace2/graph/port-const.h>
 #include <babeltrace2/graph/port-input-const.h>
 #include <babeltrace2/graph/port-output-const.h>
-#include <babeltrace2/graph/port-output-message-iterator.h>
+
+/* Query executor API */
 #include <babeltrace2/graph/query-executor-const.h>
 #include <babeltrace2/graph/query-executor.h>
-#include <babeltrace2/graph/self-component-class-filter.h>
-#include <babeltrace2/graph/self-component-class-sink.h>
-#include <babeltrace2/graph/self-component-class-source.h>
-#include <babeltrace2/graph/self-component-filter.h>
-#include <babeltrace2/graph/self-component-port-input-message-iterator.h>
-#include <babeltrace2/graph/self-component-port-input.h>
-#include <babeltrace2/graph/self-component-port-output.h>
-#include <babeltrace2/graph/self-component-port.h>
-#include <babeltrace2/graph/self-component-sink.h>
-#include <babeltrace2/graph/self-component-source.h>
-#include <babeltrace2/graph/self-component.h>
-#include <babeltrace2/graph/self-message-iterator.h>
+
+/* Plugin API */
+#include <babeltrace2/plugin/plugin-const.h>
+#include <babeltrace2/plugin/plugin-set-const.h>
+
+/* Plugin development */
+#include <babeltrace2/plugin/plugin-dev.h>
+
+/* Cancel private definitions */
+#undef __BT_FUNC_STATUS_OVERFLOW
+#undef __BT_FUNC_STATUS_INVALID_PARAMS
+#undef __BT_FUNC_STATUS_INVALID_OBJECT
+#undef __BT_FUNC_STATUS_MEMORY_ERROR
+#undef __BT_FUNC_STATUS_LOADING_ERROR
+#undef __BT_FUNC_STATUS_ERROR
+#undef __BT_FUNC_STATUS_OK
+#undef __BT_FUNC_STATUS_END
+#undef __BT_FUNC_STATUS_NOT_FOUND
+#undef __BT_FUNC_STATUS_AGAIN
+#undef __BT_FUNC_STATUS_UNSUPPORTED
+#undef __BT_FUNC_STATUS_CANCELED
+#undef __BT_IN_BABELTRACE_H
 
 #endif /* BABELTRACE2_BABELTRACE_H */
index 65d32ec1830134c544b57e08806245ec7c7b80ff..125db20e1e1af00ce7f9695fd411577488975fdd 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdarg.h>
 
 /*
  */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -98,6 +97,4 @@ bt_current_thread_error_append_cause_from_message_iterator(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_CURRENT_THREAD_H */
index 3fd1dfd3e2b4ba09103f1afd0d7b4413f4ce2dd6..8b4e36e06d8601df81f25d617a1c7e0f87cf544f 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stddef.h>
 
index 5ac971def2b1084b94bb4507b575ae37a2f3b5d2..bee1b7524443d928902b056bfebaff17eaa4c54d 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stddef.h>
 
index 60b68628f977b75e295e946912991b11d1584dd2..640cc98a150696755e6453b3647d60304906daa2 100644 (file)
@@ -1,12 +1,6 @@
 /*
- * No include guards here: this header is included by a public header to
- * get the `__BT_FUNC_STATUS_*` definitions locally, and then
- * <babeltrace2/undef-func-status.h> is included at the end of the
- * header to undefine all those definitions.
- *
- * If we forget to include <babeltrace2/undef-func-status.h> at the end
- * of a public header, we want to get the "redefined" compiler warning
- * to catch it.
+ * No include guards here: it is safe to include this file multiple
+ * times.
  */
 
 /*
  * SOFTWARE.
  */
 
-/*
- * This is just extra protection, in case the user tries to include
- * <babeltrace2/func-status.h> in user code: this is a redminder that
- * this header is reserved for internal use.
- *
- * The correct way for a public header to include this is:
- *
- *     #define __BT_FUNC_STATUS_ENABLE
- *     #include <babeltrace2/func-status.h>
- *     #undef __BT_FUNC_STATUS_ENABLE
- */
-#ifndef __BT_FUNC_STATUS_ENABLE
-# error Do NOT include <babeltrace2/func-status.h> in user code.
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
 #endif
 
 /*
  */
 
 /* Value is too large for the given data type */
-#define __BT_FUNC_STATUS_OVERFLOW              -75
+#ifndef __BT_FUNC_STATUS_OVERFLOW
+# define __BT_FUNC_STATUS_OVERFLOW             -75
+#endif
 
 /* Invalid query parameters */
-#define __BT_FUNC_STATUS_INVALID_PARAMS                -24
+#ifndef __BT_FUNC_STATUS_INVALID_PARAMS
+# define __BT_FUNC_STATUS_INVALID_PARAMS       -24
+#endif
 
 /* Invalid query object */
-#define __BT_FUNC_STATUS_INVALID_OBJECT                -23
+#ifndef __BT_FUNC_STATUS_INVALID_OBJECT
+# define __BT_FUNC_STATUS_INVALID_OBJECT       -23
+#endif
 
 /* Memory allocation error */
-#define __BT_FUNC_STATUS_MEMORY_ERROR          -12
+#ifndef __BT_FUNC_STATUS_MEMORY_ERROR
+# define __BT_FUNC_STATUS_MEMORY_ERROR         -12
+#endif
 
 /* Plugin loading error */
-#define __BT_FUNC_STATUS_LOADING_ERROR         -2
+#ifndef __BT_FUNC_STATUS_LOADING_ERROR
+# define __BT_FUNC_STATUS_LOADING_ERROR                -2
+#endif
 
 /* General error */
-#define __BT_FUNC_STATUS_ERROR                 -1
+#ifndef __BT_FUNC_STATUS_ERROR
+# define __BT_FUNC_STATUS_ERROR                        -1
+#endif
 
 /* Saul Goodman */
-#define __BT_FUNC_STATUS_OK                    0
+#ifndef __BT_FUNC_STATUS_OK
+# define __BT_FUNC_STATUS_OK                   0
+#endif
 
 /* End of iteration/consumption */
-#define __BT_FUNC_STATUS_END                   1
+#ifndef __BT_FUNC_STATUS_END
+# define __BT_FUNC_STATUS_END                  1
+#endif
 
 /* Something can't be found */
-#define __BT_FUNC_STATUS_NOT_FOUND             2
+#ifndef __BT_FUNC_STATUS_NOT_FOUND
+# define __BT_FUNC_STATUS_NOT_FOUND            2
+#endif
 
 /* Try operation again later */
-#define __BT_FUNC_STATUS_AGAIN                 11
+#ifndef __BT_FUNC_STATUS_AGAIN
+# define __BT_FUNC_STATUS_AGAIN                        11
+#endif
 
 /* Unsupported operation */
-#define __BT_FUNC_STATUS_UNSUPPORTED           95
+#ifndef __BT_FUNC_STATUS_UNSUPPORTED
+# define __BT_FUNC_STATUS_UNSUPPORTED          95
+#endif
 
 /* Object is canceled */
-#define __BT_FUNC_STATUS_CANCELED              125
+#ifndef __BT_FUNC_STATUS_CANCELED
+# define __BT_FUNC_STATUS_CANCELED             125
+#endif
index e68c572dfa7ada7b7c768dd6d28518e3a74e8129..250b07624be4822f0014859be63a98c28d568491 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_bool, bt_component_class */
 #include <babeltrace2/types.h>
 
index bfa27cbc46123eae2828c78b0e64b22c7918f3ff..df8676000b77b17c103aa5819643d4a4c3172e51 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_component_class, bt_component_class_filter,
  * __BT_UPCAST_CONST
index 44ce7339c449bc346b101612b92b3df3307738b9..3616b01ac7d334deb7f7898c5207f76d3ee18a69 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_component_class_*_status */
index 5fba26ec97499f1f82312bb37fa5c208eae4ce02..d4833fbc63942d274169dbe886558c74a4da5422 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_component_class, bt_component_class_sink, __BT_UPCAST_CONST */
 #include <babeltrace2/types.h>
 
index 80ee66c820bdc0b131e7362b04e2b7b74748dd88..48d647f50f87eaceda63ac9ad11b63caa0b4cc5d 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_component_class_*_status */
 /* For bt_logging_level */
 #include <babeltrace2/logging.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -139,6 +138,4 @@ bt_component_class_sink_set_query_method(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_GRAPH_COMPONENT_CLASS_SINK_H */
index 0b347bda9026885fa1975ae25fee5c1c418ba5db..42181ce6516569dba5a32b41626743087e797745 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_component_class, bt_component_class_source,
  * __BT_UPCAST_CONST
index 1bd9e4d2ed05c9c350323b729a1046c7e8fb8487..3aa89cef9e25374ded7cc72fd0f4ec8877c06021 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_component_class_*_status */
index bd399f3a1c91d1a1b95d50da686c683cbf659576..b666ba93fd008022e43b3ae89873ea12b0c77c4c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_component_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -111,6 +110,4 @@ extern bt_component_class_set_help_status bt_component_class_set_help(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_GRAPH_COMPONENT_CLASS_H */
index a504a760c8eeaf0a4dae2182bb2dc634b157dd12..aa9f84ceef002ac643384ec01eb53ffd913f1bf4 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_component_class_type */
 #include <babeltrace2/graph/component-class-const.h>
 
index 098db72a9a2306e40f94a73d9d0d356fa3a72949..270119517edb1b6831166e407db8c312cb487b46 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
index a5505673e9500fd9672c38b82b28fe51a3ff0653..d6a39254c80fd4f1847087ceb915d940c8aac95a 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
index 2e0bacfd92158b9d18466c6ed4748a6bf29cc1c3..c0f4e9269060a7b207623cea1eb6a433025e26b7 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
index 38ce792213b94a9b09bc8479038f43f19afaafcc..9f1f2a8738062a4b7f689c0587676133af9949f3 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_bool, bt_port_input, bt_port_output, bt_connection */
 #include <babeltrace2/types.h>
 
index ae544a3c9d903a75980490648c819617a52413ec..8fd9a5d6dae2035c653f8558e943355fb9ea112c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_bool, bt_graph */
 #include <babeltrace2/types.h>
 
index 4b1909e83e5ced336593933dfba6fa0ddaf399de..4e85e4274c2571422d3c7dfacbe651e22573c086 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_bool, bt_component, bt_component_class,
  * bt_component_class_filter, bt_component_class_sink,
 /* For bt_logging_level */
 #include <babeltrace2/logging.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -258,6 +257,4 @@ extern bt_graph_cancel_status bt_graph_cancel(bt_graph *graph);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_GRAPH_GRAPH_H */
index bb3de18e594d4a64b33fa013ab6f014b06d28288..cd3efe40caa3ad9a732550f622eea73c421781ce 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message */
 #include <babeltrace2/types.h>
 
index 640760672063622dff0404dc97b1462560ad7ec9..4f7da252ff538b69c23e2d6bb63c69ef65405a57 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_clock_snapshot, bt_stream */
 #include <babeltrace2/types.h>
 
index 5b3cb7a57f78bd35faeba29762a5f108737172da..b2b97d6fa49bfa29982f6f5eadb492b5db431e40 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_message, bt_self_message_iterator, bt_stream */
index ea02fbaafa5b07572e3139aeaa03b584d3ae6eba..6bfee12e1de896cceb8fefcc1dca9b5b3c9b413c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_clock_snapshot, bt_stream */
 #include <babeltrace2/types.h>
 
index 3c2f22d88b4542ea81ac2c69776ad7d36ddfdf58..bc1896b1a7e5b56465d9a93a2365c7dbef6be52c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_message, bt_self_message_iterator, bt_stream */
index c8cd61047aac3d32c2ee2c8bfabadcbd8435bdd3..933582af2e7b1e956a20646ef96fb75a120edcd6 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_bool, bt_message, bt_event. bt_clock_class, bt_clock_snapshot */
 #include <babeltrace2/types.h>
 
index dbf8a6fe057b347f336db698e4126665b77ae96c..c7f48e087842993cb8dd8a2bf8536e4dfa1f0fc2 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
index 7074795969810e9a4bcf90833b9b1a657485296c..bfe9ae491b515627779a69b22bbfd596dc77c1a1 100644 (file)
  * SOFTWARE.
  */
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -61,6 +60,4 @@ typedef enum bt_message_iterator_seek_ns_from_origin_status {
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_GRAPH_MESSAGE_ITERATOR_H */
index b1df4d1384db76e98e532d77dde0eb7e4175f24f..ceeb7f86c46471dfad1f74cf5d5cb6c16ff7df5e 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_clock_snapshot */
 #include <babeltrace2/types.h>
 
index a2deac6615b25ab7e9a90287412173163a4a0326..c738a6e9006d5bee274645a02828ff89bae5e07a 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_self_message_iterator, bt_message, bt_clock_class */
index e65857ce68d2a85e8c1a23d337f38c3913087012..f0e2a0dd980dfe8864f7e5a58f5ef062cdda201c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_packet, bt_clock_snapshot, bt_clock_class */
 #include <babeltrace2/types.h>
 
index 20eed9c0750f087629e1337b2a8cc2b318870014..a6942469a3e94591c7e676c5ef7767316633a901 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_message, bt_self_message_iterator, bt_packet */
index d9ca90852efba55c083fcb005f9342b7da070c46..feb857c3b6d3e86a715712175b550622a38787cc 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_packet, bt_clock_snapshot, bt_clock_class */
 #include <babeltrace2/types.h>
 
index 424c3070db79f1555dd17c796b7bc2f1f1733353..5eb25e7bf072ae1c382a0fc3cb72b73d5ab2a725 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_message, bt_self_message_iterator, bt_packet */
index 22e3d511e9009869af013c39bae5f84943b9d000..95b58f073d32ab51b6c45f9b6485aac8c42611c9 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_clock_snapshot, bt_stream */
 #include <babeltrace2/types.h>
 
index 95f0e008ace58257671536cfd0b3bbb835f3eba8..b798a65472e00817c7dacdb3deda50116ae7360c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_self_message_iterator, bt_stream */
 #include <babeltrace2/types.h>
 
index 2c42ed9eef81f686d4891f30691f0f84d319d138..50592bcd1b6bd873b7f9e74667ef0a31ac2e1452 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 1da44c96a6c0007443b180d8a5a4aecea7d6d751..b7bccc7d2d9cf14ce9074e2820317c2e2a4a6f9d 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_clock_snapshot, bt_stream */
 #include <babeltrace2/types.h>
 
index 6f3f36b3d09bc456b2764d8fa4c05da721367a37..948c53f534e98f206b3d93145b300ecb503a6233 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_message, bt_self_message_iterator, bt_stream */
 #include <babeltrace2/types.h>
 
index a6436a5daf1c1c7c5a66685430fc5d56a87c1091..3ed544265f9754c63f8c061af3382f966eebe4c0 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_bool, bt_port, bt_connection, bt_component */
index c0882f7ab8c867d12ed7cb16531a67c18e335130..a1b32eced56e870afd67829ba2c38aea285d8399 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_port, bt_port_input, __BT_UPCAST_CONST */
 #include <babeltrace2/types.h>
 
index 9ebcb4448b8dd0cbb3b2dd07fe746f1929288d30..b923691adffde85f52f18409e4f5b74e541f4fff 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_port, bt_port_output, __BT_UPCAST_CONST */
 #include <babeltrace2/types.h>
 
index d49839fb6d4c6b015b913e3f1f06818187d93310..04bed3dcffc49952032bc771cf0e2e1c7993dabe 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_message_iterator_*_status */
index 59ac13c1e20da1bab9219bc47446669c14c1133f..6fa6f332d9a8b8eb52240038b8a435628be45ff3 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_bool, bt_query_executor */
 #include <babeltrace2/types.h>
 
index c6a84101e3e9daf5e83a0d691038e22e89494b03..2992cb477a13da6e7812fe664cf91681486bf578 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_query_executor, bt_component_class, bt_value */
 #include <babeltrace2/types.h>
 
 /* For bt_logging_level */
 #include <babeltrace2/logging.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -71,6 +70,4 @@ bt_query_executor_cancel_status bt_query_executor_cancel(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_GRAPH_QUERY_EXECUTOR_H */
index 83045f7093ba4d19ddb1e4b08179ee8be29200dd..f901c7abd7ba141fdf87e25c2a1598b9eacd6204 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_component_class_filter, bt_self_component_class_filter,
  * __BT_UPCAST_CONST
index e06c6b6f2b7095e0b5bf0be1e5361c53ea298653..ec116f47c23465b293189d46e94c619623745e4b 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_component_class_sink, bt_self_component_class_sink,
  * __BT_UPCAST_CONST
index a083546f6c1c88298833f5842667b53aa7e34bdf..6d4dd082f3e8756ff355ed9b8b8a29af8e86fc43 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_component_class_source, bt_self_component_class_source,
  * __BT_UPCAST_CONST
index 20b3e9f87bc488914806b07ae3a5cddfc07f1f75..2d07f31f3e87598aa702af51ccf8886d75deb726 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_self_component_*_status */
index 22f7087631d38c508e47cf66880069261867c0a5..d53353b71d6b2354655e174fbefb1eaa22a7ee94 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_message_iterator_*_status */
index 094f3f3eadc81e2a15f52c639e5732ec410b1ba3..29bde50d7b2896df84c9f12d791a6add486f9a04 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_port_input, bt_self_component_port,
  * bt_self_component_port_input, __BT_UPCAST, __BT_UPCAST_CONST
index 62adf8dd8ee6ec70a5dfd527ba8fe291e5d2aed9..8e13d7d1868e6a8a6b3cc85dc74f7e09df734d56 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_port_output, bt_self_component_port,
  * bt_self_component_port_output, __BT_UPCAST, __BT_UPCAST_CONST
index c788523a225c6c2e51a4032bc87706bbdca7f4db..bd93753d0807d47786020049ebdd433f4a0e8dab 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_port, bt_self_component_port, bt_self_component,
  * bt_connection, __BT_UPCAST_CONST
index a55fba752bff82fc44c82d4af37baa4713fb2038..ed9c307e12830a8e9e6667a6d693e83d65c83d45 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_self_component_*_status */
index abd0f85cac1fa31fbe0accc5a927e0537ee320d9..6dac6f6410a83fad74a01d2ad700461019860fbc 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_self_component_*_status */
index a63312c4a362027d9dfef47fe609e12819950618..f0b02ee80a6486f1d687d1fb308d674023b4229c 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_component, bt_self_component, __BT_UPCAST */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -58,6 +57,4 @@ extern void bt_self_component_set_data(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_GRAPH_SELF_COMPONENT_H */
index d33ca4e725ed96952a44b766c833041d9fe9eb4a..155542b87416f002bb5c9947e9a1595736adefdc 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_self_component, bt_self_message_iterator, bt_self_port_output */
 #include <babeltrace2/types.h>
 
index 5e5bc3c58470748b1f071521279f487ddee05246..ea6eadab6fe95a973cf8d2dd67794907037684e2 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stdbool.h>
 #include <stddef.h>
index 034fb5431564dd4e7ba0649de00c70e48223196e..df82ddc029895705227110af8a3fbd382c9e6025 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stddef.h>
 
 /* For bt_property_availability */
 #include <babeltrace2/property.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -162,6 +161,4 @@ extern void bt_plugin_put_ref(const bt_plugin *plugin);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_PLUGIN_PLUGIN_CONST_H */
index b50a6cc18c4ee425fe35bba8db108929a26e3b2c..e2b03be09434678f946c6ed34ae2aafbb5d017bf 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_component_class_type */
 /* For bt_self_plugin */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 /*
  * _BT_HIDDEN: set the hidden attribute for internal functions
  * On Windows, symbols are local unless explicitly exported,
@@ -1479,6 +1478,4 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */
index e02bd0c29beadf670e15209b22a6504331d1381d..6e68b30f998716b443835e1b146e05cb99058aa9 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_plugin, bt_plugin_set */
index 91d088a74f07a90180ae21afe3b6c8a7596a7147..3e62455b558f375222f6fa6feebff9a41aae6dc6 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index c5a303dfcf758b714df16b429a00c622ba604523..efc27060839a5e73c025b3616f27209e3c5afe59 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_bool, bt_uuid, bt_clock_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -93,6 +92,4 @@ extern void bt_clock_class_put_ref(const bt_clock_class *clock_class);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_CLOCK_CLASS_CONST_H */
index 6cfecbae129bb86b051eb64d1c67a052cb28e768..556366f086884853a1ef1e4893566f7d2dc24327 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_bool, bt_uuid, bt_clock_class, bt_trace_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -78,6 +77,4 @@ extern void bt_clock_class_set_uuid(bt_clock_class *clock_class,
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_CLOCK_CLASS_H */
index 00a47d69606c4e9594f05acd53c883fd1ce78469..e0d87b92b501ffe7bc7232c40262db3a2aab4c9a 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_clock_class, bt_clock_snapshot */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -61,6 +60,4 @@ bt_clock_snapshot_get_ns_from_origin(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_CLOCK_SNAPSHOT_CONST_H */
index dde7c9236425d63e5ff2ad1ed3b69aec8a2a9c2b..23c8acd14b463a02f5bf4f6deb3598fe57a7543a 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_property_availability */
 #include <babeltrace2/property.h>
 
index ca6ad2680b22d00e525e2180cc61e6fadba3e9ae..9b67e943749cf1afa4384be18ef81e3f6e942a16 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_event_class_log_level */
 /* For bt_event_class, bt_stream_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -96,6 +95,4 @@ extern bt_field_class *bt_event_class_borrow_payload_field_class(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_EVENT_CLASS_H */
index c762b6b2e3a65bdc5a28daa8981e9badb7e47302..ff8c07108c864d396b39f1c0154102b98c3ed2ad 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_event, bt_event_class, bt_field, bt_packet */
 #include <babeltrace2/types.h>
 
index 57c5251a79f453c5d05cd2f94fef27928c0f7a3f..00fe64a2e8c1fa5afaea9755de8b1559debd7a76 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_event, bt_event_class, bt_field, bt_packet */
 #include <babeltrace2/types.h>
 
index 1dd49f0adac505b56a83735cbb52ca4a9972c299..5a8b2b49955d9f6150a66f7a5f7db61444b02c2a 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /*
  * For bt_bool, bt_field_class, bt_field_path,
  * bt_field_class_enumeration_mapping,
 #include <stdint.h>
 #include <stddef.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -214,6 +213,4 @@ extern void bt_field_class_put_ref(const bt_field_class *field_class);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_FIELD_CLASS_CONST_H */
index d6997db5aabc1e8f8cbe2066712da98f9c8cd9bd..f66fbb44525383a0f1bc775f27834cce0fa3f8ce 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stddef.h>
 
 /* For bt_field_class_integer_preferred_display_base */
 #include <babeltrace2/trace-ir/field-class-const.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -167,6 +166,4 @@ extern bt_field_class *bt_field_class_variant_option_borrow_field_class(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_FIELD_CLASS_H */
index f72579091e9bebcbad939bf53dc433f8af8a866f..c2e39fd356d9eb6f71efc2535e5dff636107b363 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_field_class_type */
 /* For bt_field, bt_field_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -101,6 +100,4 @@ bt_field_variant_borrow_selected_option_field_const(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_FIELD_CONST_H */
index e1c24164d6793bfda00077ef4c340423519a36e8..286450fe8bb9e30f629a27a18c1a2a0bdea3e9f3 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_field_path, bt_field_path_item */
index 1b80cdfb2d1f00dc3c50209af25385866cb1eccd..4910927f82127cc295be26c32474c25b3dd77768 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_field, bt_field_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -103,6 +102,4 @@ extern bt_field *bt_field_variant_borrow_selected_option_field(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_FIELD_H */
index 1272f99b2e72e3509cdb60eeecf9d08df75d923d..5390a165f5862229d76b7dfeff23533507ef0349 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_property_availability */
index 255c03091385040f12948049739a29b5de4fb23a..376373e6f543977fd123a6ed2dc7f8200822e93e 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_stream_class, bt_packet_context_field, bt_field */
 #include <babeltrace2/types.h>
 
index 3ef1ecb6373c06b9b00a3ed97731f74215c5b72f..bc45a4eb3b45d0d305a6ebb65d6f8658dea2bb75 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_packet, bt_packet_context_field, bt_stream */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -59,6 +58,4 @@ bt_packet_move_context_field_status bt_packet_move_context_field(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_PACKET_H */
index 3e869e6be3560a07b01421da7e8013815861c127..d8233830580049d91ca6a867e86608c44d4ed0ca 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
index 15457cfcaedd6beb3f2f633a6db430c7f16f788f..48d506376c6ef8c24b028061dda5504a39b6b43f 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
  */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -129,6 +128,4 @@ bt_stream_class_set_default_clock_class(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_STREAM_CLASS_H */
index 73786d4fa19f2426bdb8b98a0127e92578106c8e..61da523d61897c509823ed4166e213ad224ab7c9 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 /* For bt_trace, bt_stream, bt_stream_class */
 #include <babeltrace2/types.h>
 
index 614b4b8f4824eb110cbdb98f2154466679168b06..8006dc5967deed7493a8bbeae25070f7beefa95c 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_trace, bt_stream, bt_stream_class */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -64,6 +63,4 @@ extern bt_stream_set_name_status bt_stream_set_name(bt_stream *stream,
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_STREAM_H */
index 96b9ba371f87b1e007c65b54f64e8fd9f52df7ea..ca75bee48550c4002014ffb0bbb633d0b5064207 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
  */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -101,6 +100,4 @@ extern void bt_trace_class_put_ref(const bt_trace_class *trace_class);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_TRACE_CLASS_CONST_H */
index 2fa94aca7d4fb0252e8fc2719408f3ff7e68eb18..52a87bab048029f54eb79abc0d5b2e03535330d8 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_bool, bt_trace_class, bt_stream_class, bt_self_component */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -56,6 +55,4 @@ extern bt_stream_class *bt_trace_class_borrow_stream_class_by_id(
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_TRACE_CLASS_H */
index 9662810a3278771f7381e34a72ac80fa9bf2f73a..db06dcba30fb2fd8dcc79c0e20940b36461a76b5 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /*
  */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -110,6 +109,4 @@ extern void bt_trace_put_ref(const bt_trace *trace);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_TRACE_CONST_H */
index fcbf43f072e11f2ebfc584fdde8121d24abae6d7..0e0887210634ef7076932945f9b316334022bab2 100644 (file)
  * http://www.efficios.com/ctf
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* For bt_bool, bt_uuid, bt_trace, bt_trace_class, bt_stream */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -78,6 +77,4 @@ extern bt_stream *bt_trace_borrow_stream_by_id(bt_trace *trace,
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_TRACE_IR_TRACE_H */
index f49c652cbbd8330b3c5212ded0584c336e4aa25b..a8a8bb481160c4a689a7c698c823192fc795a813 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 /* Internal use */
diff --git a/include/babeltrace2/undef-func-status.h b/include/babeltrace2/undef-func-status.h
deleted file mode 100644 (file)
index efe6378..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef BABELTRACE2_UNDEF_FUNC_STATUS_H
-#define BABELTRACE2_UNDEF_FUNC_STATUS_H
-
-/*
- * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#undef __BT_FUNC_STATUS_OVERFLOW
-#undef __BT_FUNC_STATUS_INVALID_PARAMS
-#undef __BT_FUNC_STATUS_INVALID_OBJECT
-#undef __BT_FUNC_STATUS_MEMORY_ERROR
-#undef __BT_FUNC_STATUS_LOADING_ERROR
-#undef __BT_FUNC_STATUS_ERROR
-#undef __BT_FUNC_STATUS_OK
-#undef __BT_FUNC_STATUS_END
-#undef __BT_FUNC_STATUS_NOT_FOUND
-#undef __BT_FUNC_STATUS_AGAIN
-#undef __BT_FUNC_STATUS_UNSUPPORTED
-#undef __BT_FUNC_STATUS_CANCELED
-
-#endif /* BABELTRACE2_UNDEF_FUNC_STATUS_H */
index 515047c1bb2deb342243f064f799b7c5020fce56..d8878545878402a81b874773c47a430c0437263a 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 
 #ifdef __cplusplus
index 536b6443f3388bc9ce33533f013ac319a85b75de..f443a75597a777064fd0508919299e731291f28e 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stddef.h>
 
 /* For bt_bool, bt_value */
 #include <babeltrace2/types.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -204,6 +203,4 @@ extern void bt_value_put_ref(const bt_value *value);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_VALUE_CONST_H */
index b6a22562f525e8da539a9ec9a8fdf89626ce76cf..87190173b39e7dc16ab996f44f60cff1ded70e09 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #include <stdint.h>
 #include <stddef.h>
 
 /* For bt_value_type */
 #include <babeltrace2/value-const.h>
 
-/* For __BT_FUNC_STATUS_* */
-#define __BT_FUNC_STATUS_ENABLE
-#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -177,6 +176,4 @@ bt_value_map_insert_empty_map_entry(bt_value *map_obj, const char *key);
 }
 #endif
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE2_VALUE_H */
index 7138e94e9a896fddb54ae1f21975b6f58301a10a..d1677319551152343f4c0790ad98bb5488539a66 100644 (file)
  * SOFTWARE.
  */
 
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index f9fb451218a53166fe91d97a8ef5361b909f78af..c87a5e7280ca3300600878515df709b2a4f200dc 100644 (file)
 #define BT_LOG_TAG "BT2-PY"
 #include "logging.h"
 
+/*
+ * Include before `<babeltrace2/func-status.h>` because
+ * `<babeltrace2/babeltrace.h>` removes the `__BT_IN_BABELTRACE_H`
+ * definition.
+ */
 #include <babeltrace2/babeltrace.h>
 
 /*
  * This is not part of the API, but because those bindings reside within
  * the project, we take the liberty to use them.
  */
-#define __BT_FUNC_STATUS_ENABLE
+#define __BT_IN_BABELTRACE_H
 #include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
 
 #include "common/assert.h"
 #include "py-common/py-common.h"
@@ -180,11 +184,17 @@ typedef int bt_bool;
        $result = $1;
 }
 
+/*
+ * Define `__BT_IN_BABELTRACE_H` to allow specific headers to be
+ * included. This remains defined as long as we don't include the main
+ * header, `<babeltrace2/babeltrace.h>`.
+ */
+#define __BT_IN_BABELTRACE_H
+
 /* Property enumeration */
 %include <babeltrace2/property.h>
 
 /* Common function status codes */
-#define __BT_FUNC_STATUS_ENABLE
 %include <babeltrace2/func-status.h>
 
 /* Per-module interface files */
index ca1b1399a6144e3579ad421fc37e23705b3ccdd1..0fdad32fcd54cad9a1498fa0b2b06a44c51bb9c7 100644 (file)
 #include <stdlib.h>
 #include <unistd.h>
 
-#include <babeltrace2/trace-ir/event-class-const.h>
-#include <babeltrace2/trace-ir/field-class-const.h>
-#include <babeltrace2/trace-ir/field-path-const.h>
-#include <babeltrace2/logging.h>
-#include <babeltrace2/value.h>
+#include <babeltrace2/babeltrace.h>
 
-#define __BT_FUNC_STATUS_ENABLE
+#define __BT_IN_BABELTRACE_H
 #include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
 
 #include "common/assert.h"
 #include "common/macros.h"
@@ -721,6 +716,4 @@ end:
        return ret;
 }
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE_COMMON_INTERNAL_H */
index 4a74214ab5ad91ad5467114d67092e05c720bc0a..abb71f3580dc6c55f07e1f4f6919d386a052675e 100644 (file)
@@ -22,8 +22,7 @@
  * SOFTWARE.
  */
 
-#include <babeltrace2/version.h>
-#include <babeltrace2/types.h>
+#include <babeltrace2/babeltrace.h>
 #include <stdlib.h>
 
 int bt_version_get_major(void)
index 519507de5837cdfb98b6f972584d3293d86d5f0c..743d6aa7c0c1fc2e7867db3879338bfe71047eee 100644 (file)
@@ -23,7 +23,7 @@
 #define BT_LOG_TAG "LIB/CUR-THREAD"
 #include "lib/logging.h"
 
-#include <babeltrace2/current-thread.h>
+#include <babeltrace2/babeltrace.h>
 #include <stdint.h>
 #include <stdarg.h>
 
index bb2c3ad607960cfb97b15ea0e0c626e02c1a9474..f54b65f342f443517f4bb6d071dd9ede089512b0 100644 (file)
@@ -25,8 +25,7 @@
 
 #include <stdlib.h>
 #include <stdint.h>
-#include <babeltrace2/error-const.h>
-#include <babeltrace2/error-cause-const.h>
+#include <babeltrace2/babeltrace.h>
 
 #include "error.h"
 #include "graph/message/iterator.h"
index e23494d2c3931d31ca0fdcd689dd14f9ba93f652..d2895cbfcbfe8d441e06647a6b70fa614265f375 100644 (file)
@@ -25,8 +25,7 @@
 
 #include <stdarg.h>
 #include <glib.h>
-#include <babeltrace2/error-const.h>
-#include <babeltrace2/error-cause-const.h>
+#include <babeltrace2/babeltrace.h>
 #include "lib/object.h"
 #include "common/macros.h"
 
index ed3dd0ccdc1aa217de35a376a4fdc939959048dc..c1ed154db25c646c10218839527f1726d8ec1ef3 100644 (file)
@@ -23,9 +23,8 @@
  * SOFTWARE.
  */
 
-#define __BT_FUNC_STATUS_ENABLE
+#define __BT_IN_BABELTRACE_H
 #include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
 
 /*
  * Aliases without a `__` prefix for internal code: this is just easier
@@ -44,6 +43,4 @@
 #define BT_FUNC_STATUS_UNSUPPORTED     __BT_FUNC_STATUS_UNSUPPORTED
 #define BT_FUNC_STATUS_CANCELED                __BT_FUNC_STATUS_CANCELED
 
-#include <babeltrace2/undef-func-status.h>
-
 #endif /* BABELTRACE_FUNC_STATUS_INTERNAL_H */
index 16cd09b9eb53636330e92e6dfe2be5ad6827c316..836ee9ad02ac2d5d8f9318f3a4c8de4ae7d62454 100644 (file)
 #include <glib.h>
 #include "common/common.h"
 #include "common/uuid.h"
-#include <babeltrace2/trace-ir/event-const.h>
-#include <babeltrace2/trace-ir/packet-const.h>
-#include <babeltrace2/trace-ir/stream-const.h>
-#include <babeltrace2/current-thread.h>
+#include <babeltrace2/babeltrace.h>
 
 #include "logging.h"
 #include "assert-pre.h"
index f467354313c5bf8e7a43bb01b568ef921b77f43e..0dd106def03665b88f78a3085039b1ed620da2cf 100644 (file)
@@ -21,8 +21,7 @@
  */
 
 #include <stdlib.h>
-#include <babeltrace2/logging.h>
-#include <babeltrace2/version.h>
+#include <babeltrace2/babeltrace.h>
 
 #define BT_LOG_TAG "LIB/LOGGING"
 #include "lib/logging.h"
index 9bc3f482e5ce820d4d325db56bf28f3b88ca97a9..24fc52a1c8b58d3ac5cf5cce00ebe8bdcf51c3db 100644 (file)
@@ -24,8 +24,7 @@
  */
 
 #include "common/assert.h"
-#include <babeltrace2/property.h>
-#include <babeltrace2/types.h>
+#include <babeltrace2/babeltrace.h>
 #include <glib.h>
 #include <stdint.h>
 #include <stdbool.h>
index 3e3eb45e13f1a2341690f444fd34f44d63aa41c6..a52daf9a52f82f376154a9ee34930c866df61365 100644 (file)
@@ -28,7 +28,7 @@
 #include <string.h>
 #include <string.h>
 #include <inttypes.h>
-#include <babeltrace2/util.h>
+#include <babeltrace2/babeltrace.h>
 #include "lib/trace-ir/utils.h"
 
 bt_util_status bt_util_clock_cycles_to_ns_from_origin(uint64_t cycles,
index 4f5d55e017c85b5633284ec77de506efda10a9ee..0fdb060da301d154c9135f21c52db83c8a43889a 100644 (file)
 #include <string.h>
 #include <string.h>
 #include <inttypes.h>
+#include <babeltrace2/babeltrace.h>
+
 #include "compat/compiler.h"
 #include "common/common.h"
-#include <babeltrace2/value-const.h>
-#include <babeltrace2/value.h>
 #include "compat/glib.h"
-#include <babeltrace2/types.h>
 #include "lib/assert-pre.h"
 #include "lib/value.h"
 #include "common/assert.h"
index 9a6355e9cad8f2e1adff16a38a3f02aeb2093c18..26a1d9c0ff97da883c01f04d465088aa08f99279 100644 (file)
  * SOFTWARE.
  */
 
-#include "lib/object.h"
-#include <babeltrace2/value.h>
-#include <babeltrace2/value-const.h>
-#include <babeltrace2/types.h>
 #include <glib.h>
+#include <babeltrace2/babeltrace.h>
+
+#include "lib/object.h"
 #include "common/macros.h"
 
 struct bt_value {
index 236f28f5468359ab139f3e7e4398dc668fd7fb7d..20754c1f1d422b5c3ac67043f9ede4a7e3c23a75 100644 (file)
@@ -13,7 +13,8 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <babeltrace2/logging.h>
+#include <babeltrace2/babeltrace.h>
+
 #include "common/macros.h"
 #include "common/assert.h"
 
index c3402d2413bf2b5608cbd5ac68bafde27d803791..6e55c671e05554e3cfdfeb26a057f9d3c9a1f16e 100644 (file)
@@ -36,9 +36,7 @@
 #endif
 
 #include <stdlib.h>
-#include <babeltrace2/graph/self-component.h>
-#include <babeltrace2/graph/component-const.h>
-#include <babeltrace2/graph/component-class-const.h>
+#include <babeltrace2/babeltrace.h>
 #include "logging/log.h"
 
 #define _BT_COMP_LOG_COMP_PREFIX       "[%s] "
index 81dc58d74ee748827af2ba96057e86d4aad6f504..b393b94742afec3b82572547d3607184461aad2a 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace2/ctf-writer/stream-class.h>
 #include <babeltrace2/ctf-writer/trace.h>
 #include <babeltrace2/ctf/events.h>
-#include <babeltrace2/value.h>
+#include <babeltrace2/babeltrace.h>
 #include <glib.h>
 #include <unistd.h>
 #include "compat/stdlib.h"
This page took 0.071246 seconds and 4 git commands to generate.