Skip to content

Conversation

@petrutlucian94
Copy link
Contributor

If POSIX is set, mingw will no longer prefix some function names
with an underscore, which is expected by libfmt. Rather than handling
them case by case, we'll just avoid the POSIX macros.

Signed-off-by: Lucian Petrut lpetrut@cloudbasesolutions.com

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

If _POSIX_ is set, mingw will no longer prefix *some* function names
with an underscore, which is expected by libfmt. Rather than handling
them case by case, we'll just avoid the POSIX macros.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
@vitaut
Copy link
Contributor

vitaut commented May 22, 2020

Thanks for the PR but these should be fixed in source

fmt/include/fmt/os.h

Lines 50 to 60 in 297c3b2

#ifdef FMT_SYSTEM
# define FMT_POSIX_CALL(call) FMT_SYSTEM(call)
#else
# define FMT_SYSTEM(call) call
# ifdef _WIN32
// Fix warnings about deprecated symbols.
# define FMT_POSIX_CALL(call) ::_##call
# else
# define FMT_POSIX_CALL(call) ::call
# endif
#endif

not in CMake.

@vitaut vitaut closed this May 22, 2020
@petrutlucian94
Copy link
Contributor Author

Right, _fdopen seems to be the only function that's missing the "_" prefix. I've submitted another PR: #1696.

Thanks for the quick feedback.

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.

2 participants