gvanem / Watt-32

Watt-32 TCP/IP library and samples.
https://www.watt-32.net/
18 stars 8 forks source link

Handle recursive `include_next` #73

Closed jwt27 closed 1 year ago

jwt27 commented 1 year ago

When the include path contains the Watt-32 header directory multiple times, #include_next breaks, since two headers have it located inside the include guard.

This scenario can happen when a project builds a local copy of Watt-32, but the user has their own copy in the global include path already. In this case we want to use the local version of the header, so the recursive #include_next must be placed at the end of the header file.

gvanem commented 1 year ago

Merged. Thanks!