Re: [xml] xmlXPathNodeSetSort performance



On 8/27/12 12:57 PM, Jon wrote:
On Mon, Aug 27, 2012 at 05:06:04AM -0400, Rob Richards wrote:
This broke the win build (VS 2008 and below) as it doesn't contain stdint.h
Outside on windows I don't have a system without stdint.h so can't
completely test this change but assume it should be changes as
follows (for consistency using same WIN32 define from dict.c):

#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#elif defined(WIN32)
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#endif
#endif


The windows defs do at least fix the win build
   Okay, please push, or you want me to do it ?


Why use WIN32 rather than _WIN32?

IIRC, by default the non-IDE cmd line msvc tools (eg - WinSDK 7.1 cl and friends) define _WIN32 and not WIN32 
so I would expect this to fail if building outside the IDE and WIN32 isn't explicitly defined elsewhere.

FYI, MinGW (mingw.org and mingw-w64) defines both WIN32 and _WIN32.

Simple snippet to trust-but-verify me: https://gist.github.com/968522

Jon

---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums

There are so many different defines (WIN32, _WIN32, _MSC_VER, etc..) used within the code base that I just kept the entire stdint codeblock the same as is used in dict.c for consistency. It does compile via command line as WIN32 is defined in the windows Makefiles.

Rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]