Ignore:
Timestamp:
Apr 5, 2006, 11:07:42 PM (19 years ago)
Author:
darin
Message:
  • attempt to fix Windows build
  • os-win32/stdint.h: Add int8_t, uint8_t, int64_t.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/os-win32/stdint.h

    r13089 r13717  
     1/*
     2 * Copyright (C) 2005, 2006 Apple Computer, Inc.
     3 *
     4 * This library is free software; you can redistribute it and/or
     5 * modify it under the terms of the GNU Library General Public
     6 * License as published by the Free Software Foundation; either
     7 * version 2 of the License, or (at your option) any later version.
     8 *
     9 * This library is distributed in the hope that it will be useful,
     10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12 * Library General Public License for more details.
     13 *
     14 * You should have received a copy of the GNU Library General Public License
     15 * along with this library; see the file COPYING.LIB.  If not, write to
     16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     17 * Boston, MA 02110-1301, USA.
     18 *
     19 */
     20
    121#ifndef STDINT_WIN32_H
    222#define STDINT_WIN32_H
    323
    4 /* This file emulates enough of unix's stdint.h on Windows
    5    to make WebCore compile */
     24/* This file emulates enough of stdint.h on Windows to make JavaScriptCore and WebCore compile. */
    625   
    726#if !PLATFORM(WIN_OS)
    827#error "This stdint.h file should only be compiled under Windows"
    928#endif
     29
     30typedef unsigned char uint8_t;
     31typedef signed char int8_t;
    1032typedef unsigned short uint16_t;
    1133typedef short int16_t;
    1234typedef unsigned int uint32_t;
    1335typedef int int32_t;
     36typedef __int64 int64_t;
    1437typedef unsigned __int64 uint64_t;
    1538
    1639#ifndef CASSERT
    17 #define CASSERT( exp, name ) typedef int dummy##name [ (exp ) ? 1 : -1 ];
     40#define CASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1];
    1841#endif
    1942
    20 CASSERT( sizeof(int16_t) == 2, int16_t_is_two_bytes )
    21 CASSERT( sizeof(uint16_t) == 2, uint16_t_is_two_bytes )
    22 CASSERT( sizeof(uint32_t) == 4, uint32_t_is_four_bytes )
    23 CASSERT( sizeof(int32_t) == 4, int32_t_is_four_bytes )
     43CASSERT(sizeof(int8_t) == 1, int8_t_is_one_byte)
     44CASSERT(sizeof(uint8_t) == 1, uint8_t_is_one_byte)
     45CASSERT(sizeof(int16_t) == 2, int16_t_is_two_bytes)
     46CASSERT(sizeof(uint16_t) == 2, uint16_t_is_two_bytes)
     47CASSERT(sizeof(int32_t) == 4, int32_t_is_four_bytes)
     48CASSERT(sizeof(uint32_t) == 4, uint32_t_is_four_bytes)
     49CASSERT(sizeof(int64_t) == 8, int64_t_is_four_bytes)
     50CASSERT(sizeof(uint64_t) == 8, uint64_t_is_four_bytes)
    2451
    2552#endif
Note: See TracChangeset for help on using the changeset viewer.