Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libumem/common/stub_stand.c
+++ new/usr/src/lib/libumem/common/stub_stand.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 24 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 25 * Use is subject to license terms.
25 26 */
26 27 /*
27 28 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
28 29 */
29 30
30 31 /*
31 32 * Stubs for the standalone to reduce the dependence on external libraries
32 33 */
33 34
34 35 #include <string.h>
35 36 #include "misc.h"
36 37
37 38 /*ARGSUSED*/
38 39 int
39 40 cond_init(cond_t *cvp, int type, void *arg)
40 41 {
41 42 return (0);
42 43 }
43 44
44 45 /*ARGSUSED*/
45 46 int
46 47 cond_destroy(cond_t *cvp)
47 48 {
48 49 return (0);
49 50 }
50 51
51 52 /*ARGSUSED*/
52 53 int
53 54 cond_wait(cond_t *cv, mutex_t *mutex)
54 55 {
55 56 umem_panic("attempt to wait on standumem cv %p", cv);
56 57
57 58 /*NOTREACHED*/
58 59 return (0);
59 60 }
60 61
61 62 /*ARGSUSED*/
62 63 int
63 64 cond_broadcast(cond_t *cvp)
64 65 {
65 66 return (0);
66 67 }
67 68
68 69 /*ARGSUSED*/
69 70 int
70 71 pthread_setcancelstate(int state, int *oldstate)
71 72 {
72 73 return (0);
73 74 }
74 75
75 76 thread_t
76 77 thr_self(void)
77 78 {
78 79 return ((thread_t)1);
79 80 }
80 81
81 82 static mutex_t _mp = DEFAULTMUTEX;
82 83
83 84 /*ARGSUSED*/
84 85 int
85 86 mutex_init(mutex_t *mp, int type, void *arg)
86 87 {
87 88 (void) memcpy(mp, &_mp, sizeof (mutex_t));
88 89 return (0);
89 90 }
90 91
91 92 /*ARGSUSED*/
92 93 int
93 94 mutex_destroy(mutex_t *mp)
94 95 {
95 96 return (0);
96 97 }
97 98
98 99 /*ARGSUSED*/
99 100 int
100 101 _mutex_held(void *mp)
101 102 {
102 103 return (1);
103 104 }
104 105
105 106 /*ARGSUSED*/
106 107 int
107 108 mutex_lock(mutex_t *mp)
108 109 {
109 110 return (0);
110 111 }
111 112
112 113 /*ARGSUSED*/
113 114 int
114 115 mutex_trylock(mutex_t *mp)
115 116 {
116 117 return (0);
117 118 }
118 119
119 120 /*ARGSUSED*/
120 121 int
121 122 mutex_unlock(mutex_t *mp)
122 123 {
123 124 return (0);
124 125 }
125 126
126 127 int
127 128 issetugid(void)
128 129 {
129 130 return (1);
130 131 }
131 132
132 133 int
133 134 _tmem_get_nentries(void)
134 135 {
135 136 return (0);
136 137 }
137 138
↓ open down ↓ |
105 lines elided |
↑ open up ↑ |
138 139 uintptr_t
139 140 _tmem_get_base(void)
140 141 {
141 142 return (0);
142 143 }
143 144
144 145 /*ARGSUSED*/
145 146 void
146 147 _tmem_set_cleanup(void (*f)(int, void *))
147 148 {
149 +}
150 +
151 +int
152 +isspace(int c)
153 +{
154 + switch (c) {
155 + case ' ':
156 + case '\t':
157 + case '\n':
158 + case '\r':
159 + case '\f':
160 + case '\v':
161 + return (1);
162 + }
163 + return (0);
148 164 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX