~ubuntu-branches/ubuntu/vivid/mir/vivid

« back to all changes in this revision

Viewing changes to 3rd_party/android-deps/sys/limits.h

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-02-04 14:49:07 UTC
  • mto: This revision was merged to the branch mainline in revision 61.
  • Revision ID: package-import@ubuntu.com-20140204144907-o3ruhix0ey26lchl
Tags: upstream-0.1.4+14.04.20140204
ImportĀ upstreamĀ versionĀ 0.1.4+14.04.20140204

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenBSD: limits.h,v 1.6 2005/12/13 00:35:23 millert Exp $ */
2
 
/*
3
 
 * Copyright (c) 2002 Marc Espie.
4
 
 *
5
 
 * Redistribution and use in source and binary forms, with or without
6
 
 * modification, are permitted provided that the following conditions
7
 
 * are met:
8
 
 * 1. Redistributions of source code must retain the above copyright
9
 
 *    notice, this list of conditions and the following disclaimer.
10
 
 * 2. Redistributions in binary form must reproduce the above copyright
11
 
 *    notice, this list of conditions and the following disclaimer in the
12
 
 *    documentation and/or other materials provided with the distribution.
13
 
 *
14
 
 * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
15
 
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16
 
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17
 
 * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OPENBSD
18
 
 * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19
 
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20
 
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
 
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22
 
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
 
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
 
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
 
 */
26
 
#ifndef _SYS_LIMITS_H_
27
 
#define _SYS_LIMITS_H_
28
 
 
29
 
#include <sys/cdefs.h>
30
 
#include <linux/limits.h>
31
 
 
32
 
/* Common definitions for limits.h. */
33
 
 
34
 
/*
35
 
 * <machine/internal_types.h> is meant to describe a specific architecture,
36
 
 * but to be a safe include, that doesn't ever define anything that is
37
 
 * user-visible (only typedefs and #define names that stays in the __xxx
38
 
 * namespace).
39
 
 *
40
 
 *   __machine_has_unsigned_chars       (default is signed chars)
41
 
 *   __FLT_xxx/__DBL_xxx                non standard values for floating
42
 
 *                                      points limits.
43
 
 */
44
 
#include <machine/internal_types.h>
45
 
 
46
 
/* Legacy */
47
 
#include <machine/limits.h>
48
 
 
49
 
#define CHAR_BIT        8               /* number of bits in a char */
50
 
 
51
 
#define SCHAR_MAX       0x7f            /* max value for a signed char */
52
 
#define SCHAR_MIN       (-0x7f-1)       /* min value for a signed char */
53
 
 
54
 
#define UCHAR_MAX       0xffU           /* max value for an unsigned char */
55
 
#ifdef __machine_has_unsigned_chars
56
 
# define CHAR_MIN       0               /* min value for a char */
57
 
# define CHAR_MAX       0xff            /* max value for a char */
58
 
#else
59
 
# define CHAR_MAX       0x7f
60
 
# define CHAR_MIN       (-0x7f-1)
61
 
#endif
62
 
 
63
 
#define USHRT_MAX       0xffffU         /* max value for an unsigned short */
64
 
#define SHRT_MAX        0x7fff          /* max value for a short */
65
 
#define SHRT_MIN        (-0x7fff-1)     /* min value for a short */
66
 
 
67
 
#define UINT_MAX        0xffffffffU     /* max value for an unsigned int */
68
 
#define INT_MAX         0x7fffffff      /* max value for an int */
69
 
#define INT_MIN         (-0x7fffffff-1) /* min value for an int */
70
 
 
71
 
#ifdef __LP64__
72
 
# define ULONG_MAX      0xffffffffffffffffUL
73
 
                                        /* max value for unsigned long */
74
 
# define LONG_MAX       0x7fffffffffffffffL
75
 
                                        /* max value for a signed long */
76
 
# define LONG_MIN       (-0x7fffffffffffffffL-1)
77
 
                                        /* min value for a signed long */
78
 
#else
79
 
# define ULONG_MAX      0xffffffffUL    /* max value for an unsigned long */
80
 
# define LONG_MAX       0x7fffffffL     /* max value for a long */
81
 
# define LONG_MIN       (-0x7fffffffL-1)/* min value for a long */
82
 
#endif
83
 
 
84
 
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
85
 
# define ULLONG_MAX     0xffffffffffffffffULL
86
 
                                        /* max value for unsigned long long */
87
 
# define LLONG_MAX      0x7fffffffffffffffLL
88
 
                                        /* max value for a signed long long */
89
 
# define LLONG_MIN      (-0x7fffffffffffffffLL-1)
90
 
                                        /* min value for a signed long long */
91
 
#endif
92
 
 
93
 
#if __BSD_VISIBLE
94
 
# define UID_MAX        UINT_MAX        /* max value for a uid_t */
95
 
# define GID_MAX        UINT_MAX        /* max value for a gid_t */
96
 
#endif
97
 
 
98
 
#ifdef __LP64__
99
 
# define LONG_BIT       64
100
 
#else
101
 
# define LONG_BIT       32
102
 
#endif
103
 
 
104
 
/* float.h defines these as well */
105
 
# if !defined(DBL_DIG)
106
 
#  if defined(__DBL_DIG)
107
 
#   define DBL_DIG      __DBL_DIG
108
 
#   define DBL_MAX      __DBL_MAX
109
 
#   define DBL_MIN      __DBL_MIN
110
 
 
111
 
#   define FLT_DIG      __FLT_DIG
112
 
#   define FLT_MAX      __FLT_MAX
113
 
#   define FLT_MIN      __FLT_MIN
114
 
#  else
115
 
#   define DBL_DIG      15
116
 
#   define DBL_MAX      1.7976931348623157E+308
117
 
#   define DBL_MIN      2.2250738585072014E-308
118
 
 
119
 
#   define FLT_DIG      6
120
 
#   define FLT_MAX      3.40282347E+38F
121
 
#   define FLT_MIN      1.17549435E-38F
122
 
#  endif
123
 
# endif
124
 
 
125
 
/* Bionic: the following has been optimized out from our processed kernel headers */
126
 
 
127
 
#define  CHILD_MAX   999
128
 
#define  OPEN_MAX    256
129
 
 
130
 
/* Bionic-specific definitions */
131
 
 
132
 
#define  _POSIX_VERSION             200112L   /* Posix C language bindings version */
133
 
#define  _POSIX2_VERSION            -1        /* we don't support Posix command-line tools */
134
 
#define  _POSIX2_C_VERSION          _POSIX_VERSION
135
 
#define  _XOPEN_VERSION             500       /* by Posix definition */
136
 
#define  _XOPEN_XCU_VERSION         -1        /* we don't support command-line utilities */
137
 
 
138
 
/* tell what we implement legacy stuff when appropriate */
139
 
#if _POSIX_VERSION > 0
140
 
#define  _XOPEN_XPG2                1
141
 
#define  _XOPEN_XPG3                1
142
 
#define  _XOPEN_XPG4                1
143
 
#define  _XOPEN_UNIX                1
144
 
#endif
145
 
 
146
 
#define  _XOPEN_ENH_I18N          -1  /* we don't support internationalization in the C library */
147
 
#define  _XOPEN_CRYPT             -1  /* don't support X/Open Encryption */
148
 
#define  _XOPEN_LEGACY            -1  /* don't claim we support these, we have some of them but not all */
149
 
#define  _XOPEN_REALTIME          -1 /* we don't support all these functions */
150
 
#define  _XOPEN_REALTIME_THREADS  -1  /* same here */
151
 
 
152
 
#define  _POSIX_REALTIME_SIGNALS    -1  /* for now, this is not supported */
153
 
#define  _POSIX_PRIORITY_SCHEDULING  1  /* priority scheduling is a Linux feature */
154
 
#define  _POSIX_TIMERS               1  /* Posix timers are supported */
155
 
#undef   _POSIX_ASYNCHRONOUS_IO         /* aio_ functions are not supported */
156
 
#define  _POSIX_SYNCHRONIZED_IO      1  /* synchronized i/o supported */
157
 
#define  _POSIX_FSYNC                1  /* fdatasync() supported */
158
 
#define  _POSIX_MAPPED_FILES         1  /* mmap-ed files supported */
159
 
 
160
 
/* XXX: TODO: complete and check list here */
161
 
 
162
 
 
163
 
#define  _POSIX_THREADS             1    /* we support threads */
164
 
#define  _POSIX_THREAD_STACKADDR    1    /* we support thread stack address */
165
 
#define  _POSIX_THREAD_STACKSIZE    1    /* we support thread stack size */
166
 
#define  _POSIX_THREAD_PRIO_INHERIT 200112L   /* linux feature */
167
 
#define  _POSIX_THREAD_PRIO_PROTECT 200112L   /* linux feature */
168
 
 
169
 
#undef   _POSIX_PROCESS_SHARED           /* we don't support process-shared synchronization */
170
 
#undef   _POSIX_THREAD_SAFE_FUNCTIONS    /* most functions are, but not everything yet */
171
 
#define  _POSIX_CHOWN_RESTRICTED    1    /* yes, chown requires appropriate priviledges */
172
 
#define  _POSIX_NO_TRUNC            1    /* very long pathnames generate an error */
173
 
#define  _POSIX_SAVED_IDS           1    /* saved user ids is a Linux feature */
174
 
#define  _POSIX_JOB_CONTROL         1    /* job control is a Linux feature */
175
 
 
176
 
 
177
 
 
178
 
#endif