]> sourceware.org Git - newlib-cygwin.git/blame - newlib/libc/include/sys/_types.h
2008-12-11 Jeff Johnston <jjohnstn@redhat.com>
[newlib-cygwin.git] / newlib / libc / include / sys / _types.h
CommitLineData
8a0efa53
CF
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
dde22334 12#include <machine/_types.h>
d0bd3e6f
JJ
13#include <sys/lock.h>
14
cebf33e4 15#ifndef __off_t_defined
8a0efa53 16typedef long _off_t;
e5ae7230
JJ
17#endif
18
cebf33e4
JJ
19#if defined(__rtems__)
20/* device numbers are 32-bit major and and 32-bit minor */
21typedef unsigned long long __dev_t;
22#else
23#ifndef __dev_t_defined
24typedef short __dev_t;
25#endif
26#endif
27
28#ifndef __uid_t_defined
29typedef unsigned short __uid_t;
30#endif
31#ifndef __gid_t_defined
32typedef unsigned short __gid_t;
33#endif
34
35#ifndef __off64_t_defined
dee51391 36__extension__ typedef long long _off64_t;
e5ae7230 37#endif
533b4e66 38
dde22334
JJ
39/*
40 * We need fpos_t for the following, but it doesn't have a leading "_",
41 * so we use _fpos_t instead.
42 */
cebf33e4 43#ifndef __fpos_t_defined
dde22334
JJ
44typedef long _fpos_t; /* XXX must match off_t in <sys/types.h> */
45 /* (and must be `long' for now) */
46#endif
47
48#ifdef __LARGE64_FILES
cebf33e4 49#ifndef __fpos64_t_defined
dde22334
JJ
50typedef _off64_t _fpos64_t;
51#endif
52#endif
53
cebf33e4 54#ifndef __ssize_t_defined
533b4e66
JJ
55#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
56typedef int _ssize_t;
57#else
8a0efa53 58typedef long _ssize_t;
533b4e66 59#endif
e5ae7230 60#endif
8a0efa53 61
8d9112f2
TF
62#define __need_wint_t
63#include <stddef.h>
64
cebf33e4 65#ifndef __mbstate_t_defined
8d9112f2
TF
66/* Conversion state information. */
67typedef struct
68{
69 int __count;
70 union
71 {
72 wint_t __wch;
9c64d2a7 73 unsigned char __wchb[4];
8d9112f2
TF
74 } __value; /* Value so far. */
75} _mbstate_t;
e5ae7230 76#endif
8d9112f2 77
cebf33e4 78#ifndef __flock_t_defined
d0bd3e6f 79typedef _LOCK_RECURSIVE_T _flock_t;
e5ae7230 80#endif
3db40db7 81
cebf33e4 82#ifndef __iconv_t_defined
786ab12c
JJ
83/* Iconv descriptor type */
84typedef void *_iconv_t;
e5ae7230 85#endif
786ab12c 86
8a0efa53 87#endif /* _SYS__TYPES_H */
This page took 0.165223 seconds and 5 git commands to generate.