hostsupport/hostbuild/inc/hostbuild.h
author Matt Plumtree <matt.plumtree@nokia.com>
Tue, 26 Oct 2010 14:14:43 +0100
branchbug235_bringup_0
changeset 68 8d4efe9fa1cf
permissions -rw-r--r--
Add a new FLM for building the host side DLLs (based on the x86build FLM). Fixup the OpenGL ES 1.1 code to remove warnings when built with GCC(some remain).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
68
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     2
// All rights reserved.
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     7
//
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     8
// Initial Contributors:
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    10
//
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    11
// Contributors:
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    12
//
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    13
// Description:
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    14
// This is the preinclude file for hostbuild
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    15
// 
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    16
//
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    17
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    18
/**
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    19
 @file
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    20
 @publishedAll
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    21
 @released
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    22
*/
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    23
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    24
// compiler and STLport things first 
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    25
#define _STLP_THREADS
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    26
#define _STLP_DESIGNATED_DLL
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    27
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    28
// Pick up relevant macros under __GCC32__, since __GCC32__ is not a valid macro for TOOLS2
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    29
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    30
#define __NO_CLASS_CONSTS__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    31
#define __NORETURN__  __attribute__ ((noreturn))
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    32
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    33
#ifdef __GCCV3__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    34
#define __NORETURN_TERMINATOR()
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    35
#else
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    36
#define __NORETURN_TERMINATOR()		abort()
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    37
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    38
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    39
#define IMPORT_C
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    40
#define IMPORT_D
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    41
#ifdef _WIN32
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    42
#define EXPORT_C __declspec(dllexport)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    43
#define EXPORT_D __declspec(dllexport)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    44
#else
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    45
#define EXPORT_C 
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    46
#define EXPORT_D
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    47
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    48
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    49
#define NONSHARABLE_CLASS(x) class x
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    50
#define NONSHARABLE_STRUCT(x) struct x
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    51
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    52
#ifndef __TOOLS2__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    53
#define __NO_THROW
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    54
#else
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    55
#include <new>
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    56
#ifndef _WIN32
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    57
#include <exception>
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    58
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    59
#define __NO_THROW throw(std::bad_alloc)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    60
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    61
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    62
typedef long long Int64;
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    63
typedef unsigned long long Uint64;
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    64
#define	I64LIT(x)	x##LL
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    65
#define	UI64LIT(x)	x##ULL
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    66
#define TEMPLATE_SPECIALIZATION template<>
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    67
#define __TText_defined
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    68
#ifdef __TOOLS2__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    69
#ifndef _WIN32
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    70
#include <stddef.h>  // Linux definition of wchar_t
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    71
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    72
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    73
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    74
typedef wchar_t __TText;
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    75
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    76
// Symbian things next ///////////////////////////////////////////////////////
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    77
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    78
#ifdef __PRODUCT_INCLUDE__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    79
#include __PRODUCT_INCLUDE__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    80
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    81
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    82
// Do not use inline new in e32cmn.h
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    83
#define __PLACEMENT_NEW_INLINE
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    84
#define __PLACEMENT_VEC_NEW_INLINE
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    85
// avoid e32tools/filesystem/include/mingw.inl nonsense
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    86
#ifdef _WIN32
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    87
#define _MINGW_INL
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    88
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    89
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    90
// Varargs
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    91
typedef __builtin_va_list va_list;
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    92
#define va_start(v, l) __builtin_va_start(v, l)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    93
#define va_arg(v, l) __builtin_va_arg(v, l)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    94
#define va_end(v) __builtin_va_end(v)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    95
#define VA_LIST va_list
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    96
#define _VA_LIST_DEFINED //To deal with stdarg.h
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    97
#define __VA_LIST_defined //To deal with e32def.h
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    98
#define VA_START(ap,pn) va_start(ap, pn)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
    99
#define VA_ARG(ap,type) va_arg(ap,type)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   100
#define VA_END(ap)      va_end(ap)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   101
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   102
#ifdef __TOOLS2__
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   103
#ifndef _WIN32
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   104
	#define asm(EXPR) __asm(".intel_syntax noprefix\n\t" EXPR)
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   105
#else
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   106
	#define asm __asm
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   107
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   108
#endif
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   109
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   110
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   111
// the end of the pre-include
8d4efe9fa1cf Add a new FLM for building the host side DLLs (based on the x86build FLM).
Matt Plumtree <matt.plumtree@nokia.com>
parents:
diff changeset
   112