diff --git a/include/nuttx/can.h b/include/nuttx/can.h index a191ac436b..b10dedaeaa 100644 --- a/include/nuttx/can.h +++ b/include/nuttx/can.h @@ -313,7 +313,8 @@ struct canioctl_rtr_s #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -326,7 +327,7 @@ extern "C" { * ************************************************************************************/ -EXTERN int can_register(FAR const char *path, FAR struct can_dev_s *dev); +int can_register(FAR const char *path, FAR struct can_dev_s *dev); /************************************************************************************ * Name: can_receive @@ -344,8 +345,8 @@ EXTERN int can_register(FAR const char *path, FAR struct can_dev_s *dev); * ************************************************************************************/ -EXTERN int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, - FAR uint8_t *data); +int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, + FAR uint8_t *data); /************************************************************************************ * Name: can_txdone @@ -361,7 +362,7 @@ EXTERN int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, * ************************************************************************************/ -EXTERN int can_txdone(FAR struct can_dev_s *dev); +int can_txdone(FAR struct can_dev_s *dev); #undef EXTERN #if defined(__cplusplus) diff --git a/include/nuttx/i2c.h b/include/nuttx/i2c.h index c22329ad20..cc01ea6b60 100644 --- a/include/nuttx/i2c.h +++ b/include/nuttx/i2c.h @@ -295,7 +295,8 @@ struct i2c_dev_s #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -317,7 +318,7 @@ extern "C" { * ****************************************************************************/ -EXTERN FAR struct i2c_dev_s *up_i2cinitialize(int port); +FAR struct i2c_dev_s *up_i2cinitialize(int port); /**************************************************************************** * Name: up_i2cuninitialize @@ -334,7 +335,7 @@ EXTERN FAR struct i2c_dev_s *up_i2cinitialize(int port); * ****************************************************************************/ -EXTERN int up_i2cuninitialize(FAR struct i2c_dev_s *dev); +int up_i2cuninitialize(FAR struct i2c_dev_s *dev); /************************************************************************************ * Name: up_i2creset @@ -345,7 +346,7 @@ EXTERN int up_i2cuninitialize(FAR struct i2c_dev_s *dev); ************************************************************************************/ #ifdef CONFIG_I2C_RESET -EXTERN int up_i2creset(FAR struct i2c_dev_s *dev); +int up_i2creset(FAR struct i2c_dev_s *dev); #endif #undef EXTERN diff --git a/include/nuttx/mmcsd.h b/include/nuttx/mmcsd.h index 230728c096..29f256d82d 100644 --- a/include/nuttx/mmcsd.h +++ b/include/nuttx/mmcsd.h @@ -57,7 +57,8 @@ #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -77,7 +78,7 @@ extern "C" { ****************************************************************************/ struct sdio_dev_s; /* See nuttx/sdio.h */ -EXTERN int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev); +int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev); /**************************************************************************** * Name: mmcsd_spislotinitialize @@ -97,7 +98,7 @@ EXTERN int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev); ****************************************************************************/ struct spi_dev_s; /* See nuttx/spi/spi.h */ -EXTERN int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi); +int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi); #undef EXTERN #if defined(__cplusplus) diff --git a/include/nuttx/net/arp.h b/include/nuttx/net/arp.h index ead413c64d..502d89b0e6 100644 --- a/include/nuttx/net/arp.h +++ b/include/nuttx/net/arp.h @@ -57,7 +57,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/include/nuttx/net/cs89x0.h b/include/nuttx/net/cs89x0.h index 71a628c571..493a552a18 100644 --- a/include/nuttx/net/cs89x0.h +++ b/include/nuttx/net/cs89x0.h @@ -126,7 +126,8 @@ struct cs89x0_driver_s #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -159,7 +160,7 @@ extern "C" { /* Initialize the CS89x0 chip and driver */ -EXTERN int cs89x0_initialize(FAR const cs89x0_driver_s *cs89x0, int devno); +int cs89x0_initialize(FAR const cs89x0_driver_s *cs89x0, int devno); #undef EXTERN #ifdef __cplusplus diff --git a/include/nuttx/net/enc28j60.h b/include/nuttx/net/enc28j60.h index e7612e2014..aeb8e51662 100644 --- a/include/nuttx/net/enc28j60.h +++ b/include/nuttx/net/enc28j60.h @@ -116,7 +116,8 @@ struct enc_lower_s #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -147,9 +148,8 @@ extern "C" { ****************************************************************************/ struct spi_dev_s; /* see nuttx/spi/spi.h */ -EXTERN int enc_initialize(FAR struct spi_dev_s *spi, - FAR const struct enc_lower_s *lower, - unsigned int devno); +int enc_initialize(FAR struct spi_dev_s *spi, + FAR const struct enc_lower_s *lower, unsigned int devno); /**************************************************************************** * Function: enc_stats @@ -171,7 +171,7 @@ EXTERN int enc_initialize(FAR struct spi_dev_s *spi, ****************************************************************************/ #ifdef CONFIG_ENC28J60_STATS -EXTERN int enc_stats(unsigned int devno, struct enc_stats_s *stats); +int enc_stats(unsigned int devno, struct enc_stats_s *stats); #endif #undef EXTERN diff --git a/include/nuttx/net/ethernet.h b/include/nuttx/net/ethernet.h index 2fc93341b1..dbf8b7e8e7 100644 --- a/include/nuttx/net/ethernet.h +++ b/include/nuttx/net/ethernet.h @@ -52,7 +52,7 @@ #ifdef CONFIG_NET_ETHERNET /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Recognized values of the type bytes in the Ethernet header */ diff --git a/include/nuttx/net/gmii.h b/include/nuttx/net/gmii.h index c8b924d841..6bf6e768bc 100644 --- a/include/nuttx/net/gmii.h +++ b/include/nuttx/net/gmii.h @@ -44,7 +44,7 @@ #include /********************************************************************************************* - * Pre-Processor Definitions + * Pre-processor Definitions *********************************************************************************************/ /* MII register offsets **********************************************************************/ diff --git a/include/nuttx/net/mii.h b/include/nuttx/net/mii.h index 1d9ad1f9ea..7dfeb7f240 100644 --- a/include/nuttx/net/mii.h +++ b/include/nuttx/net/mii.h @@ -43,7 +43,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* MII register offsets *****************************************************/ diff --git a/include/nuttx/pwm.h b/include/nuttx/pwm.h index bda36d7198..8abb51e713 100644 --- a/include/nuttx/pwm.h +++ b/include/nuttx/pwm.h @@ -217,7 +217,8 @@ struct pwm_lowerhalf_s #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -250,7 +251,7 @@ extern "C" { * ****************************************************************************/ -EXTERN int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev); +int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev); /**************************************************************************** * Name: pwm_expired @@ -290,7 +291,7 @@ EXTERN int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev); ****************************************************************************/ #ifdef CONFIG_PWM_PULSECOUNT -EXTERN void pwm_expired(FAR void *handle); +void pwm_expired(FAR void *handle); #endif /**************************************************************************** diff --git a/include/nuttx/regex.h b/include/nuttx/regex.h index 2d1e270ae1..e26eed9140 100644 --- a/include/nuttx/regex.h +++ b/include/nuttx/regex.h @@ -54,7 +54,8 @@ #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -72,7 +73,7 @@ extern "C" { * ****************************************************************************/ -EXTERN int match(const char *pattern, const char *string); +int match(const char *pattern, const char *string); #undef EXTERN #ifdef __cplusplus diff --git a/include/nuttx/rwbuffer.h b/include/nuttx/rwbuffer.h index 3997a5c7c8..7a97ff65c6 100644 --- a/include/nuttx/rwbuffer.h +++ b/include/nuttx/rwbuffer.h @@ -160,8 +160,8 @@ struct rwbuffer_s #undef EXTERN #if defined(__cplusplus) -#define EXTERN EXTERN "C" -EXTERN "C" +#define EXTERN extern "C" +extern "C" { #else #define EXTERN extern diff --git a/include/sys/custom_file.h b/include/sys/custom_file.h index 06f6772262..e05b5543d3 100644 --- a/include/sys/custom_file.h +++ b/include/sys/custom_file.h @@ -43,7 +43,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/include/sys/ioctl.h b/include/sys/ioctl.h index 01987d58fa..985ca1357b 100644 --- a/include/sys/ioctl.h +++ b/include/sys/ioctl.h @@ -52,7 +52,7 @@ #endif /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ #undef EXTERN diff --git a/include/sys/ipc.h b/include/sys/ipc.h index c2e039cc70..1b2290716a 100644 --- a/include/sys/ipc.h +++ b/include/sys/ipc.h @@ -45,7 +45,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Mode bits: The lower order 9-bit bits are the standard mode bits */ diff --git a/include/sys/mman.h b/include/sys/mman.h index 7acf90a0e1..22c883b87f 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -44,7 +44,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Protections are chosen from these bits, OR'd together. NuttX does not diff --git a/include/sys/mount.h b/include/sys/mount.h index f8c32df954..7acc2f03fc 100644 --- a/include/sys/mount.h +++ b/include/sys/mount.h @@ -41,7 +41,7 @@ ****************************************************************************/ /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Mount flags */ diff --git a/include/sys/prctl.h b/include/sys/prctl.h index ed85e441eb..7a62f463c2 100644 --- a/include/sys/prctl.h +++ b/include/sys/prctl.h @@ -41,7 +41,7 @@ ****************************************************************************/ /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Supported prctl() commands. diff --git a/include/sys/select.h b/include/sys/select.h index 6ce8ff8615..7617b6a53d 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -48,7 +48,7 @@ #if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Get the total number of descriptors that we will have to support */ diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h index 58eacd5de2..a4e8821652 100644 --- a/include/sys/sendfile.h +++ b/include/sys/sendfile.h @@ -45,7 +45,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ diff --git a/include/sys/shm.h b/include/sys/shm.h index 73ecbca988..99752b3a05 100644 --- a/include/sys/shm.h +++ b/include/sys/shm.h @@ -47,7 +47,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Definitions required by POSIX */ diff --git a/include/sys/socket.h b/include/sys/socket.h index 5830490ae6..4c7b79ee79 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -43,7 +43,7 @@ #include /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /* The socket()domain parameter specifies a communication domain; this selects diff --git a/include/sys/sockio.h b/include/sys/sockio.h index eec28265f4..e9422ceeb9 100644 --- a/include/sys/sockio.h +++ b/include/sys/sockio.h @@ -49,7 +49,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ #define IMSFNAMSIZ 8 diff --git a/include/sys/stat.h b/include/sys/stat.h index 4fe9f5c0bb..ece119809b 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -44,7 +44,7 @@ #include /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /* mode_t bit settings (most of these do not apply to Nuttx). This assumes diff --git a/include/sys/statfs.h b/include/sys/statfs.h index b56756a720..0be3c17abc 100644 --- a/include/sys/statfs.h +++ b/include/sys/statfs.h @@ -46,7 +46,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* struct statfs file system types. */ @@ -126,7 +126,8 @@ struct statfs #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -136,8 +137,8 @@ extern "C" { * form of the struct statfs. */ -EXTERN int statfs(const char *path, struct statfs *buf); -EXTERN int fstatfs(int fd, struct statfs *buf); +int statfs(const char *path, struct statfs *buf); +int fstatfs(int fd, struct statfs *buf); #undef EXTERN #if defined(__cplusplus) diff --git a/include/sys/time.h b/include/sys/time.h index 972cfaca86..20ff459e1b 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -45,7 +45,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/include/sys/un.h b/include/sys/un.h index eb431780c9..cad86f628b 100644 --- a/include/sys/un.h +++ b/include/sys/un.h @@ -47,7 +47,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* The size of sun_path is not specified. Different implementations us diff --git a/include/sys/vfs.h b/include/sys/vfs.h index 8433893c35..c8814f7097 100644 --- a/include/sys/vfs.h +++ b/include/sys/vfs.h @@ -47,7 +47,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** diff --git a/include/sys/wait.h b/include/sys/wait.h index 18dc0c975b..b46e302879 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -46,7 +46,7 @@ #ifdef CONFIG_SCHED_WAITPID /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* The following are provided for analysis of returned status values. @@ -97,14 +97,15 @@ typedef enum idtype_e idtype_t; #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif -EXTERN pid_t wait(FAR int *stat_loc); -EXTERN int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options); -EXTERN pid_t waitpid(pid_t pid, FAR int *stat_loc, int options); +pid_t wait(FAR int *stat_loc); +int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options); +pid_t waitpid(pid_t pid, FAR int *stat_loc, int options); #undef EXTERN #if defined(__cplusplus) diff --git a/include/termios.h b/include/termios.h index 575367cf23..14cb8f656d 100644 --- a/include/termios.h +++ b/include/termios.h @@ -45,7 +45,7 @@ #include /**************************************************************************** - * Pre-Processor Definitions + * Pre-processor Definitions ****************************************************************************/ /* Terminal input modes (c_iflag in the termios structure) */