openblt

a hobby OS from the late 90s
git clone http://frotz.net/git/openblt.git
Log | Files | Refs | LICENSE

types.h (987B)


      1 /* Copyright 1998-2000 Brian J. Swetland.  All rights reserved.
      2 ** Distributed under the terms of the OpenBLT License.
      3 */
      4 
      5 #ifndef _BLT_TYPES_H
      6 #define _BLT_TYPES_H
      7 
      8 #define CHAR_BIT 8
      9 #define NULL ((void *) 0)
     10 
     11 #define ntohs(n) ( (((n) & 0xFF00) >> 8) | (((n) & 0x00FF) << 8) )
     12 #define htons(n) ( (((n) & 0xFF00) >> 8) | (((n) & 0x00FF) << 8) )
     13 
     14 typedef unsigned long long uint64;
     15 typedef unsigned int uint32;
     16 typedef unsigned short uint16;
     17 typedef unsigned char uint8;
     18 typedef long long int64;
     19 typedef int int32;
     20 typedef short int16;
     21 typedef char int8;
     22 typedef unsigned char uchar;
     23 
     24 typedef int ssize_t;
     25 typedef unsigned long int size_t;
     26 
     27 typedef unsigned int time_t;
     28 
     29 typedef unsigned int off_t;
     30 typedef unsigned int mode_t;
     31 typedef unsigned int dev_t;
     32 typedef unsigned int ino_t;
     33 typedef unsigned int nlink_t;
     34 typedef unsigned int uid_t;
     35 typedef unsigned int gid_t;
     36 
     37 /* system resources */
     38 typedef int port_id;
     39 typedef int area_id;
     40 typedef int sem_id;
     41 typedef int thread_id;
     42 
     43 #endif