diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-06-20 04:32:34 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-06-20 04:32:34 +0000 |
commit | d784baaa3a97929fc9a7fed7fff84ff7b0f5bc17 (patch) | |
tree | 47153f33a68172f62b6daec089e64fc717863d2f /LUFA/Common | |
parent | dab7e06a4a914ebc67dd6a9a28c0987b49703c88 (diff) | |
download | lufa-d784baaa3a97929fc9a7fed7fff84ff7b0f5bc17.tar.gz lufa-d784baaa3a97929fc9a7fed7fff84ff7b0f5bc17.tar.bz2 lufa-d784baaa3a97929fc9a7fed7fff84ff7b0f5bc17.zip |
Fixed compile error when FIXED_CONTROL_ENDPOINT_SIZE compile time option was disabled, and a USE_*_DESCRIPTORS compile time option was not enabled on the AVR8s.
Add C++ compatibility to some header files currently missing extern "C" linkage.
Diffstat (limited to 'LUFA/Common')
-rw-r--r-- | LUFA/Common/Common.h | 10 | ||||
-rw-r--r-- | LUFA/Common/Endianness.h | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index 5635a4ea9..02fc98fdc 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -75,6 +75,11 @@ #include "Attributes.h" #include "BoardTypes.h" + /* Enable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + extern "C" { + #endif + /* Architecture specific utility includes: */ #if defined(__DOXYGEN__) /** Type define for an unsigned integer the same width as the selected architecture's machine register. @@ -394,6 +399,11 @@ GCC_MEMORY_BARRIER(); } + /* Disable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + } + #endif + #endif /** @} */ diff --git a/LUFA/Common/Endianness.h b/LUFA/Common/Endianness.h index 115d054f2..58f8012c1 100644 --- a/LUFA/Common/Endianness.h +++ b/LUFA/Common/Endianness.h @@ -56,6 +56,11 @@ #ifndef __LUFA_ENDIANNESS_H__
#define __LUFA_ENDIANNESS_H__
+ /* Enable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ extern "C" {
+ #endif
+
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_COMMON_H)
#error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.
@@ -461,6 +466,11 @@ }
}
+ /* Disable C linkage for C++ Compilers: */
+ #if defined(__cplusplus)
+ }
+ #endif
+
#endif
/** @} */
|