Fix a number of header files with mismatched 'extern C {' and '}'

This commit is contained in:
Gregory Nutt
2016-11-05 07:25:05 -06:00
parent 8bd8ab1a45
commit b0dffdc2ca
13 changed files with 61 additions and 27 deletions
+5
View File
@@ -126,6 +126,11 @@ int kl_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif #endif
#endif #endif
#if defined(__cplusplus)
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* CONFIG_KL_SPI0 || CONFIG_KL_SPI1 */ #endif /* CONFIG_KL_SPI0 || CONFIG_KL_SPI1 */
#endif /* __ARCH_ARM_SRC_KL_KL_SPI_H */ #endif /* __ARCH_ARM_SRC_KL_KL_SPI_H */
@@ -653,15 +653,5 @@ struct eth_rxdesc_s
* Public Functions * Public Functions
****************************************************************************************************/ ****************************************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_ARM_SRC_LPC43XX_CHIP_LPC43_ETHERNET_H */ #endif /* __ARCH_ARM_SRC_LPC43XX_CHIP_LPC43_ETHERNET_H */
+2 -1
View File
@@ -55,7 +55,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
+5
View File
@@ -224,5 +224,10 @@ void pic32mx_dmadump(DMA_HANDLE handle, const struct pic32mx_dmaregs_s *regs,
#endif #endif
#endif #endif
#if defined(__cplusplus)
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_MIPS_SRC_PIC32MZ_PIC32MZ_DMA_H */ #endif /* __ARCH_MIPS_SRC_PIC32MZ_PIC32MZ_DMA_H */
+10 -6
View File
@@ -104,13 +104,17 @@
* Public Variables * Public Variables
****************************************************************************/ ****************************************************************************/
extern volatile uint32_t *g_current_regs; #undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
extern uint32_t g_idle_topstack; EXTERN volatile uint32_t *g_current_regs;
EXTERN uint32_t g_idle_topstack;
/****************************************************************************
* Inline Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
+2 -7
View File
@@ -199,13 +199,6 @@ void esp32_gpioirqdisable(int irq);
# define esp32_gpioirqdisable(irq) # define esp32_gpioirqdisable(irq)
#endif #endif
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
int digitalRead(uint8_t pin); int digitalRead(uint8_t pin);
void attachInterrupt(uint8_t pin, void (*)(void), int mode); void attachInterrupt(uint8_t pin, void (*)(void), int mode);
@@ -214,5 +207,7 @@ void detachInterrupt(uint8_t pin);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#undef EXTERN
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_GPIO_H */ #endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_GPIO_H */
+7 -1
View File
@@ -371,7 +371,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -406,5 +407,10 @@ void stm32_boardinitialize(void);
void fire_lcdclear(uint16_t color); void fire_lcdclear(uint16_t color);
#endif #endif
#if defined(__cplusplus)
}
#endif
#undef EXTERN
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_FIRE_STM32V2_INCLUDE_BOARD_H */ #endif /* __CONFIGS_FIRE_STM32V2_INCLUDE_BOARD_H */
+9
View File
@@ -51,6 +51,15 @@
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/**************************************************************************** /****************************************************************************
* Name: usbhost_composite * Name: usbhost_composite
* *
+5
View File
@@ -277,5 +277,10 @@ int aio_queue(FAR struct aio_container_s *aioc, worker_t worker);
int aio_signal(pid_t pid, FAR struct aiocb *aiocbp); int aio_signal(pid_t pid, FAR struct aiocb *aiocbp);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* CONFIG_FS_AIO */ #endif /* CONFIG_FS_AIO */
#endif /* __FS_AIO_AIO_H */ #endif /* __FS_AIO_AIO_H */
+1 -2
View File
@@ -2294,9 +2294,8 @@ void arch_sporadic_resume(FAR struct tcb_s *tcb);
#endif #endif
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #if defined(__cplusplus)
} }
#endif #endif
#endif /* __INCLUDE_NUTTX_ARCH_H */ #endif /* __INCLUDE_NUTTX_ARCH_H */
+5
View File
@@ -90,4 +90,9 @@ void exec_getsymtab(FAR const struct symtab_s **symtab, FAR int *nsymbols);
void exec_setsymtab(FAR const struct symtab_s *symtab, int nsymbols); void exec_setsymtab(FAR const struct symtab_s *symtab, int nsymbols);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __INCLUDE_NUTTX_BINFMT_SYMTAB_H */ #endif /* __INCLUDE_NUTTX_BINFMT_SYMTAB_H */
+5
View File
@@ -69,5 +69,10 @@ extern "C"
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* CONFIG_FS_AIO */ #endif /* CONFIG_FS_AIO */
#endif /* __LIBC_AIO_AIO_H */ #endif /* __LIBC_AIO_AIO_H */
+5
View File
@@ -68,5 +68,10 @@ extern "C"
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_NET_LOOPBACK */ #endif /* CONFIG_NET_LOOPBACK */
#endif /* __NET_LOOPBACK_LOOBACK_H */ #endif /* __NET_LOOPBACK_LOOBACK_H */