eth4io / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

stdint.h _MSC_VER check in base/util.h #178

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile including stdint.h (or cstdint) and base/util.h in the same 
compilation unit under VisualStudio2010sp1

What is the expected output? What do you see instead?
Expect clean compile, get redefinition of int8_t, etc. instead.

What version of the product are you using? On what operating system?
1.2.0

Did you run the unit test suite that comes with the project? Did all tests pass?
Not relevant for this error.

Please provide any additional information below.
I changed the 
  #ifndef _MSC_VER
to
  #if !defined(_MSC_VER) || _MSC_VER >= 1600
and the
  #ifdef _MSC_VER
to
  #if defined(_MSC_VER) && _MSC_VER < 1600
and the problem went away.

Oh, and I changed the 
  // MSVC has no header for C99 typedefs.
comment to 
  // older MSVC has no header for C99 typedefs.
just to make things pretty.

I'm not certain that _MSC_VER 1600 is the proper cut-off value. That is the 
only system I have to work with.

Original issue reported on code.google.com by mhey...@gmail.com on 30 Mar 2012 at 1:35

GoogleCodeExporter commented 8 years ago
Using Visual Studio 2013 (VS2013 _MSV_VER 1800) I got the same problem...
Just to report that the same changes sugested above still working.

Original comment by gsta...@gmail.com on 9 Jan 2014 at 6:02

GoogleCodeExporter commented 8 years ago
Could you provide a patch to https://github.com/libkml/libkml

Original comment by rasha...@gmail.com on 4 Apr 2015 at 9:02