casaroli opened a new pull request, #21094:
URL: https://github.com/apache/nuttx/pull/21094

   ## Summary
   
   #21051 removed the `EXTERN` macro from the headers of nuttx. Three PRs that 
merged while #21051 was open added it again in eight headers: 
`include/nuttx/poll.h` (#20796), `drivers/vhost/vhost-serial.h` (#20963) and 
six headers of the `raspberrypi-pico-2-w` board (#19250). This PR removes the 
definitions there, as #21051 did in the other headers. The `extern "C"` block 
for C++ stays.
   
   A program reaches `include/nuttx/poll.h` through `nuttx/fs/fs.h`: in a flat 
build through `<stdio.h>`, `<wchar.h>` and `<aio.h>`, in a kernel build through 
`<aio.h>`. Its `#undef EXTERN` again removes a definition of `EXTERN` that the 
program made for its own use, for example Tcl's `tcl.h`.
   
   `rp23xx_extra_gpio.h` declares `g_cyw43439` with plain `extern` now. The 
declaration is inside the `extern "C"` block of the header.
   
   After this PR, no C file or header of nuttx defines `EXTERN`, and the 
nxstyle check of #21087 passes on all of them. The other matches of the word 
are the `EXTERN(symbol)` command of linker scripts, the IAR assembler directive 
in `arch/arm/src/common/iar/fork.S`, and old comments in some board 
`*_usbdev.c` files.
   
   ## Impact
   
   No change of the code that the compiler sees. A program that defines its own 
`EXTERN` and then includes `<stdio.h>` (flat build) or `<aio.h>` keeps it again.
   
   ## Testing
   
   `qemu-armv8a:knsh` and `qemu-armv8a:nsh`: ostest exits with status 0. Builds 
OK: `raspberrypi-pico-2-w:telnet`, `raspberrypi-pico-2-w:composite`, 
`qemu-armv8a:rpproxy` with `CONFIG_DRIVERS_VHOST_SERIAL`; `<poll.h>` and 
`<nuttx/poll.h>` compile in C++. nxstyle with its new `EXTERN` check (#21087) 
passes on the eight headers.
   
   `tools/checkpatch.sh -c -u -m -g` passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to