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 local type declaration for POSIX standard type only for MS compiler #1119

Merged
merged 1 commit into from
Sep 22, 2018

Conversation

stweil
Copy link
Contributor

@stweil stweil commented Jun 18, 2018

ssize_t is a POSIX type which is declared in POSIX include files.
Mingw-w64 provides it also for Windows.

Use the local declaration only with MS compilers.

Signed-off-by: Stefan Weil sw@weilnetz.de

@vtorri
Copy link
Contributor

vtorri commented Jun 18, 2018

well, are you sure that vc++/Visual Studio defines ssize_t ? I know that it defines SSIZE_T, but I do not find ssize_t

i would have done :

#ifdef _MSC_VER
typedef SSIZE_T ssize_t;
#endif

ssize_t is a POSIX type which is declared in POSIX include files.
Mingw-w64 provides it also for Windows.

Use the local declaration only with MS compilers.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
@stweil
Copy link
Contributor Author

stweil commented Jun 18, 2018

Thank you for your hint. I only have Mingw-w64 installed locally, so could not test it with VS, but MSDN confirms what you said. I updated the commit as suggested.

@stweil stweil changed the title Remove local type declaration for standard type (Windows) Use local type declaration for POSIX standard type only for MS compiler Jun 18, 2018
@stweil
Copy link
Contributor Author

stweil commented Jun 18, 2018

Updated subject line and description of PR to match updated commit.

@stweil
Copy link
Contributor Author

stweil commented Jun 18, 2018

It looks like the continuous integration test still does not check the JPIP part of the code. See pull request #692 which tried to fix that some years ago.

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.

None yet

3 participants