-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
djgpp compatibility #2820
djgpp compatibility #2820
Conversation
This fixes #1077. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR but missing wstring
and wostream
is non-conformant and we shouldn't be providing workarounds for this. You can define those aliases in your code before including {fmt}.
Could those typedefs be provided by fmt (as is the case for edit: also it's not possible to build a static library if |
This is the "correct" way to find the page size on DPMI. In practice though, this could be hardcoded to return 4096 and no one would ever notice the difference.
COFF objects don't support visibility, so using this attribute needlessly generates a long list of warnings.
This is for systems with no libc support for wide character strings (specifically djgpp). libstdc++ then doesn't define these aliases, but the primary templates are still available.
This is essentially the same workaround that I don't think is worth doing considering a very niche nonconformant target. You might want reporting this to djgpp maintainers if there are any and/or patching {fmt} locally. |
It's been reported there before and nothing was ever done. I think it'll be significantly easier to keep fmt compatible with djgpp rather than the other way around - a whole bunch of |
These two patches make the library compile on djgpp (using gcc 10.3.0). Everything seems to work, although the test cases don't compile, due to excessive usage of
std::wstring
. They would probably work if you replaced all those, but I don't really see the purpose in doing that.I've wanted to use fmtlib for a long time, but making it compatible with djgpp always seemed like a lot of work, so I kept putting it off. I thought everything related to wide character strings would have to be
#ifdef
'd out.Turns out the only problem is
std::wstring
, which is only ever used on two lines. :)