GIT #2899: Fix F' C header files (.h) which are not C++ compliant. (#2936)

This commit is contained in:
bdshenker 2024-10-10 09:14:40 -07:00 committed by GitHub
parent 62bdc64ec2
commit dc6a29c525
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 42 additions and 0 deletions

View File

@ -13,6 +13,10 @@
#ifndef FW_BASIC_TYPES_H
#define FW_BASIC_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
// Compiler checks
#if defined(__GNUC__) || defined(__llvm__) || defined(PLATFORM_OVERRIDE_GCC_CLANG_CHECK)
#else
@ -79,4 +83,8 @@ typedef PlatformPointerCastType POINTER_CAST;
#define PRIVATE private //!< overridable private for unit testing
#endif
#ifdef __cplusplus
}
#endif
#endif // FW_BASIC_TYPES_H

View File

@ -10,6 +10,10 @@
#include <FpConfig.h>
#ifdef __cplusplus
extern "C" {
#endif
#if FW_ASSERT_LEVEL == FW_NO_ASSERT
#define FW_CASSERT(...)
@ -28,4 +32,9 @@ I32 CAssert0(FILE_NAME_ARG file, U32 lineNo); //!< C asse
I32 CAssert1(FILE_NAME_ARG file, U32 lineNo, NATIVE_INT_TYPE arg1); //!< C assert function 1
#endif // ASSERT is defined
#ifdef __cplusplus
}
#endif
#endif /* FWCASSERT_HPP_ */

View File

@ -50,6 +50,9 @@
#ifndef UTILS_HASH_LIB_CRC_HPP
#define UTILS_HASH_LIB_CRC_HPP
#ifdef __cplusplus
extern "C" {
#endif
#define CRC_VERSION "1.16"
@ -67,4 +70,8 @@ unsigned short update_crc_dnp( unsigned short crc, char c
unsigned short update_crc_kermit( unsigned short crc, char c );
unsigned short update_crc_sick( unsigned short crc, char c, char prev_byte );
#ifdef __cplusplus
}
#endif
#endif // UTILS_HASH_LIB_CRC_HPP

View File

@ -26,6 +26,10 @@
#include <inttypes.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
// Define what types and checks are supported by this platform
#define FW_HAS_64_BIT 1 //!< Architecture supports 64 bit integers
#define FW_HAS_32_BIT 1 //!< Architecture supports 32 bit integers
@ -86,5 +90,10 @@ typedef uint8_t PlatformPointerCastType;
#else
#error "Expected __SIZEOF_POINTER__ to be one of 8, 4, 2, or 1"
#endif
#endif // PLATFORM_POINTER_CAST_TYPE_DEFINED
#ifdef __cplusplus
}
#endif
#endif // PLATFORM_TYPES_H_

View File

@ -13,6 +13,10 @@
#include <Fw/Types/BasicTypes.h>
#ifdef __cplusplus
extern "C" {
#endif
// ----------------------------------------------------------------------
// Type aliases
// ----------------------------------------------------------------------
@ -439,4 +443,9 @@ typedef FwIndexType FwQueueSizeType;
// DO NOT TOUCH. These types are specified for backwards naming compatibility.
typedef FwSizeStoreType FwBuffSizeType;
#define PRI_FwBuffSizeType PRI_FwSizeStoreType
#ifdef __cplusplus
}
#endif
#endif