1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/expat/lib/internal.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,73 @@ 1.4 +/* internal.h 1.5 + 1.6 + Internal definitions used by Expat. This is not needed to compile 1.7 + client code. 1.8 + 1.9 + The following calling convention macros are defined for frequently 1.10 + called functions: 1.11 + 1.12 + FASTCALL - Used for those internal functions that have a simple 1.13 + body and a low number of arguments and local variables. 1.14 + 1.15 + PTRCALL - Used for functions called though function pointers. 1.16 + 1.17 + PTRFASTCALL - Like PTRCALL, but for low number of arguments. 1.18 + 1.19 + inline - Used for selected internal functions for which inlining 1.20 + may improve performance on some platforms. 1.21 + 1.22 + Note: Use of these macros is based on judgment, not hard rules, 1.23 + and therefore subject to change. 1.24 +*/ 1.25 + 1.26 +#if defined(__GNUC__) && defined(__i386__) 1.27 +/* We'll use this version by default only where we know it helps. 1.28 + 1.29 + regparm() generates warnings on Solaris boxes. See SF bug #692878. 1.30 + 1.31 + Instability reported with egcs on a RedHat Linux 7.3. 1.32 + Let's comment out: 1.33 + #define FASTCALL __attribute__((stdcall, regparm(3))) 1.34 + and let's try this: 1.35 +*/ 1.36 +#define FASTCALL __attribute__((regparm(3))) 1.37 +#define PTRFASTCALL __attribute__((regparm(3))) 1.38 +#endif 1.39 + 1.40 +/* Using __fastcall seems to have an unexpected negative effect under 1.41 + MS VC++, especially for function pointers, so we won't use it for 1.42 + now on that platform. It may be reconsidered for a future release 1.43 + if it can be made more effective. 1.44 + Likely reason: __fastcall on Windows is like stdcall, therefore 1.45 + the compiler cannot perform stack optimizations for call clusters. 1.46 +*/ 1.47 + 1.48 +/* Make sure all of these are defined if they aren't already. */ 1.49 + 1.50 +#ifndef FASTCALL 1.51 +#define FASTCALL 1.52 +#endif 1.53 + 1.54 +#ifndef PTRCALL 1.55 +#define PTRCALL 1.56 +#endif 1.57 + 1.58 +#ifndef PTRFASTCALL 1.59 +#define PTRFASTCALL 1.60 +#endif 1.61 + 1.62 +#ifndef XML_MIN_SIZE 1.63 +#if !defined(__cplusplus) && !defined(inline) 1.64 +#ifdef __GNUC__ 1.65 +#define inline __inline 1.66 +#endif /* __GNUC__ */ 1.67 +#endif 1.68 +#endif /* XML_MIN_SIZE */ 1.69 + 1.70 +#ifdef __cplusplus 1.71 +#define inline inline 1.72 +#else 1.73 +#ifndef inline 1.74 +#define inline 1.75 +#endif 1.76 +#endif