Apache Portable Runtime Utility Library
xml/expat/lib/internal.h
00001 /* internal.h
00002 
00003    Internal definitions used by Expat.  This is not needed to compile
00004    client code.
00005 
00006    The following calling convention macros are defined for frequently
00007    called functions:
00008 
00009    FASTCALL    - Used for those internal functions that have a simple
00010                  body and a low number of arguments and local variables.
00011 
00012    PTRCALL     - Used for functions called though function pointers.
00013 
00014    PTRFASTCALL - Like PTRCALL, but for low number of arguments.
00015 
00016    inline      - Used for selected internal functions for which inlining
00017                  may improve performance on some platforms.
00018 
00019    Note: Use of these macros is based on judgement, not hard rules,
00020          and therefore subject to change.
00021 */
00022 
00023 #if defined(__GNUC__) && defined(__i386__)
00024 /* We'll use this version by default only where we know it helps.
00025 
00026    regparm() generates warnings on Solaris boxes.   See SF bug #692878.
00027 
00028    Instability reported with egcs on a RedHat Linux 7.3.
00029    Let's comment out:
00030    #define FASTCALL __attribute__((stdcall, regparm(3)))
00031    and let's try this:
00032 */
00033 #define FASTCALL __attribute__((regparm(3)))
00034 #define PTRFASTCALL __attribute__((regparm(3)))
00035 #endif
00036 
00037 /* Using __fastcall seems to have an unexpected negative effect under
00038    MS VC++, especially for function pointers, so we won't use it for
00039    now on that platform. It may be reconsidered for a future release
00040    if it can be made more effective.
00041    Likely reason: __fastcall on Windows is like stdcall, therefore
00042    the compiler cannot perform stack optimizations for call clusters.
00043 */
00044 
00045 /* Make sure all of these are defined if they aren't already. */
00046 
00047 #ifndef FASTCALL
00048 #define FASTCALL
00049 #endif
00050 
00051 #ifndef PTRCALL
00052 #define PTRCALL
00053 #endif
00054 
00055 #ifndef PTRFASTCALL
00056 #define PTRFASTCALL
00057 #endif
00058 
00059 #ifndef XML_MIN_SIZE
00060 #if !defined(__cplusplus) && !defined(inline)
00061 #ifdef __GNUC__
00062 #define inline __inline
00063 #endif /* __GNUC__ */
00064 #endif
00065 #endif /* XML_MIN_SIZE */
00066 
00067 #ifdef __cplusplus
00068 #define inline inline
00069 #else
00070 #ifndef inline
00071 #define inline
00072 #endif
00073 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines