Skip to content

Rename EXTERN_C Macros that have reserved names#4

Open
wench wants to merge 1 commit into
ludvikjerabek:getopt_glibc_2.42_portfrom
wench:getopt_glibc_2.42_port
Open

Rename EXTERN_C Macros that have reserved names#4
wench wants to merge 1 commit into
ludvikjerabek:getopt_glibc_2.42_portfrom
wench:getopt_glibc_2.42_port

Conversation

@wench

@wench wench commented Nov 24, 2025

Copy link
Copy Markdown

Use of the Macro _END_EXTERN_C interferes with Standard Library headers in MSVC. This PR renames _END_EXTERN_C and _BEGIN_EXTERN_C so they do not have reserved names starting with an underscore and Uppercase letter.

The use of _END_EXTERN_C was causing me trouble when getopt,h was included between 2 different standard library includes. The standard library headers had defined it before getopt.h was included, and getopt.h undefines it causing the following standard library includes to fail.

I didn't rename any of the other Macros that have reseved names starting with an underscore as they didn't seem like they would cause trouble.

… interferes with Standard Library headers in MSVC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant