darwin-xnu/libkern/libkern/OSTypes.h
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
   3 *
   4 * @APPLE_LICENSE_HEADER_START@
   5 * 
   6 * The contents of this file constitute Original Code as defined in and
   7 * are subject to the Apple Public Source License Version 1.1 (the
   8 * "License").  You may not use this file except in compliance with the
   9 * License.  Please obtain a copy of the License at
  10 * http://www.apple.com/publicsource and read it before using this file.
  11 * 
  12 * This Original Code and all software distributed under the License are
  13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
  17 * License for the specific language governing rights and limitations
  18 * under the License.
  19 * 
  20 * @APPLE_LICENSE_HEADER_END@
  21 */
  22/*
  23 * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
  24 *
  25 * HISTORY
  26 *
  27 */
  28
  29#ifndef _OS_OSTYPES_H
  30#define _OS_OSTYPES_H
  31
  32typedef unsigned int       UInt;
  33typedef signed int         SInt;
  34
  35#ifndef __MACTYPES__    /* CF MacTypes.h */
  36#ifndef __TYPES__       /* guess... Mac Types.h */
  37
  38typedef unsigned char      UInt8;
  39typedef unsigned short     UInt16;
  40typedef unsigned long      UInt32;
  41typedef unsigned long long UInt64;
  42#if             defined(__BIG_ENDIAN__)
  43typedef struct UnsignedWide {
  44                        UInt32          hi;
  45                        UInt32          lo;
  46}                                                       UnsignedWide;
  47#elif           defined(__LITTLE_ENDIAN__)
  48typedef struct UnsignedWide {
  49                        UInt32          lo;
  50                        UInt32          hi;
  51}                                                       UnsignedWide;
  52#else
  53#error Unknown endianess.
  54#endif
  55
  56typedef signed char        SInt8;
  57typedef signed short       SInt16;
  58typedef signed long        SInt32;
  59typedef signed long long   SInt64;
  60#if             defined(__BIG_ENDIAN__)
  61typedef struct wide {
  62                        SInt32          hi;
  63                        UInt32          lo;
  64}                                                       wide;
  65#elif           defined(__LITTLE_ENDIAN__)
  66typedef struct wide {
  67                        UInt32          lo;
  68                        SInt32          hi;
  69}                                                       wide;
  70#else
  71#error Unknown endianess.
  72#endif
  73
  74typedef SInt32                          OSStatus;
  75typedef UnsignedWide            AbsoluteTime;
  76typedef UInt32                          OptionBits;
  77
  78typedef unsigned char Boolean;
  79
  80#endif /* __TYPES__ */
  81#endif /* __MACTYPES__ */
  82
  83#if !defined(OS_INLINE)
  84#       define OS_INLINE static inline
  85#endif
  86
  87#endif /* _OS_OSTYPES_H */
  88
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.