- HandlerMinelayerData: BUILD_RTI Guards für RTI-Abhängigkeiten - svcTabCommon: Export-Header-Fix via Fallback-Target - TrainingAreaBase: Stub-Header für BUILD_RTI=OFF - ddsfts: Include-Pfad und Dependency-Fixes - BUILD_RTI=OFF Compilation vollständig unterstützt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M0JNZA586SACX1PRZ2DJAE5S
108 lines
3.3 KiB
C
108 lines
3.3 KiB
C
/*
|
|
* (c) Copyright, Real-Time Innovations, 2005-2016.
|
|
*
|
|
* All rights reserved.
|
|
* No duplications, whole or partial, manual or electronic, may be made
|
|
* without express written permission. Any such copies, or
|
|
* revisions thereof, must display this notice unaltered.
|
|
* This code contains trade secrets of Real-Time Innovations, Inc.
|
|
*/
|
|
|
|
#ifndef log_makeheader_h
|
|
#define log_makeheader_h
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#if defined(RTI_WIN32) || defined(_WIN32)
|
|
#pragma warning(disable : 4068)
|
|
#endif
|
|
|
|
#define Public
|
|
#define Package
|
|
#define Peer
|
|
#ifndef RTI_PRIVATE
|
|
#define RTI_PRIVATE static
|
|
#endif
|
|
|
|
/*
|
|
* Use this macro at the end of static variable declarations to discard
|
|
* unused variable warnings. Only supported for gcc >= 4.7 and clang.
|
|
* This macro does not replace RTIOsapiUtility_unusedParameter and it must
|
|
* be used ONLY for static variables.
|
|
*/
|
|
#if (defined(__GNUC__) \
|
|
&& ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))) \
|
|
|| defined(__clang__)
|
|
#define RTI_MAYBE_UNUSED __attribute__((unused))
|
|
#else
|
|
#define RTI_MAYBE_UNUSED
|
|
#endif
|
|
|
|
/*
|
|
* If ASan is enabled, define an attribute to turn off instrumentation in a
|
|
* particular function.
|
|
*
|
|
* The RTI_NO_SANITIZE_ADDRESS suppression will not work if a signal is called
|
|
* by 'raise', in this case RTI_ADDRESS_SANITIZER_IS_ENABLED should be used in
|
|
* a preprocessor directive to skip the problematic part of the code, instead
|
|
* of using RTI_NO_SANITIZE_ADDRESS.
|
|
*
|
|
* The RTI_NO_SANITIZE_UNDEFINED suppression disables analysis of all UBSan
|
|
* options. The no_sanitize("aligned") syntax is not available in gcc.
|
|
*/
|
|
#if defined(RTI_ADDRESS_SANITIZER_IS_ENABLED)
|
|
#if !defined(RTI_WIN32)
|
|
#define RTI_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
|
#ifdef __clang__
|
|
#define RTI_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
|
|
#else
|
|
#define RTI_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined))
|
|
#endif
|
|
#else
|
|
#define RTI_NO_SANITIZE_ADDRESS __declspec(no_sanitize_address)
|
|
/* UndefinedBehaviorSanitizer not defined on windows */
|
|
#define RTI_NO_SANITIZE_UNDEFINED
|
|
#endif
|
|
#else
|
|
#define RTI_NO_SANITIZE_ADDRESS
|
|
#define RTI_NO_SANITIZE_UNDEFINED
|
|
#endif
|
|
|
|
/*
|
|
* Use this macro at the beginning of variable declarations to force the
|
|
* memory to be aligned to a certain number of bytes.
|
|
*/
|
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
|
/* alignas is supported since C11 (__STDC_VERSION >= 201112L) */
|
|
#include <stdalign.h>
|
|
#define RTI_ALIGN_AS(bytes__) alignas(bytes__)
|
|
#elif defined(__clang__) \
|
|
|| (defined(__GNUC__) \
|
|
&& ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))))
|
|
#define RTI_ALIGN_AS(bytes__) __attribute__((aligned(bytes__)))
|
|
#elif defined(_MSC_VER) && _MSC_VER > 1900
|
|
#define RTI_ALIGN_AS(bytes__) __declspec(align(bytes__))
|
|
#else
|
|
#define RTI_ALIGN_AS(bytes__)
|
|
#endif
|
|
|
|
/*
|
|
* Use this macro at the end of a declaration to make the compiler to check
|
|
* format string parameters of the function.
|
|
*/
|
|
#ifdef RTI_LINUX
|
|
#define RTI_CHECK_FORMAT_STRING_PARAMETERS(mirrorFunc__, format__, args__) \
|
|
__attribute__((format(mirrorFunc__, format__, args__)))
|
|
#else
|
|
#define RTI_CHECK_FORMAT_STRING_PARAMETERS(mirrorFunc__, format__, args__)
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* log_makeheader_h */
|