misc/libfreetype/builds/unix/ftconfig.in
author unc0rr
Sun, 17 Jun 2012 14:13:19 +0400
changeset 7254 aa4461ec7737
parent 5172 88f2e05288ba
permissions -rw-r--r--
This should fix default hogs names in network game
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftconfig.in                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    UNIX-specific configuration file (specification only).               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 1996-2004, 2006-2009, 2011 by                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /* This header file contains a number of macro definitions that are used */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /* by the rest of the engine.  Most of the macros here are automatically */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /* determined at compile time, and you should not need to change it to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  /* port FreeType, except to compile the library with a non-ANSI          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
  /* compiler.                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  /* Note however that if some specific modifications are needed, we       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  /* advise you to place a modified copy in your build directory.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
  /* The build directory is usually `freetype/builds/<system>', and        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  /* contains system-specific files that are always included first when    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  /* building the library.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
#ifndef __FTCONFIG_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
#define __FTCONFIG_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
#include FT_CONFIG_OPTIONS_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
#include FT_CONFIG_STANDARD_LIBRARY_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /* These macros can be toggled to suit a specific system.  The current   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /* ones are defaults used to compile FreeType in an ANSI C environment   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /* (16bit compilers are also supported).  Copy this file to your own     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
#undef HAVE_UNISTD_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
#undef HAVE_FCNTL_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
#undef HAVE_STDINT_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  /* There are systems (like the Texas Instruments 'C54x) where a `char' */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  /* has 16 bits.  ANSI C says that sizeof(char) is always 1.  Since an  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  /* `int' has 16 bits also for this system, sizeof(int) gives 1 which   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  /* is probably unexpected.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  /* `char' type.                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
#ifndef FT_CHAR_BIT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
#define FT_CHAR_BIT  CHAR_BIT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
#undef FT_USE_AUTOCONF_SIZEOF_TYPES
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
#undef SIZEOF_INT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
#undef SIZEOF_LONG
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
#define FT_SIZEOF_INT  SIZEOF_INT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
#define FT_SIZEOF_LONG SIZEOF_LONG
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  /* Following cpp computation of the bit length of int and long */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  /* is copied from default include/freetype/config/ftconfig.h.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /* If any improvement is required for this file, it should be  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /* applied to the original header file for the builders that   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  /* does not use configure script.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  /* The size of an `int' type.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
#if                                 FT_UINT_MAX == 0xFFFFUL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
#define FT_SIZEOF_INT  (16 / FT_CHAR_BIT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
#elif                               FT_UINT_MAX == 0xFFFFFFFFUL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
#define FT_SIZEOF_INT  (32 / FT_CHAR_BIT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
#define FT_SIZEOF_INT  (64 / FT_CHAR_BIT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
#error "Unsupported size of `int' type!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  /* The size of a `long' type.  A five-byte `long' (as used e.g. on the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  /* DM642) is recognized but avoided.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
#if                                  FT_ULONG_MAX == 0xFFFFFFFFUL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
#define FT_SIZEOF_LONG  (32 / FT_CHAR_BIT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
#define FT_SIZEOF_LONG  (64 / FT_CHAR_BIT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
#error "Unsupported size of `long' type!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  /* Preferred alignment of data */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
#define FT_ALIGNMENT  8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /* used -- this is only used to get rid of unpleasant compiler warnings */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
#ifndef FT_UNUSED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
#define FT_UNUSED( arg )  ( (arg) = (arg) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*                     AUTOMATIC CONFIGURATION MACROS                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /* These macros are computed from the ones defined above.  Don't touch   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /* their definition, unless you know precisely what you are doing.  No   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /* porter should need to mess with them.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /* Mac support                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*   This is the only necessary change, so it is defined here instead    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*   providing a new configuration file.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    ( defined( __MWERKS__ ) && defined( macintosh )        )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  /* no Carbon frameworks for 64bit 10.4.x */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
#include "AvailabilityMacros.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
#if defined( __LP64__ ) && \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
#define DARWIN_NO_CARBON 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
#define FT_MACINTOSH 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
#elif defined( __SC__ ) || defined( __MRC__ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
  /* Classic MacOS compilers */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
#include "ConditionalMacros.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
#if TARGET_OS_MAC
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
#define FT_MACINTOSH 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
  /* Fix compiler warning with sgi compiler */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
#if defined( __sgi ) && !defined( __GNUC__ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
#pragma set woff 3505
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
  /* IntN types                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  /*   Used to guarantee the size of some specific integers.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  typedef signed short    FT_Int16;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  typedef unsigned short  FT_UInt16;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
#if FT_SIZEOF_INT == 4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  typedef signed int      FT_Int32;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
  typedef unsigned int    FT_UInt32;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
#elif FT_SIZEOF_LONG == 4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  typedef signed long     FT_Int32;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
  typedef unsigned long   FT_UInt32;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
#error "no 32bit type found -- please check your configuration files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
  /* look up an integer type that is at least 32 bits */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
#if FT_SIZEOF_INT >= 4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
  typedef int            FT_Fast;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
  typedef unsigned int   FT_UFast;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
#elif FT_SIZEOF_LONG >= 4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
  typedef long           FT_Fast;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
  typedef unsigned long  FT_UFast;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
  /* determine whether we have a 64-bit int type for platforms without */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
  /* Autoconf                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
#if FT_SIZEOF_LONG == 8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  /* FT_LONG64 must be defined if a 64-bit type is available */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
#define FT_LONG64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
#define FT_INT64  long
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
#elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
  /* this compiler provides the __int64 type */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
#define FT_LONG64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
#define FT_INT64  __int64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
#elif defined( __BORLANDC__ )  /* Borland C++ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  /* XXXX: We should probably check the value of __BORLANDC__ in order */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
  /*       to test the compiler version.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  /* this compiler provides the __int64 type */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
#define FT_LONG64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
#define FT_INT64  __int64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
#elif defined( __WATCOMC__ )   /* Watcom C++ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
  /* Watcom doesn't provide 64-bit data types */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
#define FT_LONG64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
#define FT_INT64  long long int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
#elif defined( __GNUC__ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
  /* GCC provides the `long long' type */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
#define FT_LONG64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
#define FT_INT64  long long int
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
#endif /* FT_SIZEOF_LONG == 8 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  /* A 64-bit data type will create compilation problems if you compile    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
  /* in strict ANSI mode.  To avoid them, we disable its use if __STDC__   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
  /* is defined.  You can however ignore this rule by defining the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
  /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
#ifdef __STDC__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  /* Undefine the 64-bit macros in strict ANSI compilation mode.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /* Since `#undef' doesn't survive in configuration header files */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  /* we use the postprocessing facility of AC_CONFIG_HEADERS to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  /* replace the leading `/' with `#'.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
/undef FT_LONG64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
/undef FT_INT64
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
#endif /* __STDC__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
#define FT_BEGIN_STMNT  do {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
#define FT_END_STMNT    } while ( 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
  /* Provide assembler fragments for performance-critical functions. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  /* These must be defined `static __inline__' with GCC.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
#if defined( __CC_ARM ) || defined( __ARMCC__ )  /* RVCT */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
  /* documentation is in freetype.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
  static __inline FT_Int32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
  FT_MulFix_arm( FT_Int32  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
                 FT_Int32  b )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
    register FT_Int32  t, t2;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
    __asm
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
      mov   a,  t,  asr #31         /* a   = (hi >> 31) */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
      add   a,  a,  #0x8000         /* a  += 0x8000 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
      adds  t2, t2, a               /* t2 += a */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
      adc   t,  t,  #0              /* t  += carry */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
    return a;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
#endif /* __CC_ARM || __ARMCC__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
#ifdef __GNUC__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
#if defined( __arm__ ) && !defined( __thumb__ )    && \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
    !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
  /* documentation is in freetype.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
  static __inline__ FT_Int32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
  FT_MulFix_arm( FT_Int32  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
                 FT_Int32  b )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
    register FT_Int32  t, t2;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
    __asm__ __volatile__ (
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
      "adc    %2, %2, #0\n\t"           /* %2 += carry */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
      : "=r"(a), "=&r"(t2), "=&r"(t)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
      : "r"(a), "r"(b) );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
    return a;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
#if defined( __i386__ )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
  /* documentation is in freetype.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
  static __inline__ FT_Int32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
  FT_MulFix_i386( FT_Int32  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
                  FT_Int32  b )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
    register FT_Int32  result;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
    __asm__ __volatile__ (
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
      "imul  %%edx\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
      "movl  %%edx, %%ecx\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
      "sarl  $31, %%ecx\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
      "addl  $0x8000, %%ecx\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
      "addl  %%ecx, %%eax\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
      "adcl  $0, %%edx\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
      "shrl  $16, %%eax\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
      "shll  $16, %%edx\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
      "addl  %%edx, %%eax\n"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
      : "=a"(result), "=d"(b)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
      : "a"(a), "d"(b)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
      : "%ecx", "cc" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
    return result;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
#endif /* i386 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
#endif /* __GNUC__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
#ifdef _MSC_VER /* Visual C++ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
#ifdef _M_IX86
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
  /* documentation is in freetype.h */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
  static __inline FT_Int32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
  FT_MulFix_i386( FT_Int32  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
                  FT_Int32  b )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
    register FT_Int32  result;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
    __asm
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
      mov eax, a
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
      mov edx, b
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
      imul edx
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
      mov ecx, edx
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
      sar ecx, 31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
      add ecx, 8000h
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
      add eax, ecx
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
      adc edx, 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
      shr eax, 16
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
      shl edx, 16
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
      add eax, edx
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
      mov result, eax
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
    return result;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
#endif /* _M_IX86 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
#endif /* _MSC_VER */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
#ifdef FT_MULFIX_ASSEMBLER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
#define FT_MULFIX_INLINED  FT_MULFIX_ASSEMBLER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   426
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   427
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
#define FT_LOCAL( x )      static  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
#define FT_LOCAL_DEF( x )  static  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
#define FT_LOCAL( x )      extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
#define FT_LOCAL_DEF( x )  extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
#define FT_LOCAL( x )      extern  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
#define FT_LOCAL_DEF( x )  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
#ifndef FT_BASE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
#define FT_BASE( x )  extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
#define FT_BASE( x )  extern  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
#endif /* !FT_BASE */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
#ifndef FT_BASE_DEF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
#define FT_BASE_DEF( x )  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
#define FT_BASE_DEF( x )  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
#endif /* !FT_BASE_DEF */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
#ifndef FT_EXPORT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
#define FT_EXPORT( x )  extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
#define FT_EXPORT( x )  extern  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
#endif /* !FT_EXPORT */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
#ifndef FT_EXPORT_DEF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
#define FT_EXPORT_DEF( x )  extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
#define FT_EXPORT_DEF( x )  extern  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   483
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   484
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
#endif /* !FT_EXPORT_DEF */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
#ifndef FT_EXPORT_VAR
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
#define FT_EXPORT_VAR( x )  extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
#define FT_EXPORT_VAR( x )  extern  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
#endif /* !FT_EXPORT_VAR */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   497
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   498
  /* The following macros are needed to compile the library with a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
  /* C++ compiler and with 16bit compilers.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   502
  /* This is special.  Within C++, you must specify `extern "C"' for */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   503
  /* functions which are used via function pointers, and you also    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
  /* must do that for structures which contain function pointers to  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
  /* assure C linkage -- it's not possible to have (local) anonymous */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
  /* functions which are accessed by (global) function pointers.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
  /* contains pointers to callback functions.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
  /* that contains pointers to callback functions.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
  /* Some 16bit compilers have to redefine these macros to insert    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
  /* the infamous `_cdecl' or `__fastcall' declarations.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
  /*                                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
#ifndef FT_CALLBACK_DEF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
#define FT_CALLBACK_DEF( x )  extern "C"  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
#define FT_CALLBACK_DEF( x )  static  x
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
#endif /* FT_CALLBACK_DEF */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
#ifndef FT_CALLBACK_TABLE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
#ifdef __cplusplus
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
#define FT_CALLBACK_TABLE      extern "C"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
#define FT_CALLBACK_TABLE_DEF  extern "C"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
#define FT_CALLBACK_TABLE      extern
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
#define FT_CALLBACK_TABLE_DEF  /* nothing */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
#endif /* FT_CALLBACK_TABLE */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
#endif /* __FTCONFIG_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
/* END */