Home | History | Annotate | Download | only in sys
      1 /*  DO NOT EDIT THIS FILE.
      2 
      3     It has been auto-edited by fixincludes from:
      4 
      5 	"/tmp/ndk-20110923/install/toolchains/x86-4.4.3/prebuilt/linux-x86/sysroot/usr/include/sys/types.h"
      6 
      7     This had to be done to correct non-standard usages in the
      8     original, manufacturer supplied header file.  */
      9 
     10 /*
     11  * Copyright (C) 2008 The Android Open Source Project
     12  * All rights reserved.
     13  *
     14  * Redistribution and use in source and binary forms, with or without
     15  * modification, are permitted provided that the following conditions
     16  * are met:
     17  *  * Redistributions of source code must retain the above copyright
     18  *    notice, this list of conditions and the following disclaimer.
     19  *  * Redistributions in binary form must reproduce the above copyright
     20  *    notice, this list of conditions and the following disclaimer in
     21  *    the documentation and/or other materials provided with the
     22  *    distribution.
     23  *
     24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     27  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
     28  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     29  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     30  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
     31  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     32  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     33  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     34  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     35  * SUCH DAMAGE.
     36  */
     37 #ifndef _SYS_TYPES_H_
     38 #define _SYS_TYPES_H_
     39 
     40 #define __need_size_t
     41 #define __need_ptrdiff_t
     42 #include <stddef.h>
     43 #include <stdint.h>
     44 #include <sys/cdefs.h>
     45 
     46 #include <linux/posix_types.h>
     47 #include <asm/types.h>
     48 #include <linux/types.h>
     49 #include <machine/kernel.h>
     50 
     51 typedef __u32    __kernel_dev_t;
     52 
     53 /* be careful with __kernel_gid_t and __kernel_uid_t
     54  * these are defined as 16-bit for legacy reason, but
     55  * the kernel uses 32-bits instead.
     56  *
     57  * 32-bit valuea are required for Android, so use
     58  * __kernel_uid32_t and __kernel_gid32_t
     59  */
     60 
     61 typedef __kernel_blkcnt_t    blkcnt_t;
     62 typedef __kernel_blksize_t   blksize_t;
     63 typedef __kernel_clock_t     clock_t;
     64 typedef __kernel_clockid_t   clockid_t;
     65 typedef __kernel_dev_t       dev_t;
     66 typedef __kernel_fsblkcnt_t  fsblkcnt_t;
     67 typedef __kernel_fsfilcnt_t  fsfilcnt_t;
     68 typedef __kernel_gid32_t     gid_t;
     69 typedef __kernel_id_t        id_t;
     70 typedef __kernel_ino_t       ino_t;
     71 typedef __kernel_key_t       key_t;
     72 typedef __kernel_mode_t      mode_t;
     73 typedef __kernel_nlink_t	 nlink_t;
     74 #ifndef _OFF_T_DEFINED_
     75 #define _OFF_T_DEFINED_
     76 typedef __kernel_off_t       off_t;
     77 #endif
     78 typedef __kernel_loff_t      loff_t;
     79 typedef loff_t               off64_t;  /* GLibc-specific */
     80 
     81 typedef __kernel_pid_t		 pid_t;
     82 
     83 /* while POSIX wants these in <sys/types.h>, we
     84  * declare then in <pthread.h> instead */
     85 #if 0
     86 typedef  .... pthread_attr_t;
     87 typedef  .... pthread_cond_t;
     88 typedef  .... pthread_condattr_t;
     89 typedef  .... pthread_key_t;
     90 typedef  .... pthread_mutex_t;
     91 typedef  .... pthread_once_t;
     92 typedef  .... pthread_rwlock_t;
     93 typedef  .... pthread_rwlock_attr_t;
     94 typedef  .... pthread_t;
     95 #endif
     96 
     97 #ifndef _SIZE_T_DEFINED_
     98 #define _SIZE_T_DEFINED_
     99 #if !defined(_GCC_SIZE_T)
    100 #define _GCC_SIZE_T
    101 typedef __SIZE_TYPE__ size_t;
    102 #endif
    103 
    104 #endif
    105 
    106 /* size_t is defined by the GCC-specific <stddef.h> */
    107 #ifndef _SSIZE_T_DEFINED_
    108 #define _SSIZE_T_DEFINED_
    109 typedef long int  ssize_t;
    110 #endif
    111 
    112 typedef __kernel_suseconds_t  suseconds_t;
    113 typedef __kernel_time_t       time_t;
    114 typedef __kernel_uid32_t        uid_t;
    115 typedef signed long           useconds_t;
    116 
    117 typedef __kernel_daddr_t	daddr_t;
    118 typedef __kernel_timer_t	timer_t;
    119 typedef __kernel_mqd_t		mqd_t;
    120 
    121 typedef __kernel_caddr_t    caddr_t;
    122 typedef unsigned int        uint_t;
    123 typedef unsigned int        uint;
    124 
    125 /* for some applications */
    126 #include <sys/sysmacros.h>
    127 
    128 #ifdef __BSD_VISIBLE
    129 typedef	unsigned char	u_char;
    130 typedef	unsigned short	u_short;
    131 typedef	unsigned int	u_int;
    132 typedef	unsigned long	u_long;
    133 
    134 typedef uint32_t       u_int32_t;
    135 typedef uint16_t       u_int16_t;
    136 typedef uint8_t        u_int8_t;
    137 typedef uint64_t       u_int64_t;
    138 #endif
    139 
    140 #endif
    141