Skip to content
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

use zu instead of "lu and cast" #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

divinity76
Copy link

No description provided.

@n1000
Copy link
Member

n1000 commented Nov 4, 2016

Hi @divinity76 , would it be possible for you to modify this patch to use "SIZE_T_SPEC" as defined in tools/types.h instead of the %zu? Unfortunately the windows version of printf doesn't support %z

https://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx

@n1000
Copy link
Member

n1000 commented Nov 4, 2016

Here is an example from elsewhere in the code:

error (1, ENOTSUP, "%s not multiple of " SIZE_T_SPEC " bytes", file->name, sizeof (uint32_t));

Now that I am looking at our definition in types.h, i think we may have it not entirely correct for Windows, I can correct that issue in a separate patch.

@n1000
Copy link
Member

n1000 commented Nov 4, 2016

Even though that page indicates that Visual Studio 2015 does not support %z, it does actually seem to be supported (just tested it). Either way, I think we should still use the SIZE_T_SPEC for now. Maybe we can get rid of it later.

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