~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to system/include/libc/sys/_types.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ANSI C namespace clean utility typedefs */
 
2
 
 
3
/* This file defines various typedefs needed by the system calls that support
 
4
   the C library.  Basically, they're just the POSIX versions with an '_'
 
5
   prepended.  This file lives in the `sys' directory so targets can provide
 
6
   their own if desired (or they can put target dependant conditionals here).
 
7
*/
 
8
 
 
9
#ifndef _SYS__TYPES_H
 
10
#define _SYS__TYPES_H
 
11
 
 
12
#include <machine/_types.h>
 
13
#include <sys/lock.h>
 
14
 
 
15
#ifndef __off_t_defined
 
16
typedef long _off_t;
 
17
#endif
 
18
 
 
19
#if defined(__rtems__)
 
20
/* device numbers are 32-bit major and and 32-bit minor */
 
21
typedef unsigned long long __dev_t;
 
22
#else
 
23
#ifndef __dev_t_defined
 
24
typedef unsigned __dev_t; /* XXX Emscripten */
 
25
#endif
 
26
#endif
 
27
 
 
28
#ifndef __uid_t_defined
 
29
typedef unsigned __uid_t; /* XXX Emscripten */
 
30
#define __uid_t_defined 1
 
31
#endif
 
32
#ifndef __gid_t_defined
 
33
typedef unsigned __gid_t; /* XXX Emscripten */
 
34
#define __gid_t_defined 1
 
35
#endif
 
36
#ifndef __id_t_defined
 
37
typedef unsigned __id_t;  /* can hold a gid_t, pid_t, or uid_t XXX EMSCRIPTEN specific*/
 
38
#define __id_t_defined 1
 
39
#endif
 
40
 
 
41
#ifndef __off64_t_defined
 
42
__extension__ typedef unsigned _off64_t; /* XXX Emscripten */
 
43
#endif
 
44
 
 
45
/*
 
46
 * We need fpos_t for the following, but it doesn't have a leading "_",
 
47
 * so we use _fpos_t instead.
 
48
 */
 
49
#ifndef __fpos_t_defined
 
50
typedef long _fpos_t;           /* XXX must match off_t in <sys/types.h> */
 
51
                                /* (and must be `long' for now) */
 
52
#endif
 
53
 
 
54
#ifdef __LARGE64_FILES
 
55
#ifndef __fpos64_t_defined
 
56
typedef _off64_t _fpos64_t;
 
57
#endif
 
58
#endif
 
59
 
 
60
#ifndef __ssize_t_defined
 
61
#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
 
62
typedef int _ssize_t;
 
63
#else
 
64
typedef long _ssize_t;
 
65
#endif
 
66
#endif
 
67
 
 
68
#define __need_wint_t
 
69
#include <stddef.h>
 
70
 
 
71
#ifndef __mbstate_t_defined
 
72
/* Conversion state information.  */
 
73
typedef struct
 
74
{
 
75
  int __count;
 
76
  union
 
77
  {
 
78
    wint_t __wch;
 
79
    unsigned char __wchb[4];
 
80
  } __value;            /* Value so far.  */
 
81
} _mbstate_t;
 
82
#endif
 
83
 
 
84
#ifndef __flock_t_defined
 
85
typedef _LOCK_RECURSIVE_T _flock_t;
 
86
#endif
 
87
 
 
88
#ifndef __iconv_t_defined
 
89
/* Iconv descriptor type */
 
90
typedef void *_iconv_t;
 
91
#endif
 
92
 
 
93
#endif  /* _SYS__TYPES_H */