Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Build fixes for MSVC. #135

Closed
wants to merge 2 commits into from
Closed

Build fixes for MSVC. #135

wants to merge 2 commits into from

Conversation

xpol
Copy link
Contributor

@xpol xpol commented Jul 9, 2015

  1. Disable UTF-8 related test for MSVC, it just don't support UTF-8.
  2. VS 2015 has snprintf()
  3. VS 2015 removed _set_output_format()
  4. VS 2015 defines timespec.

xpol added 2 commits July 9, 2015 22:50
1. VS 2015 has snprintf()
2. VS 2015 removed _set_output_format()
3. VS 2015 defines timespec.
@bjori
Copy link
Contributor

bjori commented Jul 9, 2015

How is the UTF-8 tests failing?

That seems like a major issue if you can insert a key with UTF-8, but cannot read it back.

What does 'str' contain in the tests/test-json.c test for example?

@xpol
Copy link
Contributor Author

xpol commented Jul 10, 2015

visual studio can't compile string literals contains non-ascii characters.

@xpol
Copy link
Contributor Author

xpol commented Jul 10, 2015

I should say "Disable tests that contains non ascii string literals, visual studio can't process them."

@ajdavis
Copy link
Member

ajdavis commented Nov 16, 2015

Thanks for the contribution, we're going to merge the _set_output_format and timespec fixes (with some modifications).

I don't understand why you need to ifdef-out the UTF-8 tests, however. With our VS2015 build system we can compile and run those tests in test-bson.c and test-json.c. Can you show us the error message? What precise version of Windows and Visual Studio are your running, please?

@ajdavis
Copy link
Member

ajdavis commented Nov 16, 2015

Merged in 4fb312c.

@ajdavis ajdavis closed this Nov 16, 2015
@xpol
Copy link
Contributor Author

xpol commented Nov 17, 2015

Sorry, I have no Windows PC now.
As I know, at least in code page CP936 env, utf8 string literal will cause compiler error.

@ajdavis
Copy link
Member

ajdavis commented Nov 17, 2015

OK we'll replace the UTF-8 symbols with escape sequences: https://jira.mongodb.org/browse/CDRIVER-1003

@ajdavis
Copy link
Member

ajdavis commented Nov 18, 2015

The UTF-8 issue is fixed in d4feba4.

@xpol
Copy link
Contributor Author

xpol commented Nov 19, 2015

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants