include/keima_util.h
author Michael Busby <mibusby@gmail.com>
Tue Sep 04 21:03:22 2012 -0700 (2012-09-04)
changeset 180 b98a56a533d0
parent 105 35bacccdffcb
child 195 c1ba166f3fc4
permissions -rw-r--r--
Empty structs throw a compiler error instead of crashing the vm. (bug 5475, r=dvander).
dvander@64
     1
/*
dvander@64
     2
 * Copyright (C) 2004-2012 David Anderson
dvander@64
     3
 *
dvander@64
     4
 * This file is part of SourcePawn.
dvander@64
     5
 *
dvander@64
     6
 * SourcePawn is free software: you can redistribute it and/or modify it under
dvander@64
     7
 * the terms of the GNU General Public License as published by the Free
dvander@64
     8
 * Software Foundation, either version 3 of the License, or (at your option)
dvander@64
     9
 * any later version.
dvander@64
    10
 * 
dvander@64
    11
 * SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
dvander@64
    12
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
dvander@64
    13
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
dvander@64
    14
 *
dvander@64
    15
 * You should have received a copy of the GNU General Public License along with
dvander@64
    16
 * SourcePawn. If not, see http://www.gnu.org/licenses/.
dvander@64
    17
 */
dvander@64
    18
#ifndef _include_keima_util_h_
dvander@64
    19
#define _include_keima_util_h_
dvander@64
    20
dvander@64
    21
#if defined(_MSC_VER)
dvander@64
    22
# if defined(KE_EXPORTING)
dvander@64
    23
#   define KE_EXPORT __declspec(dllexport)
dvander@64
    24
# elif defined(KE_IMPORTING)
dvander@64
    25
#   define KE_EXPORT __declspec(dllimport)
dvander@64
    26
# endif
dvander@64
    27
#endif
dvander@64
    28
dvander@64
    29
#if !defined(KE_EXPORT)
dvander@64
    30
# define KE_EXPORT
dvander@64
    31
#endif
dvander@64
    32
dvander@105
    33
#if defined(_MSC_VER) && _MSC_VER < 1600
dvander@105
    34
typedef __int8 int8_t;
dvander@105
    35
typedef unsigned __int8 uint8_t;
dvander@105
    36
typedef __int16 int16_t;
dvander@105
    37
typedef unsigned __int16 uint16_t;
dvander@105
    38
typedef __int32 int32_t;
dvander@105
    39
typedef unsigned __int32 uint32_t;
dvander@105
    40
typedef __int64 int64_t;
dvander@105
    41
typedef unsigned __int64 uint64_t;
dvander@105
    42
#else
dvander@105
    43
# include <stdint.h>
dvander@105
    44
#endif
dvander@105
    45
dvander@64
    46
#endif // _include_keima_util_h_