This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit fbb41c7e33b5445067a6e5659c0efd99a3abde56
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Oct 28 16:28:16 2026 +0100

    apps: Remove the EXTERN definitions that no declaration uses.
    
    Most headers of apps define EXTERN (extern "C" for C++, extern for C)
    for the declarations of their global data, and undefine it at their
    end.  78 of them have no such declaration: the definition is never
    used.  Remove it there.  The extern "C" block for C++ stays.
    
    The #undef EXTERN at the end of a header also removes a definition of
    EXTERN that a program made for its own use.  nuttx stopped defining
    EXTERN in its headers; the coding standard asks for plain extern.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 examples/dhcpd/dhcpd_daemon.h                 | 4 ----
 examples/ft80x/ft80x.h                        | 4 ----
 examples/mdnsd/mdnsd_daemon.h                 | 4 ----
 examples/smf/hsm_psicc2_thread.h              | 4 ----
 examples/webpanel/ws_terminal.h               | 4 ----
 fsutils/mkfatfs/mkfatfs.h                     | 5 -----
 graphics/ft80x/ft80x.h                        | 4 ----
 graphics/input/generator/input_gen_internal.h | 5 -----
 graphics/input/monkey/monkey.h                | 4 ----
 graphics/input/monkey/monkey_dev.h            | 4 ----
 graphics/input/monkey/monkey_event.h          | 4 ----
 graphics/input/monkey/monkey_log.h            | 4 ----
 graphics/input/monkey/monkey_recorder.h       | 4 ----
 graphics/input/monkey/monkey_utils.h          | 4 ----
 graphics/tiff/tiff_internal.h                 | 5 -----
 include/builtin/builtin.h                     | 5 -----
 include/canutils/canlib.h                     | 5 -----
 include/fsutils/inifile.h                     | 4 ----
 include/fsutils/ipcfg.h                       | 4 ----
 include/fsutils/mkfatfs.h                     | 5 -----
 include/fsutils/mksmartfs.h                   | 5 -----
 include/graphics/ft80x.h                      | 4 ----
 include/graphics/input_gen.h                  | 4 ----
 include/graphics/panel.h                      | 4 ----
 include/graphics/tiff.h                       | 4 ----
 include/logging/nxscope/nxscope.h             | 4 ----
 include/logging/nxscope/nxscope_chan.h        | 4 ----
 include/logging/nxscope/nxscope_intf.h        | 4 ----
 include/logging/nxscope/nxscope_proto.h       | 4 ----
 include/lte/lapi.h                            | 4 ----
 include/lte/lte_api.h                         | 4 ----
 include/lte/lte_fwupdate.h                    | 4 ----
 include/lte/lte_log.h                         | 4 ----
 include/lte/lte_lwm2m.h                       | 4 ----
 include/netutils/chat.h                       | 5 -----
 include/netutils/cmux.h                       | 5 -----
 include/netutils/dhcp6c.h                     | 4 ----
 include/netutils/dhcpc.h                      | 4 ----
 include/netutils/dhcpd.h                      | 4 ----
 include/netutils/ftpc.h                       | 4 ----
 include/netutils/ftpd.h                       | 4 ----
 include/netutils/icmp_ping.h                  | 5 -----
 include/netutils/icmpv6_ping.h                | 5 -----
 include/netutils/ipmsfilter.h                 | 5 -----
 include/netutils/mdnsd.h                      | 4 ----
 include/netutils/netinit.h                    | 4 ----
 include/netutils/netlib.h                     | 5 -----
 include/netutils/ntpclient.h                  | 4 ----
 include/netutils/pppd.h                       | 4 ----
 include/netutils/ptpd.h                       | 4 ----
 include/netutils/smtp.h                       | 4 ----
 include/netutils/telnetd.h                    | 4 ----
 include/netutils/tftp.h                       | 4 ----
 include/netutils/webclient.h                  | 4 ----
 include/netutils/wifibridge.h                 | 4 ----
 include/nshlib/nshlib.h                       | 4 ----
 include/platform/configdata.h                 | 4 ----
 include/system/cle.h                          | 4 ----
 include/system/nxcamera.h                     | 4 ----
 include/system/nxlooper.h                     | 4 ----
 include/system/nxplayer.h                     | 4 ----
 include/system/nxrecorder.h                   | 4 ----
 include/system/readline.h                     | 4 ----
 include/system/smf.h                          | 5 -----
 include/system/termcurses.h                   | 4 ----
 include/system/zmodem.h                       | 5 -----
 include/wireless/iwpan.h                      | 4 ----
 interpreters/bas/bas_vt100.h                  | 4 ----
 netutils/iperf/iperf.h                        | 5 -----
 netutils/pppd/ahdlc.h                         | 5 -----
 netutils/pppd/ipcp.h                          | 5 -----
 netutils/pppd/lcp.h                           | 5 -----
 netutils/pppd/pap.h                           | 5 -----
 netutils/pppd/ppp.h                           | 5 -----
 netutils/pppd/ppp_arch.h                      | 5 -----
 system/trace/trace.h                          | 4 ----
 system/zmodem/host/nuttx/crc16.h              | 4 ----
 system/zmodem/host/nuttx/crc32.h              | 4 ----
 78 files changed, 334 deletions(-)

diff --git a/examples/dhcpd/dhcpd_daemon.h b/examples/dhcpd/dhcpd_daemon.h
index bdf929146..8dc06a37f 100644
--- a/examples/dhcpd/dhcpd_daemon.h
+++ b/examples/dhcpd/dhcpd_daemon.h
@@ -40,16 +40,12 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int dhcpd_daemon(int argc, FAR char *argv[], bool daemon);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/examples/ft80x/ft80x.h b/examples/ft80x/ft80x.h
index 70492f24e..1796d3008 100644
--- a/examples/ft80x/ft80x.h
+++ b/examples/ft80x/ft80x.h
@@ -104,11 +104,8 @@ extern const struct ft80x_bitmaphdr_s g_lenaface_bmhdr;
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /* GPU Primitive display examples */
@@ -145,7 +142,6 @@ int ft80x_coproc_screensaver(int fd, FAR struct 
ft80x_dlbuffer_s *buffer);
 #endif
 int ft80x_coproc_logo(int fd, FAR struct ft80x_dlbuffer_s *buffer);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/examples/mdnsd/mdnsd_daemon.h b/examples/mdnsd/mdnsd_daemon.h
index 4fda59587..7adcdddc8 100644
--- a/examples/mdnsd/mdnsd_daemon.h
+++ b/examples/mdnsd/mdnsd_daemon.h
@@ -40,16 +40,12 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int mdnsd_daemon(int argc, FAR char *argv[], bool start);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/examples/smf/hsm_psicc2_thread.h b/examples/smf/hsm_psicc2_thread.h
index 385a29703..75e53d9a1 100644
--- a/examples/smf/hsm_psicc2_thread.h
+++ b/examples/smf/hsm_psicc2_thread.h
@@ -40,11 +40,8 @@
 #include <stdint.h>
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -81,7 +78,6 @@ enum demo_events
 int hsm_psicc2_thread_start(void);
 int hsm_psicc2_post_event(uint32_t event_id);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/examples/webpanel/ws_terminal.h b/examples/webpanel/ws_terminal.h
index 91cc637d9..ce6de01e0 100644
--- a/examples/webpanel/ws_terminal.h
+++ b/examples/webpanel/ws_terminal.h
@@ -28,11 +28,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -55,7 +52,6 @@ extern "C"
 
 int ws_terminal_start(void);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/fsutils/mkfatfs/mkfatfs.h b/fsutils/mkfatfs/mkfatfs.h
index e12e162cf..a377b5b3c 100644
--- a/fsutils/mkfatfs/mkfatfs.h
+++ b/fsutils/mkfatfs/mkfatfs.h
@@ -82,13 +82,9 @@ struct fat_var_s
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 struct fat_format_s; /* Forward reference */
@@ -132,7 +128,6 @@ int mkfatfs_configfatfs(FAR struct fat_format_s *fmt,
 int mkfatfs_writefatfs(FAR struct fat_format_s *fmt,
                        FAR struct fat_var_s *var);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/graphics/ft80x/ft80x.h b/graphics/ft80x/ft80x.h
index 64254691c..964a4e42e 100644
--- a/graphics/ft80x/ft80x.h
+++ b/graphics/ft80x/ft80x.h
@@ -82,11 +82,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 struct ft80x_dlbuffer_s;  /* Forward reference3 */
@@ -286,7 +283,6 @@ int ft80x_ramcmd_waitfifoempty(int fd);
 
 int ft80x_dl_swap(int fd);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/input/generator/input_gen_internal.h 
b/graphics/input/generator/input_gen_internal.h
index 8fadec865..1e000e6c7 100644
--- a/graphics/input/generator/input_gen_internal.h
+++ b/graphics/input/generator/input_gen_internal.h
@@ -45,13 +45,9 @@ struct input_gen_dev_s
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -166,7 +162,6 @@ int input_gen_umouse_write(int fd, int16_t wheel);
 int input_gen_grab(FAR struct input_gen_dev_s *dev);
 int input_gen_ungrab(FAR struct input_gen_dev_s *dev);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/graphics/input/monkey/monkey.h b/graphics/input/monkey/monkey.h
index ef3be8d90..ed837477e 100644
--- a/graphics/input/monkey/monkey.h
+++ b/graphics/input/monkey/monkey.h
@@ -35,11 +35,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -92,7 +89,6 @@ void monkey_set_period(FAR struct monkey_s *monkey, uint32_t 
period);
 bool monkey_set_recorder_path(FAR struct monkey_s *monkey,
                               FAR const char *path);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/input/monkey/monkey_dev.h 
b/graphics/input/monkey/monkey_dev.h
index 48a76f36e..dc86a285d 100644
--- a/graphics/input/monkey/monkey_dev.h
+++ b/graphics/input/monkey/monkey_dev.h
@@ -45,11 +45,8 @@ struct monkey_dev_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -91,7 +88,6 @@ enum monkey_dev_type_e monkey_dev_get_type(FAR struct 
monkey_dev_s *dev);
 
 int monkey_dev_get_available(FAR struct monkey_dev_s *devs[], int dev_num);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/input/monkey/monkey_event.h 
b/graphics/input/monkey/monkey_event.h
index f1dc29724..d78e7bc5e 100644
--- a/graphics/input/monkey/monkey_event.h
+++ b/graphics/input/monkey/monkey_event.h
@@ -49,11 +49,8 @@ struct monkey_event_param_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -71,7 +68,6 @@ bool monkey_event_exec(FAR struct monkey_s *monkey,
                        FAR struct monkey_dev_s *dev,
                        FAR const struct monkey_event_param_s *param);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/input/monkey/monkey_log.h 
b/graphics/input/monkey/monkey_log.h
index 30a8c18e0..e74656f13 100644
--- a/graphics/input/monkey/monkey_log.h
+++ b/graphics/input/monkey/monkey_log.h
@@ -55,11 +55,8 @@
   ##__VA_ARGS__)
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -100,7 +97,6 @@ void monkey_log_set_level(enum monkey_log_level_type_e 
level);
 
 enum monkey_log_level_type_e monkey_log_get_level(void);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/input/monkey/monkey_recorder.h 
b/graphics/input/monkey/monkey_recorder.h
index 7dee8ae56..70667bb78 100644
--- a/graphics/input/monkey/monkey_recorder.h
+++ b/graphics/input/monkey/monkey_recorder.h
@@ -60,11 +60,8 @@ enum monkey_recorder_res_e
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -104,7 +101,6 @@ enum monkey_recorder_res_e monkey_recorder_read(
 enum monkey_recorder_res_e monkey_recorder_reset(
                                     FAR struct monkey_recorder_s *recorder);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/input/monkey/monkey_utils.h 
b/graphics/input/monkey/monkey_utils.h
index 3577390e3..9379b5d91 100644
--- a/graphics/input/monkey/monkey_utils.h
+++ b/graphics/input/monkey/monkey_utils.h
@@ -35,11 +35,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -94,7 +91,6 @@ enum monkey_dev_type_e monkey_dev_name2type(FAR const char 
*name);
 
 FAR const char *monkey_event_type2name(enum monkey_event_e event);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/graphics/tiff/tiff_internal.h b/graphics/tiff/tiff_internal.h
index 45e962a4f..d495f26c5 100644
--- a/graphics/tiff/tiff_internal.h
+++ b/graphics/tiff/tiff_internal.h
@@ -72,13 +72,9 @@
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -191,7 +187,6 @@ int tiff_putstring(int fd, FAR const char *string, int len);
 
 ssize_t tiff_wordalign(int fd, size_t size);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/builtin/builtin.h b/include/builtin/builtin.h
index b0e0f4866..d3a5849c8 100644
--- a/include/builtin/builtin.h
+++ b/include/builtin/builtin.h
@@ -46,13 +46,9 @@
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -81,7 +77,6 @@ extern "C"
 int exec_builtin(FAR const char *appname, FAR char * const *argv,
                  FAR const struct nsh_param_s *param);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/canutils/canlib.h b/include/canutils/canlib.h
index 4f280549d..badb94bc4 100644
--- a/include/canutils/canlib.h
+++ b/include/canutils/canlib.h
@@ -39,13 +39,9 @@
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -169,7 +165,6 @@ int canlib_setsilent(int fd, bool silent);
 
 int canlib_getsilent(int fd, FAR bool *silent);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/fsutils/inifile.h b/include/fsutils/inifile.h
index ad9a7ffdf..bf27466aa 100644
--- a/include/fsutils/inifile.h
+++ b/include/fsutils/inifile.h
@@ -44,11 +44,8 @@ typedef FAR void *INIHANDLE;
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -117,7 +114,6 @@ long inifile_read_integer(INIHANDLE handle,
 
 void inifile_free_string(FAR char *value);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/fsutils/ipcfg.h b/include/fsutils/ipcfg.h
index a2aa11531..81c42a7a7 100644
--- a/include/fsutils/ipcfg.h
+++ b/include/fsutils/ipcfg.h
@@ -161,11 +161,8 @@ struct ipv6cfg_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -214,7 +211,6 @@ int ipcfg_read(FAR const char *netdev, FAR void *ipcfg, 
sa_family_t af);
 int ipcfg_write(FAR const char *netdev, FAR const void *ipcfg,
                 sa_family_t af);
 #endif
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/fsutils/mkfatfs.h b/include/fsutils/mkfatfs.h
index f2bc4ff9e..cd13bd0e8 100644
--- a/include/fsutils/mkfatfs.h
+++ b/include/fsutils/mkfatfs.h
@@ -89,13 +89,9 @@ struct fat_format_s
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -129,7 +125,6 @@ extern "C"
 
 int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/fsutils/mksmartfs.h b/include/fsutils/mksmartfs.h
index 38c6dea64..5abd86063 100644
--- a/include/fsutils/mksmartfs.h
+++ b/include/fsutils/mksmartfs.h
@@ -34,13 +34,9 @@
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -102,7 +98,6 @@ int mksmartfs(FAR const char *pathname, uint16_t sectorsize,
 int mksmartfs(FAR const char *pathname, uint16_t sectorsize);
 #endif
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/graphics/ft80x.h b/include/graphics/ft80x.h
index 20da36b44..6d5906099 100644
--- a/include/graphics/ft80x.h
+++ b/include/graphics/ft80x.h
@@ -88,11 +88,8 @@ struct ft80x_touchinfo_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -585,7 +582,6 @@ int ft80x_gpio_write(int fd, uint8_t gpio, bool value);
 
 bool ft80x_gpio_read(int fd, uint8_t gpio);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/graphics/input_gen.h b/include/graphics/input_gen.h
index b69f4d69a..f227ab050 100644
--- a/include/graphics/input_gen.h
+++ b/include/graphics/input_gen.h
@@ -66,11 +66,8 @@ typedef FAR struct input_gen_ctx_s *input_gen_ctx_t;
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -296,7 +293,6 @@ void input_gen_fill_point(FAR struct touch_point_s *point,
 ssize_t input_gen_write_raw(input_gen_ctx_t ctx, input_gen_dev_t device,
                             FAR const void *buf, size_t nbytes);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/graphics/panel.h b/include/graphics/panel.h
index 22a25f212..98af2a563 100644
--- a/include/graphics/panel.h
+++ b/include/graphics/panel.h
@@ -40,9 +40,6 @@
 #if defined(__cplusplus)
 extern "C"
 {
-#  define EXTERN extern "C"
-#else
-#  define EXTERN extern
 #endif
 
 typedef struct panelobs
@@ -84,7 +81,6 @@ int     show_panel(PANEL *pan);
 int     top_panel(PANEL *pan);
 void    update_panels(void);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/graphics/tiff.h b/include/graphics/tiff.h
index 2239ead28..ab0e1e8b3 100644
--- a/include/graphics/tiff.h
+++ b/include/graphics/tiff.h
@@ -352,11 +352,8 @@ struct tiff_info_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -458,7 +455,6 @@ void tiff_put32(FAR uint8_t *dest, uint32_t value);
 uint16_t tiff_get16(FAR uint8_t *dest);
 uint32_t tiff_get32(FAR uint8_t *dest);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/logging/nxscope/nxscope.h 
b/include/logging/nxscope/nxscope.h
index d120ebbaa..f5394f694 100644
--- a/include/logging/nxscope/nxscope.h
+++ b/include/logging/nxscope/nxscope.h
@@ -54,11 +54,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /* Nxscope header ID */
@@ -498,7 +495,6 @@ int nxscope_recv(FAR struct nxscope_s *s);
 
 int nxscope_stream_start(FAR struct nxscope_s *s, bool start);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/logging/nxscope/nxscope_chan.h 
b/include/logging/nxscope/nxscope_chan.h
index 3a2b9849b..53c4f57fc 100644
--- a/include/logging/nxscope/nxscope_chan.h
+++ b/include/logging/nxscope/nxscope_chan.h
@@ -36,11 +36,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /* Nxscope sample type */
@@ -428,7 +425,6 @@ int nxscope_put_ub32(FAR struct nxscope_s *s, uint8_t ch, 
ub32_t val);
 int nxscope_put_b32(FAR struct nxscope_s *s, uint8_t ch, b32_t val);
 int nxscope_put_char(FAR struct nxscope_s *s, uint8_t ch, char val);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/logging/nxscope/nxscope_intf.h 
b/include/logging/nxscope/nxscope_intf.h
index 937619f3a..ad9ebe268 100644
--- a/include/logging/nxscope/nxscope_intf.h
+++ b/include/logging/nxscope/nxscope_intf.h
@@ -38,11 +38,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /* Forward declaration */
@@ -158,7 +155,6 @@ int nxscope_udp_init(FAR struct nxscope_intf_s *intf,
 void nxscope_udp_deinit(FAR struct nxscope_intf_s *intf);
 #endif
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/logging/nxscope/nxscope_proto.h 
b/include/logging/nxscope/nxscope_proto.h
index de748d36f..0b90b8390 100644
--- a/include/logging/nxscope/nxscope_proto.h
+++ b/include/logging/nxscope/nxscope_proto.h
@@ -34,11 +34,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /* Nxscope frame handler */
@@ -112,7 +109,6 @@ int nxscope_proto_ser_init(FAR struct nxscope_proto_s 
*proto, FAR void *cfg);
 void nxscope_proto_ser_deinit(FAR struct nxscope_proto_s *proto);
 #endif
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/lte/lapi.h b/include/lte/lapi.h
index 4159d0e6d..9cf7ebb3a 100644
--- a/include/lte/lapi.h
+++ b/include/lte/lapi.h
@@ -39,11 +39,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -75,7 +72,6 @@ int lapi_evtyield(int timeout_ms);
 int lapi_req(uint32_t cmdid, FAR void *inp, size_t insz, FAR void *outp,
              size_t outsz, FAR void *cb);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/lte/lte_api.h b/include/lte/lte_api.h
index f7c17c5d5..80f7ec00c 100644
--- a/include/lte/lte_api.h
+++ b/include/lte/lte_api.h
@@ -193,11 +193,8 @@
 #include <nuttx/wireless/lte/lte.h>
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -1574,7 +1571,6 @@ int lte_set_context_save_cb(context_save_cb_t callback);
 
 int lte_hibernation_resume(FAR const uint8_t *res_ctx, int len);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/lte/lte_fwupdate.h b/include/lte/lte_fwupdate.h
index 1cb8dba0f..eaf6b8f95 100644
--- a/include/lte/lte_fwupdate.h
+++ b/include/lte/lte_fwupdate.h
@@ -49,11 +49,8 @@
 #include "lte_fw_def.h"
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -149,7 +146,6 @@ int ltefwupdate_execute(void);
 
 int ltefwupdate_result(void);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/lte/lte_log.h b/include/lte/lte_log.h
index 41ce2b950..bbe0d1cab 100644
--- a/include/lte/lte_log.h
+++ b/include/lte/lte_log.h
@@ -44,11 +44,8 @@
 #include <nuttx/wireless/lte/lte.h>
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -181,7 +178,6 @@ int lte_log_lseek(int fd, off_t offset, int whence);
 
 #endif /* CONFIG_LTE_LAPI_LOG_ACCESS */
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/lte/lte_lwm2m.h b/include/lte/lte_lwm2m.h
index b9e1abd06..9961c4f5f 100644
--- a/include/lte/lte_lwm2m.h
+++ b/include/lte/lte_lwm2m.h
@@ -258,11 +258,8 @@ typedef CODE void (*lwm2mstub_operation_cb_t)(int event, 
int srv_id,
 typedef CODE void (*lwm2mstub_fwupstate_cb_t)(int event);
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -319,7 +316,6 @@ int lte_m2m_observeupdate(FAR char *token,
                           FAR struct lwm2mstub_instance_s *inst,
                           FAR char *value, int len);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/chat.h b/include/netutils/chat.h
index fabd3f8cd..722aec55d 100644
--- a/include/netutils/chat.h
+++ b/include/netutils/chat.h
@@ -61,18 +61,13 @@ struct chat_ctl
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int chat(FAR struct chat_ctl *ctl, FAR const char *script);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/cmux.h b/include/netutils/cmux.h
index 8bbf2e1f0..c597260d5 100644
--- a/include/netutils/cmux.h
+++ b/include/netutils/cmux.h
@@ -47,18 +47,13 @@ struct cmux_settings_s
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int cmux_create(struct cmux_settings_s *settings);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/dhcp6c.h b/include/netutils/dhcp6c.h
index 4d184417e..907afc8cf 100644
--- a/include/netutils/dhcp6c.h
+++ b/include/netutils/dhcp6c.h
@@ -57,11 +57,8 @@ typedef void (*dhcp6c_callback_t)(FAR struct dhcp6c_state 
*presult);
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 FAR void *dhcp6c_open(FAR const char *interface);
@@ -70,7 +67,6 @@ int dhcp6c_request_async(FAR void *handle, dhcp6c_callback_t 
callback);
 void dhcp6c_cancel(FAR void *handle);
 void dhcp6c_close(FAR void *handle);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/dhcpc.h b/include/netutils/dhcpc.h
index b17d6f368..cf163ce86 100644
--- a/include/netutils/dhcpc.h
+++ b/include/netutils/dhcpc.h
@@ -85,11 +85,8 @@ typedef void (*dhcpc_callback_t)(FAR struct dhcpc_state 
*presult);
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 FAR void *dhcpc_open(FAR const char *interface,
@@ -100,7 +97,6 @@ int  dhcpc_release(FAR void *handle, FAR struct dhcpc_state 
*presult);
 void dhcpc_cancel(FAR void *handle);
 void dhcpc_close(FAR void *handle);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/dhcpd.h b/include/netutils/dhcpd.h
index b1061b8a4..e4068d70a 100644
--- a/include/netutils/dhcpd.h
+++ b/include/netutils/dhcpd.h
@@ -54,11 +54,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int dhcpd_run(FAR const char *interface);
@@ -69,7 +66,6 @@ int dhcpd_set_routerip(in_addr_t routerip);
 int dhcpd_set_netmask(in_addr_t netmask);
 int dhcpd_set_dnsip(in_addr_t dnsip);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/ftpc.h b/include/netutils/ftpc.h
index 0216b5faf..cf9a3d421 100644
--- a/include/netutils/ftpc.h
+++ b/include/netutils/ftpc.h
@@ -159,11 +159,8 @@ struct ftpc_dirlist_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -214,7 +211,6 @@ int ftp_putfile(SESSION handle, FAR const char *lname,
 
 FAR char *ftpc_response(SESSION handle);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/ftpd.h b/include/netutils/ftpd.h
index 30f18cd32..0e2edf472 100644
--- a/include/netutils/ftpd.h
+++ b/include/netutils/ftpd.h
@@ -102,11 +102,8 @@ typedef FAR void *FTPD_SESSION;
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -199,7 +196,6 @@ int ftpd_session(FTPD_SESSION handle, int timeout);
 
 void ftpd_close(FTPD_SESSION handle);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/icmp_ping.h b/include/netutils/icmp_ping.h
index d9164afc1..e329ce998 100644
--- a/include/netutils/icmp_ping.h
+++ b/include/netutils/icmp_ping.h
@@ -100,18 +100,13 @@ struct ping_result_s
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 void icmp_ping(FAR const struct ping_info_s *info);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/icmpv6_ping.h b/include/netutils/icmpv6_ping.h
index 33db0fc6f..d0d55fd97 100644
--- a/include/netutils/icmpv6_ping.h
+++ b/include/netutils/icmpv6_ping.h
@@ -99,18 +99,13 @@ struct ping6_result_s
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 void icmp6_ping(FAR const struct ping6_info_s *info);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/ipmsfilter.h b/include/netutils/ipmsfilter.h
index edab65fe2..d893f433c 100644
--- a/include/netutils/ipmsfilter.h
+++ b/include/netutils/ipmsfilter.h
@@ -36,13 +36,9 @@
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -70,7 +66,6 @@ int ipmsfilter(FAR const struct in_addr *interface,
                FAR const struct in_addr *multiaddr,
                uint32_t fmode);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/netutils/mdnsd.h b/include/netutils/mdnsd.h
index 1900fb9db..abc1ff881 100644
--- a/include/netutils/mdnsd.h
+++ b/include/netutils/mdnsd.h
@@ -40,17 +40,13 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int mdnsd_start(FAR char *service_name, FAR char *service_port);
 int mdnsd_stop(void);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/netinit.h b/include/netutils/netinit.h
index 320fa1498..f18009a1d 100644
--- a/include/netutils/netinit.h
+++ b/include/netutils/netinit.h
@@ -83,11 +83,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -108,7 +105,6 @@ int netinit_bringup(void);
 int netinit_associate(FAR const char *ifname);
 #endif
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/netlib.h b/include/netutils/netlib.h
index 49a99061e..a4dace4de 100644
--- a/include/netutils/netlib.h
+++ b/include/netutils/netlib.h
@@ -212,13 +212,9 @@ typedef CODE void (*netlib_dhcp_ntp_callback_t)
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -622,7 +618,6 @@ int netlib_check_httpconnectivity(FAR const char *host,
                                   FAR const char *getmsg,
                                   int port, int expect_code);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/ntpclient.h b/include/netutils/ntpclient.h
index 78045f5ee..b4b0d8a40 100644
--- a/include/netutils/ntpclient.h
+++ b/include/netutils/ntpclient.h
@@ -70,11 +70,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -161,7 +158,6 @@ struct ntpc_status_s
 
 int ntpc_status(struct ntpc_status_s *statusp);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/pppd.h b/include/netutils/pppd.h
index 690f10b0b..668c87e04 100644
--- a/include/netutils/pppd.h
+++ b/include/netutils/pppd.h
@@ -74,11 +74,8 @@ struct pppd_settings_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -101,7 +98,6 @@ extern "C"
 
 int pppd(const struct pppd_settings_s *ppp_settings);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/ptpd.h b/include/netutils/ptpd.h
index c86f3d647..7bceb1b79 100644
--- a/include/netutils/ptpd.h
+++ b/include/netutils/ptpd.h
@@ -123,11 +123,8 @@ struct ptpd_status_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -191,7 +188,6 @@ int ptpd_status(int pid, FAR struct ptpd_status_s *status);
 
 int ptpd_stop(int pid);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/smtp.h b/include/netutils/smtp.h
index e278d1a17..2b55d8637 100644
--- a/include/netutils/smtp.h
+++ b/include/netutils/smtp.h
@@ -52,11 +52,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -71,7 +68,6 @@ int   smtp_send(FAR void *handle, FAR const char *to, FAR 
const char *cc,
                 FAR const char *msg, int msglen);
 void  smtp_close(FAR void *handle);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/telnetd.h b/include/netutils/telnetd.h
index f428e937d..a4fef5066 100644
--- a/include/netutils/telnetd.h
+++ b/include/netutils/telnetd.h
@@ -66,11 +66,8 @@ struct telnetd_config_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -92,7 +89,6 @@ extern "C"
 
 int telnetd_daemon(FAR const struct telnetd_config_s *config);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/tftp.h b/include/netutils/tftp.h
index ad0432c45..f138fb6cf 100644
--- a/include/netutils/tftp.h
+++ b/include/netutils/tftp.h
@@ -64,11 +64,8 @@ typedef ssize_t (*tftp_callback_t)(FAR void *ctx, uint32_t 
offset,
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 int tftpget_cb(FAR const char *remote, in_addr_t addr, bool binary,
@@ -80,7 +77,6 @@ int tftpget(FAR const char *remote, FAR const char *local, 
in_addr_t addr,
 int tftpput(FAR const char *local, FAR const char *remote, in_addr_t addr,
             bool binary);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/webclient.h b/include/netutils/webclient.h
index b8089eb11..d2c52cc5a 100644
--- a/include/netutils/webclient.h
+++ b/include/netutils/webclient.h
@@ -509,11 +509,8 @@ struct webclient_conn_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 #ifdef WGET_USE_URLENCODE
@@ -572,7 +569,6 @@ ssize_t webclient_conn_recv(FAR struct webclient_conn_s 
*conn,
 void webclient_conn_close(FAR struct webclient_conn_s *conn);
 void webclient_conn_free(FAR struct webclient_conn_s *conn);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/netutils/wifibridge.h b/include/netutils/wifibridge.h
index d6fa58e6e..59024b978 100644
--- a/include/netutils/wifibridge.h
+++ b/include/netutils/wifibridge.h
@@ -89,11 +89,8 @@ struct wifibridge_status_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -186,7 +183,6 @@ int wifibridge_clear(void);
 
 #endif /* CONFIG_NETUTILS_WIFIBRIDGE_PERSIST */
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/nshlib/nshlib.h b/include/nshlib/nshlib.h
index f2153fed0..8ef1fe783 100644
--- a/include/nshlib/nshlib.h
+++ b/include/nshlib/nshlib.h
@@ -94,11 +94,8 @@ struct nsh_param_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -325,7 +322,6 @@ int nsh_system(int argc, FAR char *argv[]);
 
 int nsh_system_ctty(int argc, FAR char *argv[]);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/platform/configdata.h b/include/platform/configdata.h
index 94df86821..0fffb4453 100644
--- a/include/platform/configdata.h
+++ b/include/platform/configdata.h
@@ -66,14 +66,11 @@ enum config_data_e
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
 #else
 
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -144,7 +141,6 @@ int platform_setconfig(enum config_data_e id, int instance,
 int platform_getconfig(enum config_data_e id, int instance,
                        FAR uint8_t *configdata, size_t datalen);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/system/cle.h b/include/system/cle.h
index c1204864f..930db91f7 100644
--- a/include/system/cle.h
+++ b/include/system/cle.h
@@ -43,11 +43,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -71,7 +68,6 @@ int cle(FAR char *line, FAR const char *prompt, uint16_t 
linelen,
         FAR FILE *instream, FAR FILE *outstream);
 #endif
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/nxcamera.h b/include/system/nxcamera.h
index 6c4707e42..6e102e1ae 100644
--- a/include/system/nxcamera.h
+++ b/include/system/nxcamera.h
@@ -89,11 +89,8 @@ struct video_msg_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -249,7 +246,6 @@ int nxcamera_setfb(FAR struct nxcamera_s *pcam, FAR const 
char *device);
 int nxcamera_setfile(FAR struct nxcamera_s *pcam, FAR const char *pfile,
                      bool isimage);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/nxlooper.h b/include/system/nxlooper.h
index 7218b0f20..154e12ca7 100644
--- a/include/system/nxlooper.h
+++ b/include/system/nxlooper.h
@@ -76,11 +76,8 @@ struct nxlooper_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -278,7 +275,6 @@ int nxlooper_setvolume(FAR struct nxlooper_s *plooper, 
uint16_t volume);
 int nxlooper_systemreset(FAR struct nxlooper_s *plooper);
 #endif
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/nxplayer.h b/include/system/nxplayer.h
index 2d2e0242f..61c26e63d 100644
--- a/include/system/nxplayer.h
+++ b/include/system/nxplayer.h
@@ -101,11 +101,8 @@ typedef int (*nxplayer_func)(FAR struct nxplayer_s 
*pplayer, char *pargs);
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -592,7 +589,6 @@ int nxplayer_fill_mp3(int fd, FAR struct ap_buffer_s *apb);
 
 int nxplayer_fill_common(int fd, FAR struct ap_buffer_s *apb);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/nxrecorder.h b/include/system/nxrecorder.h
index 9b5e75e98..161a4d5fc 100644
--- a/include/system/nxrecorder.h
+++ b/include/system/nxrecorder.h
@@ -76,11 +76,8 @@ typedef int (*nxrecorder_func)(FAR struct nxrecorder_s 
*precorder,
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -276,7 +273,6 @@ int nxrecorder_write_amr(int fd, uint32_t samplerate,
 
 int nxrecorder_write_common(int fd, FAR struct ap_buffer_s *apb);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/readline.h b/include/system/readline.h
index 2deb2a976..70d8b2f4b 100644
--- a/include/system/readline.h
+++ b/include/system/readline.h
@@ -77,11 +77,8 @@ struct extmatch_vtable_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -249,7 +246,6 @@ FAR char *readline(FAR const char *prompt);
 
 #define std_readline(b,s) readline_stream(b,s,stdin,stdout)
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/smf.h b/include/system/smf.h
index edb1bf81b..9a2d00458 100644
--- a/include/system/smf.h
+++ b/include/system/smf.h
@@ -151,13 +151,9 @@ struct smf_ctx
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -259,7 +255,6 @@ smf_get_current_executing_state(const struct smf_ctx *ctx)
 #endif /* CONFIG_SYSTEM_SMF_ANCESTOR_SUPPORT */
 }
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/system/termcurses.h b/include/system/termcurses.h
index 458526102..6482a8e44 100644
--- a/include/system/termcurses.h
+++ b/include/system/termcurses.h
@@ -147,11 +147,8 @@ struct termcurses_colors_s
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -241,7 +238,6 @@ int termcurses_getkeycode(FAR struct termcurses_s *term, 
FAR int *specialkey,
 
 bool termcurses_checkkey(FAR struct termcurses_s *term);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/system/zmodem.h b/include/system/zmodem.h
index 3a7eddea9..717a0817c 100644
--- a/include/system/zmodem.h
+++ b/include/system/zmodem.h
@@ -203,13 +203,9 @@ enum zm_option_e
  * Public Data
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -331,7 +327,6 @@ int zms_send(ZMSHANDLE handle, FAR const char *filename,
 
 int zms_release(ZMSHANDLE handle);
 
-#undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
diff --git a/include/wireless/iwpan.h b/include/wireless/iwpan.h
index 3e0efc350..fcdeca600 100644
--- a/include/wireless/iwpan.h
+++ b/include/wireless/iwpan.h
@@ -40,18 +40,14 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
  * Public Function Prototyppes
  ****************************************************************************/
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/interpreters/bas/bas_vt100.h b/interpreters/bas/bas_vt100.h
index fc7b5d2c5..e3a8e53e2 100644
--- a/interpreters/bas/bas_vt100.h
+++ b/interpreters/bas/bas_vt100.h
@@ -44,11 +44,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -214,7 +211,6 @@ void vt100_foreground_color(int chn, uint8_t color);
 
 void vt100_background_color(int chn, uint8_t color);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/netutils/iperf/iperf.h b/netutils/iperf/iperf.h
index 86739cd5f..f32c16b44 100644
--- a/netutils/iperf/iperf.h
+++ b/netutils/iperf/iperf.h
@@ -33,13 +33,9 @@
 
 #ifndef __ASSEMBLY__
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -97,7 +93,6 @@ int iperf_stop(void);
 #ifdef __cplusplus
 }
 #endif
-#undef EXTERN
 
 #endif /* __ASSEMBLY__ */
 #endif /* __APPS_NETUTILS_IPERF_IPERF_H */
diff --git a/netutils/pppd/ahdlc.h b/netutils/pppd/ahdlc.h
index a3846f76a..db75acab5 100644
--- a/netutils/pppd/ahdlc.h
+++ b/netutils/pppd/ahdlc.h
@@ -53,13 +53,9 @@
 
 struct ppp_context_s;
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 void ahdlc_init(FAR struct ppp_context_s *ctx);
@@ -71,7 +67,6 @@ uint8_t ahdlc_tx(FAR struct ppp_context_s *ctx, uint16_t 
protocol,
                  FAR uint8_t *header, FAR uint8_t *buffer,
                  uint16_t headerlen, uint16_t datalen);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/netutils/pppd/ipcp.h b/netutils/pppd/ipcp.h
index d0e231510..0a42a34c6 100644
--- a/netutils/pppd/ipcp.h
+++ b/netutils/pppd/ipcp.h
@@ -84,20 +84,15 @@ typedef struct  _ipcp
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 void ipcp_init(FAR struct ppp_context_s *ctx);
 void ipcp_task(FAR struct ppp_context_s *ctx, FAR uint8_t *buffer);
 void ipcp_rx(FAR struct ppp_context_s *ctx, FAR uint8_t *, uint16_t);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/netutils/pppd/lcp.h b/netutils/pppd/lcp.h
index c0d6951ba..945614130 100644
--- a/netutils/pppd/lcp.h
+++ b/netutils/pppd/lcp.h
@@ -96,13 +96,9 @@ typedef struct _lcppkt
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 void lcp_init(FAR struct ppp_context_s *ctx);
@@ -111,7 +107,6 @@ void lcp_task(FAR struct ppp_context_s *ctx, FAR uint8_t 
*buffer);
 void lcp_disconnect(FAR struct ppp_context_s *ctx, uint8_t id);
 void lcp_echo_request(FAR struct ppp_context_s *ctx);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/netutils/pppd/pap.h b/netutils/pppd/pap.h
index fa43c9827..af855762e 100644
--- a/netutils/pppd/pap.h
+++ b/netutils/pppd/pap.h
@@ -88,13 +88,9 @@ typedef struct _pappkt
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /* Function prototypes */
@@ -103,7 +99,6 @@ void pap_init(FAR struct ppp_context_s *ctx);
 void pap_rx(FAR struct ppp_context_s *ctx, FAR uint8_t *, uint16_t);
 void pap_task(FAR struct ppp_context_s *ctx, FAR uint8_t *buffer);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/netutils/pppd/ppp.h b/netutils/pppd/ppp.h
index 519b7f168..9419e8a47 100644
--- a/netutils/pppd/ppp.h
+++ b/netutils/pppd/ppp.h
@@ -193,13 +193,9 @@ struct ppp_context_s
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 void ppp_init(FAR struct ppp_context_s *ctx);
@@ -216,7 +212,6 @@ uint16_t scan_packet(FAR struct ppp_context_s *ctx, 
uint16_t,
                      FAR const uint8_t *list, FAR uint8_t *buffer,
                      FAR uint8_t *options, uint16_t len);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/netutils/pppd/ppp_arch.h b/netutils/pppd/ppp_arch.h
index aec2e310e..60cdea88b 100644
--- a/netutils/pppd/ppp_arch.h
+++ b/netutils/pppd/ppp_arch.h
@@ -66,13 +66,9 @@ struct ppp_context_s;
  * Public Function Prototypes
  ****************************************************************************/
 
-#undef EXTERN
 #if defined(__cplusplus)
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 time_t ppp_arch_clock_seconds(void);
@@ -80,7 +76,6 @@ time_t ppp_arch_clock_seconds(void);
 int ppp_arch_getchar(FAR struct ppp_context_s *ctx, FAR uint8_t *p);
 int ppp_arch_putchar(FAR struct ppp_context_s *ctx, uint8_t c);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/system/trace/trace.h b/system/trace/trace.h
index d94e3568b..2f5337a41 100644
--- a/system/trace/trace.h
+++ b/system/trace/trace.h
@@ -32,11 +32,8 @@
 #include <stdio.h>
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -98,7 +95,6 @@ void trace_dump_set_overwrite(bool mode);
 
 #endif /* CONFIG_DRIVERS_NOTERAM */
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/system/zmodem/host/nuttx/crc16.h b/system/zmodem/host/nuttx/crc16.h
index b27f68f19..907a04f2f 100644
--- a/system/zmodem/host/nuttx/crc16.h
+++ b/system/zmodem/host/nuttx/crc16.h
@@ -35,11 +35,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -62,7 +59,6 @@ uint16_t crc16part(const uint8_t *src, size_t len, uint16_t 
crc16val);
 
 uint16_t crc16(const uint8_t *src, size_t len);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif
diff --git a/system/zmodem/host/nuttx/crc32.h b/system/zmodem/host/nuttx/crc32.h
index c899f7896..8bf81e2b3 100644
--- a/system/zmodem/host/nuttx/crc32.h
+++ b/system/zmodem/host/nuttx/crc32.h
@@ -35,11 +35,8 @@
  ****************************************************************************/
 
 #ifdef __cplusplus
-#define EXTERN extern "C"
 extern "C"
 {
-#else
-#define EXTERN extern
 #endif
 
 /****************************************************************************
@@ -62,7 +59,6 @@ uint32_t crc32part(const uint8_t *src, size_t len, uint32_t 
crc32val);
 
 uint32_t crc32(const uint8_t *src, size_t len);
 
-#undef EXTERN
 #ifdef __cplusplus
 }
 #endif

Reply via email to