Print this page
4964 nl_langinfo(CRNCYSTR) returns wrong alignment character
4999 libc test suite enhancements
4939 desire wcsnrtombs() function
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: TBD
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libc/port/llib-lc
+++ new/usr/src/lib/libc/port/llib-lc
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 *
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
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25 25 * Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved.
26 26 * Copyright (c) 2013 Gary Mills
27 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 28 */
28 29
29 30 /* LINTLIBRARY */
30 31 /* PROTOLIB1 */
31 32
32 33 #define __EXTENSIONS__
33 34
34 35 #include <aio.h>
35 36 #include <alloca.h>
36 37 #include <attr.h>
37 38 #include <atomic.h>
38 39 #include <ctype.h>
39 40 #include <deflt.h>
40 41 #include <dirent.h>
41 42 #include <dlfcn.h>
42 43 #include <door.h>
43 44 #include <err.h>
44 45 #include <sys/errno.h>
45 46 #include <euc.h>
46 47 #include <fcntl.h>
47 48 #include <float.h>
48 49 #include <fmtmsg.h>
49 50 #include <fnmatch.h>
50 51 #include <ftw.h>
51 52 #include <glob.h>
52 53 #include <getwidth.h>
53 54 #include <grp.h>
54 55 #include <iconv.h>
55 56 #include <langinfo.h>
56 57 #include <libgen.h>
57 58 #include <libw.h>
58 59 #include <locale.h>
59 60 #include <memory.h>
60 61 #include <mon.h>
61 62 #include <mqueue.h>
62 63 #include <nan.h>
63 64 #include <ndbm.h>
64 65 #include <limits.h>
65 66 #include <nl_types.h>
66 67 #include <poll.h>
67 68 #include <project.h>
68 69 #include <priv.h>
69 70 #include <pwd.h>
70 71 #include <rctl.h>
71 72 #include <regex.h>
72 73 #include <rpcsvc/ypclnt.h>
73 74 #include <sched.h>
74 75 #include <search.h>
75 76 #include <semaphore.h>
76 77 #include <setjmp.h>
77 78 #include <shadow.h>
78 79 #include <siginfo.h>
79 80 #include <signal.h>
80 81 #include <stdarg.h>
81 82 #include <ucred.h>
82 83 #include <sys/ucred.h>
83 84 #include <unistd.h>
84 85 #include <ulimit.h>
85 86 #include <utime.h>
86 87 #include <stddef.h>
87 88 #include <stdio.h>
88 89 #include <stdlib.h>
89 90 #include <string.h>
90 91 #include <stropts.h>
91 92 #include <synch.h>
92 93 #include <sys/acctctl.h>
93 94 #include <sys/acl.h>
94 95 #include <sys/asynch.h>
95 96 #include <sys/byteorder.h>
96 97 #include <sys/cladm.h>
97 98 #include <sys/corectl.h>
98 99 #include <sys/dl.h>
99 100 #include <sys/exacct.h>
100 101 #include <sys/fcntl.h>
101 102 #include <sys/file.h>
102 103 #include <sys/fs/namenode.h>
103 104 #include <sys/instance.h>
104 105 #include <sys/ipc.h>
105 106 #include <sys/lwp.h>
106 107 #include <sys/mkdev.h>
107 108 #include <sys/mman.h>
108 109 #include <sys/mnttab.h>
109 110 #include <sys/mount.h>
110 111 #include <sys/msg.h>
111 112 #include <sys/param.h>
112 113 #include <sys/priocntl.h>
113 114 #include <sys/procset.h>
114 115 #include <sys/processor.h>
115 116 #include <sys/pset.h>
116 117 #include <sys/rctl_impl.h>
117 118 #include <sys/sem.h>
118 119 #include <sys/shm.h>
119 120 #include <sys/sid.h>
120 121 #include <sys/signal.h>
121 122 #include <sys/stat.h>
122 123 #include <sys/statvfs.h>
123 124 #include <sys/strlog.h>
124 125 #include <sys/stropts.h>
125 126 #include <sys/syscall.h>
126 127 #include <sys/sysconfig.h>
127 128 #include <sys/syslog.h>
128 129 #include <sys/systeminfo.h>
129 130 #include <sys/task.h>
130 131 #include <sys/termio.h>
131 132 #include <sys/termios.h>
132 133 #include <sys/u8_textprep.h>
133 134 #include <sys/time.h>
134 135 #include <sys/timeb.h>
135 136 #include <sys/times.h>
136 137 #include <sys/types.h>
137 138 #include <sys/uadmin.h>
138 139 #include <sys/utsname.h>
139 140 #include <sys/vfstab.h>
140 141 #include <sys/sendfile.h>
141 142 #include <sys/zone.h>
142 143 #include <termio.h>
143 144 #include <time.h>
144 145 #include <tzfile.h>
145 146 #include <ucontext.h>
146 147 #include <utmpx.h>
147 148 #include <values.h>
148 149 #include <wait.h>
149 150 #include <wchar.h>
150 151 #include <wctype.h>
151 152 #include <widec.h>
152 153 #include <wordexp.h>
153 154 #include <thread.h>
154 155 #include <pthread.h>
155 156 #include <schedctl.h>
156 157 #include <zone.h>
157 158 #include <port.h>
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
158 159 #include <spawn.h>
159 160 #include <inttypes.h>
160 161 #include <getopt.h>
161 162 #include <stdio_ext.h>
162 163 #if defined(__i386)
163 164 #include <sys/sysi86.h>
164 165 #endif
165 166 #if defined(__amd64)
166 167 #include <stack_unwind.h>
167 168 #endif
169 +#include <xlocale.h>
168 170
169 171 /*
170 172 * This really comes from the crt*.s startup modules.
171 173 */
172 174 char **environ;
173 175
174 176 /*
175 177 * This is a GNU/Linux/BSD compatibility interface,
176 178 * not declared in any header file.
177 179 */
178 180 const char *__progname;
179 181
180 182 /*
181 183 * POSIX versions of standard libc routines; these aren't extracted
182 184 * from the headers above since we cannot #define _POSIX_C_SOURCE.
183 185 */
184 186 int __posix_readdir_r(DIR * _RESTRICT_KYWD, struct dirent * _RESTRICT_KYWD,
185 187 struct dirent ** _RESTRICT_KYWD);
186 188 int __posix_getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
187 189 int __posix_getgrnam_r(const char *, struct group *, char *, size_t,
188 190 struct group **);
189 191 int __posix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
190 192 struct passwd **);
191 193 int __posix_getpwnam_r(const char *, struct passwd *, char *, size_t,
192 194 struct passwd **);
193 195 int __posix_sigwait(const sigset_t * _RESTRICT_KYWD, int * _RESTRICT_KYWD);
194 196 char *__posix_asctime_r(const struct tm *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
195 197 char *__posix_ctime_r(const time_t *, char *);
196 198 int __posix_ttyname_r(int, char *, size_t);
197 199 int __posix_getlogin_r(char *, int);
198 200 int __posix_getloginx_r(char *, int);
199 201
200 202 /*
201 203 * XPG4 versions of standard libc routines; these aren't extracted
202 204 * from the headers above since we cannot #define _XPG4_2.
203 205 */
204 206 int __xpg4_putmsg(int, const struct strbuf *, const struct strbuf *, int);
205 207 int __xpg4_putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
206 208
207 209 /*
208 210 * These aren't extracted from the headers above because:
209 211 * - We cannot #define _STRPTIME_DONTZERO
210 212 * - We cannot #define _XPG5
211 213 */
212 214 char *__strptime_dontzero(const char *, const char *, struct tm *);
213 215 long __sysconf_xpg5(int);
214 216 wchar_t *__wcstok_xpg5(wchar_t *_RESTRICT_KYWD,
215 217 const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
216 218 size_t __wcsftime_xpg5(wchar_t *_RESTRICT_KYWD, size_t,
217 219 const wchar_t *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD);
218 220 wint_t __fgetwc_xpg5(__FILE *);
219 221 wint_t __getwc_xpg5(__FILE *);
220 222 wint_t __getwchar_xpg5(void);
221 223 wint_t __fputwc_xpg5(wint_t, __FILE *);
222 224 wint_t __putwc_xpg5(wint_t, __FILE *);
223 225 wint_t __putwchar_xpg5(wint_t);
224 226 wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
225 227 int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
226 228 wint_t __ungetwc_xpg5(wint_t, __FILE *);
227 229
228 230 /*
229 231 * /usr/src/lib/libc/port/gen routines
230 232 */
231 233
232 234 /* _ctype.c */
233 235
234 236 /* _loc_data.c */
235 237
236 238 /* _locale.c */
237 239
238 240 /* _set_tab.c */
239 241 int _set_tab(const char *loc, int cat);
240 242
241 243 /* _xftw.c */
242 244 int _xftw(int ver, const char *path, int (*fn)(), int depth);
243 245
244 246 /* a64l.c */
245 247 long a64l(const char *);
246 248
247 249 /* abort.c */
248 250 void abort(void);
249 251
250 252 /* abs.c */
251 253 int abs(int arg);
252 254 long labs(long int arg);
253 255
254 256 /* assert.c */
255 257 void _assert(const char *assertion, const char *filename, int line_num);
256 258 void __assert_c99(const char *assertion, const char *filename, int line_num,
257 259 const char *funcname);
258 260
259 261 /* atexit.c */
260 262 int atexit(void(*func)());
261 263 void _exithandle(void);
262 264
263 265 /* atof.c */
264 266 double atof(const char *p);
265 267
266 268 /* atoi.c */
267 269 int atoi(const char *p);
268 270
269 271 /* atol.c */
270 272 long atol(const char *p);
271 273
272 274 /* basename.c */
273 275 char *basename(char *s);
274 276
275 277 /* bcmp.c */
276 278 int bcmp(const void *s1, const void *s2, size_t len);
277 279
278 280 /* bcopy.c */
279 281 void bcopy(const void *s1, void *s2, size_t len);
280 282
281 283 /* bsearch.c */
282 284 void *bsearch(const void *ky, const void *bs, size_t nel,
283 285 size_t width, int (*compar)());
284 286
285 287 /* bzero.c */
286 288 void bzero(void *sp, size_t len);
287 289
288 290 /* calloc.c */
289 291 void *calloc(size_t num, size_t size);
290 292
291 293 /* catclose.c */
292 294 int catclose(nl_catd catd);
293 295
294 296 /* catgets.c */
295 297 char *catgets(nl_catd catd, int set_num, int msg_num, const char *s);
296 298
297 299 /* catopen.c */
298 300 nl_catd catopen(const char *name, int mode);
299 301
300 302 /* cfgetispeed.c */
301 303 speed_t cfgetispeed(const struct termios *termios_p);
302 304
303 305 /* cfgetospeed.c */
304 306 speed_t cfgetospeed(const struct termios *termios_p);
305 307
306 308 /* cfree.c */
307 309 void cfree(void *p, size_t num, size_t size);
308 310
309 311 /* cfsetispeed.c */
310 312 int cfsetispeed(struct termios *termios_p, speed_t speed);
311 313
312 314 /* cfsetospeed.c */
313 315 int cfsetospeed(struct termios *termios_p, speed_t speed);
314 316
315 317 /* cftime.c */
316 318 int cftime(char *buf, char *format, const time_t *t);
317 319 int ascftime(char *buf, const char *format, const struct tm *tm);
318 320
319 321 /* clock.c */
320 322 clock_t clock(void);
321 323
322 324 /* closedir.c */
323 325 int closedir(DIR *dirp);
324 326
325 327 /* confstr.c */
326 328 size_t confstr(int name, char *buf, size_t length);
327 329
328 330 /* crypt.c */
329 331 void setkey(const char *key);
330 332 void encrypt(char *block, int fake);
331 333 char *crypt(const char *key, const char *salt);
332 334
333 335 /* csetlen.c */
334 336 int csetlen(int cset);
335 337 int csetcol(int cset);
336 338
337 339 /* ctime.c */
338 340 char *ctime(const time_t *t);
339 341 char *ctime_r(const time_t *, char *buf, int);
340 342 char *asctime(const struct tm *t);
341 343 char *asctime_r(const struct tm *, char *, int);
342 344
343 345 /* ctypefcns.c */
344 346 int isalpha(int c);
345 347 int isupper(int c);
346 348 int islower(int c);
347 349 int isdigit(int c);
348 350 int isxdigit(int c);
349 351 int isalnum(int c);
350 352 int isspace(int c);
351 353 int ispunct(int c);
352 354 int isprint(int c);
353 355 int isgraph(int c);
354 356 int iscntrl(int c);
355 357 int isascii(int c);
356 358 int _toupper(int c);
357 359 int _tolower(int c);
358 360 int toascii(int c);
359 361
360 362 /* daemon.c */
361 363 int daemon(int nochdir, int noclose);
362 364
363 365 /* directio.c */
364 366 int directio(int filedes, int advice);
365 367
366 368 /* dirname.c */
367 369 char *dirname(char *s);
368 370
369 371 /* div.c */
370 372 div_t div(int numer, int denom);
371 373 ldiv_t ldiv(long int numer, long int denom);
372 374
373 375 /* drand48.c */
374 376 double drand48(void);
375 377 double erand48(unsigned short *xsubi);
376 378 long krand48(unsigned short *xsubi, unsigned int m);
377 379 long lrand48(void);
378 380 long mrand48(void);
379 381 void srand48(long seedval);
380 382 unsigned short *seed48(unsigned short seed16v[3]);
381 383 void lcong48(unsigned short param[7]);
382 384 long nrand48(unsigned short *xsubi);
383 385 long jrand48(unsigned short *xsubi);
384 386
385 387 /* dup.c */
386 388 int dup(int fildes);
387 389 int dup2(int fildes, int fildes2);
388 390 int dup3(int fildes, int fildes2, int flags);
389 391
390 392 /* ecvt.c */
391 393 char *ecvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
392 394 int *_RESTRICT_KYWDsign);
393 395 char *fcvt(double value, int ndigit, int *_RESTRICT_KYWD decpt,
394 396 int *_RESTRICT_KYWD sign);
395 397
396 398 /* err.c */
397 399 void _errfp(FILE *, int, const char *, ...);
398 400 void _verrfp(FILE *, int, const char *, va_list);
399 401 void _errxfp(FILE *, int, const char *, ...);
400 402 void _verrxfp(FILE *, int, const char *, va_list);
401 403 void _warnfp(FILE *, const char *, ...);
402 404 void _vwarnfp(FILE *, const char *, va_list);
403 405 void _warnxfp(FILE *, const char *, ...);
404 406 void _vwarnxfp(FILE *, const char *, va_list);
405 407
406 408 /* errlst.c */
407 409
408 410 /* euclen.c */
409 411 int euccol(const unsigned char *s);
410 412 int euclen(const unsigned char *s);
411 413 int eucscol(const unsigned char *s);
412 414
413 415 /* execvp.c */
414 416 /* VARARGS1 */
415 417 int execlp(const char *, const char *, ...);
416 418 int execvp(const char *name, char *const *argv);
417 419
418 420 /* fattach.c */
419 421 int fattach(int fildes, const char *path);
420 422
421 423 /* fdetach.c */
422 424 int fdetach(const char *path);
423 425
424 426 /* ffs.c */
425 427 int ffs(int field);
426 428
427 429 /* fmtmsg.c */
428 430 int addseverity(int value, const char *string);
429 431 int fmtmsg(long class, const char *label, int severity, const char *text,
430 432 const char *action, const char *tag);
431 433
432 434 /* ftime.c */
433 435 int ftime(struct timeb *tp);
434 436
435 437 /* ftok.c */
436 438 key_t ftok(const char *path, int id);
437 439
438 440 /* gcvt.c */
439 441 char *gcvt(double number, int ndigit, char *buf);
440 442
441 443 /* getcwd.c */
442 444 char *getcwd(char *str, size_t size);
443 445
444 446 /* getdate.c */
445 447 struct tm *getdate(const char *expression);
446 448 #ifdef getdate_err
447 449 #undef getdate_err
448 450 #endif
449 451 int getdate_err;
450 452
451 453 /* getdate_data.c */
452 454
453 455 /* getdate_gd.c */
454 456
455 457 /* getdtblsize.c */
456 458 int getdtablesize(void);
457 459
458 460 /* getenv.c */
459 461 char *getenv(const char *name);
460 462
461 463 /* getexecname.c */
462 464 const char *getexecname(void);
463 465
464 466 /* getgrnam.c */
465 467 struct group *getgrnam(const char *name);
466 468 struct group *getgrgid(gid_t gid);
467 469 struct group *fgetgrent_r(FILE *, struct group *, char *, int);
468 470 struct group *getgrent_r(struct group *, char *, int);
469 471 struct group *getgrgid_r(gid_t, struct group *, char *, int);
470 472 struct group *getgrnam_r(const char *, struct group *, char *, int);
471 473
472 474 /* gethostid.c */
473 475 long gethostid(void);
474 476
475 477 /* gethz.c */
476 478 int gethz(void);
477 479
478 480 /* getisax.c */
479 481 uint_t getisax(uint32_t *, uint_t);
480 482
481 483 /* getlogin.c */
482 484 char *getloginx(void);
483 485 char *getloginx_r(char *, int);
484 486 #ifdef getlogin
485 487 #undef getlogin
486 488 #endif /* getlogin */
487 489 char *getlogin(void);
488 490 #ifdef getlogin_r
489 491 #undef getlogin_r
490 492 #endif /* getlogin_r */
491 493 char *getlogin_r(char *, int);
492 494
493 495 /* getmntent.c */
494 496 int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
495 497 int getmntent(FILE *fd, struct mnttab *mp);
496 498
497 499 /* getnetgrent.c */
498 500 int setnetgrent(const char *grp);
499 501 int endnetgrent(void);
500 502 int getnetgrent(char **machinep, char **namep, char **domainp);
501 503
502 504 /* getopt.c */
503 505 int getopt(int argc, char *const *argv, const char *opts);
504 506
505 507 /* getopt_long.c */
506 508 int getopt_clip(int argc, char *const *argv, const char *optstring,
507 509 const struct option *long_options, int *long_index);
508 510 int getopt_long(int argc, char *const *argv, const char *optstring,
509 511 const struct option *long_options, int *long_index);
510 512 int getopt_long_only(int argc, char *const *argv, const char *optstring,
511 513 const struct option *long_options, int *long_index);
512 514
513 515 /* getpagesize.c */
514 516 int getpagesize(void);
515 517
516 518 /* getpw.c */
517 519 int getpw(uid_t uid, char *buf);
518 520
519 521 /* getpwnam.c */
520 522 struct passwd *getpwnam(const char *name);
521 523 struct passwd *getpwuid(uid_t uid);
522 524 struct passwd *fgetpwent_r(FILE *, struct passwd *, char *, int);
523 525 struct passwd *getpwent_r(struct passwd *, char *, int);
524 526 struct passwd *getpwnam_r(const char *, struct passwd *, char *, int);
525 527 struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
526 528
527 529 /* getrusage.c */
528 530 int getrusage(int who, struct rusage *rusage);
529 531
530 532 /* gettimeofday.c */
531 533 int gettimeofday(struct timeval *_RESTRICT_KYWD tp, void *_RESTRICT_KYWD);
532 534
533 535 /* getspent.c */
534 536 void setspent(void);
535 537 void endspent(void);
536 538 struct spwd *getspent(void);
537 539 struct spwd *getspent_r(struct spwd *, char *, int);
538 540 struct spwd *fgetspent(FILE *f);
539 541 struct spwd *fgetspent_r(FILE *, struct spwd *, char *, int);
540 542 struct spwd *getspnam(const char *name);
541 543 struct spwd *getspnam_r(const char *, struct spwd *, char *, int);
542 544 int putspent(const struct spwd *p, FILE *f);
543 545
544 546 /* getspent_r.c */
545 547 int str2spwd(const char *, int, void *, char *, int);
546 548
547 549 /* getsubopt.c */
548 550 int getsubopt(char **optionsp, char *const *tokens, char **valuep);
549 551
550 552 /* gettxt.c */
551 553 char *gettxt(const char *msg_id, const char *dflt_str);
552 554
553 555 /* getusershell.c */
554 556 char *getusershell(void);
555 557 void endusershell(void);
556 558 void setusershell(void);
557 559
558 560 /* getut.c */
559 561 struct utmp *getutent(void);
560 562 struct utmp *getutid(const struct utmp *entry);
561 563 struct utmp *getutline(const struct utmp *entry);
562 564 struct utmp *pututline(const struct utmp *entry);
563 565 void setutent(void);
564 566 void endutent(void);
565 567 int utmpname(const char *newfile);
566 568 void updwtmp(const char *file, struct utmp *ut);
567 569 void getutmp(const struct utmpx *utx, struct utmp *ut);
568 570 void getutmpx(const struct utmp *ut, struct utmpx *utx);
569 571 struct utmp *makeut(struct utmp *utmp);
570 572
571 573 /* getutx.c */
572 574 struct utmpx *getutxent(void);
573 575 struct utmpx *getutxid(const struct utmpx *entry);
574 576 struct utmpx *getutxline(const struct utmpx *entry);
575 577 struct utmpx *pututxline(const struct utmpx *entry);
576 578 void setutxent(void);
577 579 void endutxent(void);
578 580 int utmpxname(const char *newfile);
579 581 void updwtmpx(const char *filex, struct utmpx *utx);
580 582 struct utmpx *makeutx(const struct utmpx *utmp);
581 583 struct utmpx *modutx(const struct utmpx *utp);
582 584
583 585 /* getvfsent.c */
584 586 int getvfsspec(FILE *fd, struct vfstab *vp, char *special);
585 587 int getvfsfile(FILE *fd, struct vfstab *vp, char *mountp);
586 588 int getvfsany(FILE *fd, struct vfstab *vgetp, struct vfstab *vrefp);
587 589 int getvfsent(FILE *fd, struct vfstab *vp);
588 590
589 591 /* getwd.c */
590 592 char *getwd(char *pathname);
591 593
592 594 /* getwidth.c */
593 595 void getwidth(eucwidth_t *eucstruct);
594 596
595 597 /* hsearch.c */
596 598 int hcreate(size_t size);
597 599 void hdestroy(void);
598 600 ENTRY *hsearch(ENTRY item, ACTION action);
599 601
600 602 /* iconv.c */
601 603 size_t iconv(iconv_t cd, const char **_RESTRICT_KYWD inbuf,
602 604 size_t *_RESTRICT_KYWD inbytesleft, char **_RESTRICT_KYWD outbuf,
603 605 size_t *_RESTRICT_KYWD outbytesleft);
604 606 int iconv_close(iconv_t cd);
605 607 iconv_t iconv_open(const char *tocode, const char *fromcode);
606 608
607 609 /* imaxabs.c */
608 610 intmax_t imaxabs(intmax_t j);
609 611
610 612 /* imaxdiv.c */
611 613 imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
612 614
613 615 /* index.c */
614 616 char *index(const char *sp, int c);
615 617
616 618 /* initgroups.c */
617 619 int initgroups(const char *uname, gid_t agroup);
618 620
619 621 /* innetgr.c */
620 622 int innetgr(const char *group, const char *machine, const char *name,
621 623 const char *domain);
622 624
623 625 /* insque.c */
624 626 void insque(void *elem, void *pred);
625 627 void remque(void *elem);
626 628
627 629 /* isaexec.c */
628 630 int isaexec(const char *, char *const *, char *const *);
629 631
630 632 /* isastream.c */
631 633 int isastream(int fd);
632 634
633 635 /* isatty.c */
634 636 int isatty(int f);
635 637
636 638 /* killpg.c */
637 639 int killpg(pid_t pgrp, int sig);
638 640
639 641 /* l64a.c */
640 642 char *l64a(long lg);
641 643
642 644 /* lckpwdf.c */
643 645 int lckpwdf(void);
644 646 int ulckpwdf(void);
645 647
646 648 /* lfind.c */
647 649 void * lfind(const void *ky, const void *bs, size_t *nelp,
648 650 size_t width, int (*compar)());
649 651
650 652 /* localeconv.c */
651 653 struct lconv *localeconv(void);
652 654
653 655 /* lsearch.c */
654 656 void * lsearch(const void *ky, void *bs, size_t *nelp,
655 657 size_t width, int (*compar)());
656 658
657 659 /* madvise.c */
658 660 int madvise(caddr_t addr, size_t len, int advice);
659 661
660 662 /* malloc.c */
661 663 void *malloc(size_t size);
662 664 void *realloc(void *old, size_t size);
663 665 void free(void *old);
664 666
665 667 /* mbstowcs.c */
666 668 size_t mbstowcs(wchar_t *_RESTRICT_KYWD pwcs, const char *_RESTRICT_KYWD s,
667 669 size_t n);
668 670
669 671 /* mbtowc.c */
670 672 int mbtowc(wchar_t *_RESTRICT_KYWD wchar, const char *_RESTRICT_KYWD s,
671 673 size_t n);
672 674 int mblen(const char *s, size_t n);
673 675
674 676 /* memalign.c */
675 677 void *memalign(size_t align, size_t nbytes);
676 678
677 679 /* memccpy.c */
678 680 void *memccpy(void *_RESTRICT_KYWDs, const void *_RESTRICT_KYWD s0, int c,
679 681 size_t n);
680 682
681 683 /* memchr.c */
682 684 void *memchr(const void *sptr, int c1, size_t n);
683 685
684 686 /* memcmp.c */
685 687 int memcmp(const void *s1, const void *s2, size_t n);
686 688
687 689 /* memcpy.c */
688 690 void *memcpy(void *_RESTRICT_KYWD s, const void *_RESTRICT_KYWD s0, size_t n);
689 691
690 692 /* memmove.c */
691 693 void *memmove(void *s, const void *s0, size_t n);
692 694
693 695 /* memset.c */
694 696 void *memset(void *sp1, int c, size_t n);
695 697
696 698 /* mkdev.c */
697 699 dev_t __makedev(const int version, const major_t majdev,
698 700 const minor_t mindev);
699 701 major_t __major(const int version, const dev_t devnum);
700 702 minor_t __minor(const int version, const dev_t devnum);
701 703
702 704 /* mkfifo.c */
703 705 int mkfifo(const char *path, mode_t mode);
704 706
705 707 /* mktemp.c */
706 708 char *mktemp(char *as);
707 709
708 710 /* mlock.c */
709 711 int mlock(caddr_t addr, size_t len);
710 712
711 713 /* mlockall.c */
712 714 int mlockall(int flags);
713 715
714 716 /* mon.c */
715 717 void monitor(int (*alowpc)(), int (*ahighpc)(), WORD *buffer,
716 718 size_t bufsize, size_t nfunc);
717 719
718 720 /* msync.c */
719 721 int msync(caddr_t addr, size_t len, int flags);
720 722
721 723 /* munlock.c */
722 724 int munlock(caddr_t addr, size_t len);
723 725
724 726 /* munlockall.c */
725 727 int munlockall(void);
726 728
727 729 /* ndbm.c */
728 730 void dbm_setdefwrite(DBM *db);
729 731 int dbm_flush(DBM *db);
730 732 int dbm_flushpag(DBM *db);
731 733 DBM *dbm_open(const char *file, int flags, mode_t mode);
732 734 void dbm_close(DBM *db);
733 735 int dbm_close_status(DBM *db);
734 736 datum dbm_fetch(DBM *db, datum key);
735 737 int dbm_delete(DBM *db, datum key);
736 738 int dbm_store(DBM *db, datum key, datum dat, int replace);
737 739 datum dbm_firstkey(DBM *db);
738 740 datum dbm_nextkey(DBM *db);
739 741 datum dbm_do_nextkey(DBM *db, datum inkey);
740 742
741 743 /* new_list.c */
742 744
743 745 /* nftw.c */
744 746 int nftw(const char *path, int (*fn)(), int depth, int flags);
745 747
746 748 /* nl_langinfo.c */
747 749 char *nl_langinfo(nl_item item);
748 750
749 751 /* opendir.c */
750 752 DIR *opendir(const char *filename);
751 753
752 754 /* opt_data.c */
753 755
754 756 /* perror.c */
755 757 void perror(const char *s);
756 758
757 759 /* pipe.c */
758 760 int pipe(int *fds);
759 761
760 762 /* psiginfo.c */
761 763 void psiginfo(siginfo_t *sip, char *s);
762 764
763 765 /* psignal.c */
764 766 void psignal(int sig, const char *s);
765 767
766 768 /* pt.c */
767 769 char *ptsname(int fd);
768 770 int unlockpt(int fd);
769 771 int grantpt(int fd);
770 772
771 773 /* putenv.c */
772 774 int putenv(char *change);
773 775 int setenv(const char *envname, const char *envval, int overwrite);
774 776 int unsetenv(const char *name);
775 777
776 778 /* putpwent.c */
777 779 int putpwent(const struct passwd *p, FILE *f);
778 780
779 781 /* qsort.c */
780 782 void qsort(void *base, size_t n, size_t size, int (*compar)());
781 783
782 784 /* raise.c */
783 785 int raise(int sig);
784 786
785 787 /* rand.c */
786 788 void srand(unsigned x);
787 789 int rand(void);
788 790 int rand_r(unsigned int *);
789 791
790 792 /* random.c */
791 793 void srandom(unsigned x);
792 794 char *initstate(unsigned seed, char *arg_state, size_t n);
793 795 char *setstate(const char *arg_state);
794 796 long random(void);
795 797
796 798 /* rctlops.c */
797 799 int rctl_walk(int (*callback)(const char *, void *), void *walk_data);
798 800 hrtime_t rctlblk_get_firing_time(rctlblk_t *rblk);
799 801 uint_t rctlblk_get_global_action(rctlblk_t *rblk);
800 802 uint_t rctlblk_get_global_flags(rctlblk_t *rblk);
801 803 uint_t rctlblk_get_local_action(rctlblk_t *rblk, int *signalp);
802 804 uint_t rctlblk_get_local_flags(rctlblk_t *rblk);
803 805 id_t rctlblk_get_recipient_pid(rctlblk_t *rblk);
804 806 rctl_priv_t rctlblk_get_privilege(rctlblk_t *rblk);
805 807 rctl_qty_t rctlblk_get_value(rctlblk_t *rblk);
806 808 void rctlblk_set_local_action(rctlblk_t *rblk, uint_t action, int signal);
807 809 void rctlblk_set_local_flags(rctlblk_t *rblk, uint_t flags);
808 810 void rctlblk_set_privilege(rctlblk_t *rblk, rctl_priv_t priv);
809 811 void rctlblk_set_value(rctlblk_t *rblk, rctl_qty_t val);
810 812 size_t rctlblk_size(void);
811 813
812 814 /* readdir.c */
813 815 struct dirent *readdir(DIR *dirp);
814 816
815 817 /* realpath.c */
816 818 char *realpath(const char *_RESTRICT_KYWD raw, char *_RESTRICT_KYWD canon);
817 819
818 820 /* regexpr.c */
819 821 char *re_comp(const char *sp);
820 822 int re_exec(const char *p1);
821 823
822 824 /* rindex.c */
823 825 char *rindex(const char *sp, int c);
824 826
825 827 /* rename.c */
826 828 int remove(const char *filename);
827 829 int rename(const char *old, const char *new);
828 830
829 831 /* rewinddir.c */
830 832 #undef rewinddir
831 833 void rewinddir(DIR *dirp);
832 834
833 835 /* scandir.c */
834 836 int alphasort(const struct dirent **, const struct dirent **);
835 837 int scandir(const char *dirname, struct dirent *(*namelist[]),
836 838 int (*select)(const struct dirent *),
837 839 int (*dcomp)(const struct dirent **, const struct dirent **));
838 840
839 841 /* scrwidth.c */
840 842 int scrwidth(wchar_t c);
841 843
842 844 /* seekdir.c */
843 845 void seekdir(DIR *dirp, long loc);
844 846
845 847 /* select.c */
846 848 int pselect(int nfds,
847 849 fd_set *_RESTRICT_KYWD readfds,
848 850 fd_set *_RESTRICT_KYWD writefds,
849 851 fd_set *_RESTRICT_KYWD errorfds,
850 852 const struct timespec *_RESTRICT_KYWD timeout,
851 853 const sigset_t *_RESTRICT_KYWD sigmask);
852 854 int select(int nfds,
853 855 fd_set *_RESTRICT_KYWD readfds,
854 856 fd_set *_RESTRICT_KYWD writefds,
855 857 fd_set *_RESTRICT_KYWD errorfds,
856 858 struct timeval *_RESTRICT_KYWD timeout);
857 859
858 860 /* setlocale.c */
859 861 char *setlocale(int cat, const char *loc);
860 862
861 863 /* setpriority.c */
862 864 int getpriority(int which, id_t who);
863 865 int setpriority(int which, id_t who, int prio);
864 866
865 867 /* settimeofday.c */
866 868 int settimeofday(struct timeval *tp, void *);
867 869
868 870 /* sigflag.c */
869 871 int sigflag(int sig, int flag, int on);
870 872
871 873 /* siglist.c */
872 874
873 875 /* sigsend.c */
874 876 int sigsend(idtype_t idtype, id_t id, int sig);
875 877
876 878 /* sigsetops.c */
877 879 int sigfillset(sigset_t *set);
878 880 int sigemptyset(sigset_t *set);
879 881 int sigaddset(sigset_t *set, int sig);
880 882 int sigdelset(sigset_t *set, int sig);
881 883 int sigismember(const sigset_t *set, int sig);
882 884
883 885 /* scalls.c */
884 886 unsigned sleep(unsigned sleep_tm);
885 887
886 888 /* ssignal.c */
887 889 int (*ssignal(int sig, int (*fn)())) ();
888 890 int gsignal(int sig);
889 891
890 892 /* str2id.c */
891 893
892 894 /* str2sig.c */
893 895 int str2sig(const char *s, int *sigp);
894 896 int sig2str(int i, char *s);
895 897
896 898 /* strcat.c */
897 899 char *strcat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
898 900
899 901 /* strchr.c */
900 902 char *strchr(const char *sp, int c);
901 903
902 904 /* strcmp.c */
903 905 int strcmp(const char *s1, const char *s2);
904 906
905 907 /* strcpy.c */
906 908 char *strcpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2);
907 909
908 910 /* strcspn.c */
909 911 size_t strcspn(const char *string, const char *charset);
910 912
911 913 /* strdup.c */
912 914 char *strdup(const char *s1);
913 915
914 916 /* strerror.c */
915 917 char *strerror(int errnum);
916 918 int strerror_r(int errnum, char *strerrbuf, size_t buflen);
917 919
918 920 /* strftime.c */
919 921 size_t strftime(char *_RESTRICT_KYWD s, size_t maxsize,
920 922 const char *_RESTRICT_KYWD format,
921 923 const struct tm *_RESTRICT_KYWD tm);
922 924
923 925 /* strlen.c */
924 926 size_t strlen(const char *s);
925 927
926 928 /* strncat.c */
927 929 char *strncat(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
928 930
929 931 /* strncmp.c */
930 932 int strncmp(const char *s1, const char *s2, size_t n);
931 933
932 934 /* strncpy.c */
933 935 char *strncpy(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2, size_t n);
934 936
935 937 /* strpbrk.c */
936 938 char *strpbrk(const char *string, const char *brkset);
937 939
938 940 /* strrchr.c */
939 941 char *strrchr(const char *sp, int c);
940 942
941 943 /* strsep.c */
942 944 char *strsep(char **stringp, const char *delim);
943 945
944 946 /* strspn.c */
945 947 size_t strspn(const char *string, const char *charset);
946 948
947 949 /* strstr.c */
948 950 char *strstr(const char *as1, const char *as2);
949 951
950 952 /* strtod.c */
951 953 double strtod(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
952 954 float strtof(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
953 955 long double strtold(const char *_RESTRICT_KYWD cp, char **_RESTRICT_KYWD ptr);
954 956
955 957 /* strtoimax.c */
956 958 intmax_t strtoimax(const char *_RESTRICT_KYWD nptr,
957 959 char **_RESTRICT_KYWD endptr, int base);
958 960
959 961 /* strtok.c */
960 962 char *strtok(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD sepset);
961 963 char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
962 964 char **_RESTRICT_KYWD);
963 965
964 966 /* strtol.c */
965 967 long strtol(const char *_RESTRICT_KYWD str, char **_RESTRICT_KYWD nptr,
966 968 int base);
967 969
968 970 /* strtoul.c */
969 971 unsigned long strtoul(const char *_RESTRICT_KYWD str,
970 972 char **_RESTRICT_KYWD nptr, int base);
971 973
972 974 /* strtoumax.c */
973 975 uintmax_t strtoumax(const char *_RESTRICT_KYWD nptr,
974 976 char **_RESTRICT_KYWD endptr, int base);
975 977
976 978 /* strxfrm.c */
977 979 size_t strxfrm(char *_RESTRICT_KYWD s1, const char *_RESTRICT_KYWD s2,
978 980 size_t n);
979 981 int strcoll(const char *s1, const char *s2);
980 982
981 983 /* swab.c */
982 984 void swab(const char *_RESTRICT_KYWD from, char *_RESTRICT_KYWD to, ssize_t n);
983 985
984 986 /* swapctl.c */
985 987 int swapctl(int cmd, void *arg);
986 988
987 989 /* sysconf.c */
988 990 long sysconf(int name);
989 991
990 992 /* syslog.c */
991 993 /* VARARGS2 */
992 994 void syslog(int pri, const char *fmt, ...);
993 995 void vsyslog(int pri, const char *fmt, va_list ap);
994 996 void openlog(const char *ident, int logstat, int logfac);
995 997 void closelog(void);
996 998 int setlogmask(int pmask);
997 999
998 1000 /* tcdrain.c */
999 1001 int tcdrain(int fildes);
1000 1002
1001 1003 /* tcflow.c */
1002 1004 int tcflow(int fildes, int action);
1003 1005
1004 1006 /* tcflush.c */
1005 1007 int tcflush(int fildes, int queue_selector);
1006 1008
1007 1009 /* tcgetattr.c */
1008 1010 int tcgetattr(int fildes, struct termios *termios_p);
1009 1011
1010 1012 /* tcgetpgrp.c */
1011 1013 pid_t tcgetpgrp(int fd);
1012 1014
1013 1015 /* tcgetsid.c */
1014 1016 pid_t tcgetsid(int fd);
1015 1017
1016 1018 /* tcsendbreak.c */
1017 1019 int tcsendbreak(int fildes, int duration);
1018 1020
1019 1021 /* tcsetattr.c */
1020 1022 int tcsetattr(int fildes, int optional_actions,
1021 1023 const struct termios *termios_p);
1022 1024
1023 1025 /* tcsetpgrp.c */
1024 1026 int tcsetpgrp(int fd, pid_t pgrp);
1025 1027
1026 1028 /* tell.c */
1027 1029 long tell(int f);
1028 1030
1029 1031 /* telldir.c */
1030 1032 long telldir(DIR *dirp);
1031 1033
1032 1034 /* tfind.c */
1033 1035 void *tfind(const void *ky, void *const *rtp, int (*compar)());
1034 1036
1035 1037 /* time_comm.c */
1036 1038 struct tm *localtime(const time_t *timep);
1037 1039 struct tm *localtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
1038 1040 struct tm *gmtime(const time_t *clock);
1039 1041 struct tm *gmtime_r(const time_t *_RESTRICT_KYWD, struct tm *_RESTRICT_KYWD);
1040 1042 double difftime(time_t time1, time_t time0);
1041 1043 time_t mktime(struct tm *timeptr);
1042 1044 void _ltzset(time_t tim);
1043 1045 void tzset(void);
1044 1046
1045 1047 /* time_data.c */
1046 1048
1047 1049 /* time_gdata.c */
1048 1050
1049 1051 /* tolower.c */
1050 1052 int tolower(int c);
1051 1053
1052 1054 /* toupper.c */
1053 1055 int toupper(int c);
1054 1056
1055 1057 /* truncate.c */
1056 1058 int ftruncate(int fildes, off_t len);
1057 1059 int truncate(const char *path, off_t len);
1058 1060
1059 1061 /* tsearch.c */
1060 1062 void *tsearch(const void *ky, void **rtp, int (*compar)());
1061 1063 void *tdelete(const void *ky, void **rtp, int (*compar)());
1062 1064 void twalk(const void *rt, void (*action)());
1063 1065
1064 1066 /* ttyname.c */
1065 1067 char *ttyname(int f);
1066 1068 char *_ttyname_dev(dev_t rdev, char *buffer, size_t buflen);
1067 1069 char *ttyname_r(int, char *, int);
1068 1070
1069 1071 /* ttyslot.c */
1070 1072 int ttyslot(void);
1071 1073
1072 1074 /* ualarm.c */
1073 1075 unsigned ualarm(unsigned usecs, unsigned reload);
1074 1076
1075 1077 /* ulimit.c */
1076 1078 /* VARARGS1 */
1077 1079 long ulimit(int cmd, ...);
1078 1080
1079 1081 /* scalls.c */
1080 1082 int usleep(unsigned n);
1081 1083
1082 1084 /* valloc.c */
1083 1085 void *valloc(size_t size);
1084 1086
1085 1087 /* waitpid.c */
1086 1088 pid_t wait(int *stat_loc);
1087 1089 pid_t waitpid(pid_t pid, int *stat_loc, int options);
1088 1090 pid_t wait3(int *status, int options, struct rusage *rp);
1089 1091 pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);
1090 1092
1091 1093 /* wcstombs.c */
1092 1094 size_t wcstombs(char *_RESTRICT_KYWD s, const wchar_t *_RESTRICT_KYWD pwcs,
1093 1095 size_t n);
1094 1096
1095 1097 /* wctomb.c */
1096 1098 int wctomb(char *s, wchar_t wchar);
1097 1099
1098 1100 /* wdata.c */
1099 1101
1100 1102 /* wisprint.c */
1101 1103 int wisprint(wchar_t c);
1102 1104
1103 1105 /* xgetwidth.c */
1104 1106 void _xgetwidth(void);
1105 1107
1106 1108 /*
1107 1109 * /usr/src/lib/libc/port/intl routines
1108 1110 */
1109 1111
1110 1112 /* gettext.c */
1111 1113 char *bindtextdomain(const char *domain, const char *binding);
1112 1114 char *dcgettext(const char *domain, const char *msg_id, const int category);
1113 1115 char *dgettext(const char *domain, const char *msg_id);
1114 1116 char *gettext(const char *msg_id);
1115 1117 char *textdomain(const char *domain);
1116 1118
1117 1119 /*
1118 1120 * /usr/src/lib/libc/port/print routines
1119 1121 */
1120 1122
1121 1123 /* fprintf.c */
1122 1124 /* VARARGS2 */
1123 1125 int fprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format, ...);
1124 1126
1125 1127 /* printf.c */
1126 1128 /* VARARGS1 */
1127 1129 int printf(const char *_RESTRICT_KYWD format, ...);
1128 1130
1129 1131 /* snprintf.c */
1130 1132 /* VARARGS2 */
1131 1133 int snprintf(char *_RESTRICT_KYWD string, size_t n,
1132 1134 const char *_RESTRICT_KYWD format, ...);
1133 1135
1134 1136 /* sprintf.c */
1135 1137 /* VARARGS2 */
1136 1138 int sprintf(char *_RESTRICT_KYWD string,
1137 1139 const char *_RESTRICT_KYWD format, ...);
1138 1140
1139 1141 /* vfprintf.c */
1140 1142 /* VARARGS2 */
1141 1143 int vfprintf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD format,
1142 1144 va_list);
1143 1145
1144 1146 /* vprintf.c */
1145 1147 /* VARARGS1 */
1146 1148 int vprintf(const char *_RESTRICT_KYWD format, va_list);
1147 1149
1148 1150 /* vsnprintf.c */
1149 1151 /* VARARGS2 */
1150 1152 int vsnprintf(char *_RESTRICT_KYWD string, size_t n,
1151 1153 const char *_RESTRICT_KYWD format, va_list);
1152 1154
1153 1155 /* vsprintf.c */
1154 1156 /* VARARGS2 */
1155 1157 int vsprintf(char *_RESTRICT_KYWD string, const char *_RESTRICT_KYWD format,
1156 1158 va_list);
1157 1159
1158 1160 /*
1159 1161 * /usr/src/lib/libc/port/regex routines
1160 1162 */
1161 1163
1162 1164 /* glob.c */
1163 1165 extern int glob(const char *restrict pattern, int flags,
1164 1166 int(*errfunc)(const char *epath, int eerrno), glob_t *restrict pglob);
1165 1167 extern void globfree(glob_t *pglob);
1166 1168
1167 1169 /* regex.c */
1168 1170 char *regex(const char *regexp, const char *stringp, ...);
1169 1171 #ifdef __loc1
1170 1172 #undef __loc1
1171 1173 #endif
1172 1174 char *__loc1;
1173 1175
1174 1176 /* regcmp.c */
1175 1177 char *regcmp(const char *regexp, ...);
1176 1178 #ifdef __i_size
1177 1179 #undef __i_size
1178 1180 #endif
1179 1181 int __i_size;
1180 1182
1181 1183 /*
1182 1184 * /usr/src/lib/libc/port/stdio routines
1183 1185 */
1184 1186
1185 1187 /* _filbuf.c */
1186 1188 int _filbuf(FILE *iop);
1187 1189
1188 1190 /* _flsbuf.c */
1189 1191 int _flsbuf(int ch, FILE *iop);
1190 1192
1191 1193 /* _wrtchk.c */
1192 1194 int _wrtchk(FILE *iop);
1193 1195
1194 1196 /* clearerr.c */
1195 1197 void clearerr(FILE *iop);
1196 1198
1197 1199 /* ctermid.c */
1198 1200 char *ctermid(char *s);
1199 1201 char *ctermid_r(char *s);
1200 1202
1201 1203 /* cuserid.c */
1202 1204 char *cuserid(char *s);
1203 1205
1204 1206 /* data.c */
1205 1207
1206 1208 /* doscan.c */
1207 1209 int _doscan(FILE *iop, const char *fmt, va_list va_alist);
1208 1210
1209 1211 /* fdopen.c */
1210 1212 FILE *fdopen(int fd, const char *type);
1211 1213
1212 1214 /* feof.c */
1213 1215 int feof(FILE *iop);
1214 1216
1215 1217 /* ferror.c */
1216 1218 int ferror(FILE *iop);
1217 1219
1218 1220 /* fgetc.c */
1219 1221 int fgetc(FILE *iop);
1220 1222
1221 1223 /* fgets.c */
1222 1224 char *fgets(char *_RESTRICT_KYWD buf, int size, FILE *_RESTRICT_KYWD iop);
1223 1225
1224 1226 /* fileno.c */
1225 1227 int _fileno(FILE *iop);
1226 1228
1227 1229 /* flush.c */
1228 1230 void _cleanup(void);
1229 1231 FILE *_findiop(void);
1230 1232 typedef unsigned char Uchar;
1231 1233 void _setbufend(FILE *iop, Uchar *end);
1232 1234 Uchar *_realbufend(FILE *iop);
1233 1235 void _bufsync(FILE *iop, Uchar *bufend);
1234 1236 int _xflsbuf(FILE *iop);
1235 1237 int fflush(FILE *iop);
1236 1238 int fclose(FILE *iop);
1237 1239
1238 1240 /* fopen.c */
1239 1241 FILE *fopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type);
1240 1242 FILE *freopen(const char *_RESTRICT_KYWD name, const char *_RESTRICT_KYWD type,
1241 1243 FILE *_RESTRICT_KYWD iop);
1242 1244
1243 1245 /* fpos.c */
1244 1246 int fgetpos(FILE *_RESTRICT_KYWD stream, fpos_t *_RESTRICT_KYWD pos);
1245 1247 int fsetpos(FILE *stream, const fpos_t *pos);
1246 1248
1247 1249 /* fputc.c */
1248 1250 int fputc(int ch, FILE *iop);
1249 1251
1250 1252 /* fputs.c */
1251 1253 int fputs(const char *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
1252 1254
1253 1255 /* fread.c */
1254 1256 size_t fread(void *_RESTRICT_KYWD ptr, size_t size, size_t count,
1255 1257 FILE *_RESTRICT_KYWD iop);
1256 1258
1257 1259 /* fseek.c */
1258 1260 int fseek(FILE *iop, long offset, int ptrname);
1259 1261
1260 1262 /* ftell.c */
1261 1263 long ftell(FILE *iop);
1262 1264
1263 1265 /* fwrite.c */
1264 1266 size_t fwrite(const void *_RESTRICT_KYWD ptr1, size_t size, size_t count,
1265 1267 FILE *_RESTRICT_KYWD iop);
1266 1268
1267 1269 /* getc.c */
1268 1270 int getc(FILE *iop);
1269 1271
1270 1272 /* getchar.c */
1271 1273 int getchar(void);
1272 1274
1273 1275 /* getpass.c */
1274 1276 char *getpass(const char *prompt);
1275 1277
1276 1278 /* getpass.c */
1277 1279 char *getpassphrase(const char *prompt);
1278 1280
1279 1281 /* gets.c */
1280 1282 char *gets(char *buf);
1281 1283
1282 1284 /* getw.c */
1283 1285 int getw(FILE *stream);
1284 1286
1285 1287 /* popen.c */
1286 1288 FILE *popen(const char *cmd, const char *mode);
1287 1289 int pclose(FILE *ptr);
1288 1290
1289 1291 /* putc.c */
1290 1292 int putc(int ch, FILE *iop);
1291 1293
1292 1294 /* putchar.c */
1293 1295 int putchar(int ch);
1294 1296
1295 1297 /* puts.c */
1296 1298 int puts(const char *ptr);
1297 1299
1298 1300 /* putw.c */
1299 1301 int putw(int w, FILE *stream);
1300 1302
1301 1303 /* rewind.c */
1302 1304 void rewind(FILE *iop);
1303 1305
1304 1306 /* scanf.c */
1305 1307 /* VARARGS1 */
1306 1308 int scanf(const char *_RESTRICT_KYWD fmt, ...);
1307 1309
1308 1310 /* VARARGS2 */
1309 1311 int fscanf(FILE *_RESTRICT_KYWD iop, const char *_RESTRICT_KYWD fmt, ...);
1310 1312
1311 1313 /* VARARGS2 */
1312 1314 int sscanf(const char *_RESTRICT_KYWD str, const char *_RESTRICT_KYWD fmt, ...);
1313 1315
1314 1316 /* setbuf.c */
1315 1317 void setbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf);
1316 1318
1317 1319 /* setvbuf.c */
1318 1320 int setvbuf(FILE *_RESTRICT_KYWD iop, char *_RESTRICT_KYWD abuf, int type,
1319 1321 size_t size);
1320 1322
1321 1323 /* system.c */
1322 1324 int system(const char *s);
1323 1325
1324 1326 /* tempnam.c */
1325 1327 char *tempnam(const char *dir, const char *pfx);
1326 1328
1327 1329 /* tmpfile.c */
1328 1330 FILE *tmpfile(void);
1329 1331
1330 1332 /* tmpnam.c */
1331 1333 char *tmpnam(char *s);
1332 1334 char *tmpnam_r(char *);
1333 1335
1334 1336 /* ungetc.c */
1335 1337 int ungetc(int c, FILE *iop);
1336 1338
1337 1339 /*
1338 1340 * /usr/src/lib/libc/port/sys routines
1339 1341 */
1340 1342
1341 1343 /* exacctsys.c */
1342 1344 size_t getacct(idtype_t idtype, id_t id, void *buf, size_t bufsize);
1343 1345 int putacct(idtype_t idtype, id_t id, void *buf, size_t bufsize, int flags);
1344 1346 int wracct(idtype_t idtype, id_t id, int flags);
1345 1347
1346 1348 /* execl.c */
1347 1349 /* VARARGS1 */
1348 1350 int execl(const char *name, const char *, ...);
1349 1351
1350 1352 /* execle.c */
1351 1353 int execle(const char *, const char *file, ...);
1352 1354
1353 1355 /* execv.c */
1354 1356 int execv(const char *file, char *const *argv);
1355 1357
1356 1358 /* lockf.c */
1357 1359 int lockf(int fildes, int function, off_t size);
1358 1360
1359 1361 /* meminfosys.c */
1360 1362 int meminfo(const uint64_t *inaddr, int addr_count, const uint_t *info_req,
1361 1363 int info_count, uint64_t *outdata, uint_t *validity);
1362 1364
1363 1365 /* msgsys.c */
1364 1366 int msgget(key_t key, int msgflg);
1365 1367 int msgctl(int msqid, int cmd, struct msqid_ds *buf);
1366 1368 ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
1367 1369 int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
1368 1370
1369 1371 /* nfssys.c */
1370 1372 /*
1371 1373 int exportfs(char *dir, struct export *ep);
1372 1374 int nfs_getfh(char *path, fhandle_t *fhp);
1373 1375 int nfssvc(int fd);
1374 1376 */
1375 1377
1376 1378 /* psetsys.c */
1377 1379 int pset_create(psetid_t *npset);
1378 1380 int pset_destroy(psetid_t pset);
1379 1381 int pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset);
1380 1382 int pset_assign_forced(psetid_t pset, processorid_t cpu, psetid_t *opset);
1381 1383 int pset_info(psetid_t pset, int *type, u_int *numcpus, processorid_t *cpulist);
1382 1384 int pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset);
1383 1385 int pset_bind_lwp(psetid_t pset, id_t id, pid_t, psetid_t *opset);
1384 1386
1385 1387
1386 1388 /* rctlsys.c */
1387 1389 int getrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
1388 1390 int flags);
1389 1391 int setrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk,
1390 1392 int flags);
1391 1393 /* (private functions) */
1392 1394 int setprojrctl(const char *name, rctlblk_t *new_rblk, size_t size, int flags);
1393 1395 int rctlctl(const char *, rctlblk_t *, int);
1394 1396 size_t rctllist(char *, size_t);
1395 1397
1396 1398
1397 1399 /* semsys.c */
1398 1400 int semctl(int semid, int semnum, int cmd, ...);
1399 1401 int semget(key_t key, int nsems, int semflg);
1400 1402 int semop(int semid, struct sembuf *sops, size_t nsops);
1401 1403
1402 1404 /* shmsys.c */
1403 1405 void *shmat(int shmid, const void *shmaddr, int shmflg);
1404 1406 int shmctl(int shmid, int cmd, struct shmid_ds *buf);
1405 1407 #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)
1406 1408 int shmdt(const void *);
1407 1409 #else
1408 1410 int shmdt(char *);
1409 1411 #endif /* defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4) */
1410 1412 int shmget(key_t key, size_t size, int shmflg);
1411 1413
1412 1414 /* tasksys.c */
1413 1415 taskid_t settaskid(projid_t project, uint_t flags);
1414 1416 taskid_t gettaskid(void);
1415 1417 projid_t getprojid(void);
1416 1418
1417 1419 /*
1418 1420 * /usr/src/lib/libc/port/widec routines
1419 1421 */
1420 1422
1421 1423 /* fgetws.c */
1422 1424 wchar_t *fgetws(wchar_t *_RESTRICT_KYWD ptr, int size,
1423 1425 FILE *_RESTRICT_KYWD iop);
1424 1426
1425 1427 /* fputwc.c */
1426 1428 wint_t fputwc(wint_t wc, FILE *iop);
1427 1429 wint_t putwc(wint_t wc, FILE *iop);
1428 1430
1429 1431 /* fputws.c */
1430 1432 int fputws(const wchar_t *_RESTRICT_KYWD ptr, FILE *_RESTRICT_KYWD iop);
1431 1433
1432 1434 /* getwchar.c */
1433 1435 wint_t getwchar(void);
1434 1436
1435 1437 /* getwidth.c */
1436 1438 void getwidth(eucwidth_t *eucstruct);
1437 1439
1438 1440 /* getws.c */
1439 1441 wchar_t *getws(wchar_t *ptr);
1440 1442
1441 1443 /* iswctype.c */
1442 1444 int iswctype(wint_t wc, wctype_t charclass);
1443 1445 int iswalpha(wint_t c);
1444 1446 int iswupper(wint_t c);
1445 1447 int iswlower(wint_t c);
1446 1448 int iswdigit(wint_t c);
1447 1449 int iswxdigit(wint_t c);
1448 1450 int iswalnum(wint_t c);
1449 1451 int iswspace(wint_t c);
1450 1452 int iswpunct(wint_t c);
1451 1453 int iswprint(wint_t c);
1452 1454 int iswgraph(wint_t c);
1453 1455 int iswcntrl(wint_t c);
1454 1456 int isphonogram(wint_t c);
1455 1457 int isideogram(wint_t c);
1456 1458 int isenglish(wint_t c);
1457 1459 int isnumber(wint_t c);
1458 1460 int isspecial(wint_t c);
1459 1461
1460 1462 /* libwcollate.c */
1461 1463
1462 1464 /* putwchar.c */
1463 1465 wint_t putwchar(wint_t c);
1464 1466
1465 1467 /* putws.c */
1466 1468 int putws(const wchar_t *ptr);
1467 1469
1468 1470 /* scrwidth.c */
1469 1471
1470 1472 /* strtows.c */
1471 1473 wchar_t *strtows(wchar_t *s1, char *s2);
1472 1474 char *wstostr(char *s1, wchar_t *s2);
1473 1475
1474 1476 /* trwctype.c */
1475 1477 wint_t towupper(wint_t c);
1476 1478 wint_t towlower(wint_t c);
1477 1479
1478 1480 /* ungetwc.c */
1479 1481 wint_t ungetwc(wint_t wc, FILE *iop);
1480 1482
1481 1483 /* wcollate.c */
1482 1484 size_t wcsxfrm(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
1483 1485 size_t n);
1484 1486 int wcscoll(const wchar_t *s1, const wchar_t *s2);
1485 1487
1486 1488 /* wcsftime.c */
1487 1489 #if !defined(__amd64) /* XX64 - fix me */
1488 1490 size_t wcsftime(wchar_t *wcs, size_t maxsize,
1489 1491 const char *format, const struct tm *timeptr);
1490 1492 #endif /* __amd64 */
1491 1493
1492 1494 /* wcstring.c */
1493 1495 wint_t fgetwc(FILE *iop);
1494 1496 wint_t getwc(FILE *iop);
1495 1497 int wcwidth(wchar_t wc);
1496 1498 int wcswidth(const wchar_t *pwcs, size_t n);
1497 1499
1498 1500 /* wcswcs.c */
1499 1501 wchar_t *wcswcs(const wchar_t *ws1, const wchar_t *ws2);
1500 1502
1501 1503 /* wcsxfrm.c - empty file! */
1502 1504
1503 1505 /* wcsxfrm.xpg4.c */
1504 1506
1505 1507 /* wisprint.c */
1506 1508 int wisprint(wchar_t c);
1507 1509
1508 1510 /* wscasecmp.c */
1509 1511 int wscasecmp(const wchar_t *s1, const wchar_t *s2);
1510 1512
1511 1513 /* wscat.c */
1512 1514 wchar_t *wcscat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
1513 1515 wchar_t *wscat(wchar_t *s1, const wchar_t *s2);
1514 1516
1515 1517 /* wschr.c */
1516 1518 wchar_t *wcschr(const wchar_t *sp, wchar_t c);
1517 1519 wchar_t *wschr(const wchar_t *sp, wchar_t c);
1518 1520
1519 1521 /* wscmp.c */
1520 1522 int wcscmp(const wchar_t *s1, const wchar_t *s2);
1521 1523 int wscmp(const wchar_t *s1, const wchar_t *s2);
1522 1524
1523 1525 /* wscol.c */
1524 1526 int wscol(const wchar_t *s1);
1525 1527
1526 1528 /* wscpy.c */
1527 1529 wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2);
1528 1530 wchar_t *wscpy(wchar_t *s1, const wchar_t *s2);
1529 1531
1530 1532 /* wscspn.c */
1531 1533 size_t wcscspn(const wchar_t *string, const wchar_t *charset);
1532 1534 size_t wscspn(const wchar_t *string, const wchar_t *charset);
1533 1535
1534 1536 /* wsdup.c */
1535 1537 wchar_t *wsdup(const wchar_t *s1);
1536 1538
1537 1539 /* wslen.c */
1538 1540 size_t wcslen(const wchar_t *s);
1539 1541 size_t wslen(const wchar_t *s);
1540 1542
1541 1543 /* wsncasecmp.c */
1542 1544 int wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
1543 1545
1544 1546 /* wsncat.c */
1545 1547 wchar_t *wcsncat(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
1546 1548 size_t n);
1547 1549 wchar_t *wsncat(wchar_t *s1, const wchar_t *s2, size_t n);
1548 1550
1549 1551 /* wsncmp.c */
1550 1552 int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
1551 1553 int wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
1552 1554
1553 1555 /* wsncpy.c */
1554 1556 wchar_t *wcsncpy(wchar_t *_RESTRICT_KYWD s1, const wchar_t *_RESTRICT_KYWD s2,
1555 1557 size_t n);
1556 1558 wchar_t *wsncpy(wchar_t *s1, const wchar_t *s2, size_t n);
1557 1559
1558 1560 /* wspbrk.c */
1559 1561 wchar_t *wcspbrk(const wchar_t *string, const wchar_t *brkset);
1560 1562 wchar_t *wspbrk(const wchar_t *string, const wchar_t *brkset);
1561 1563
1562 1564 /* wsprintf.c */
1563 1565 int wsprintf(wchar_t *wstring, const char *format, ...);
1564 1566
1565 1567 /* wsrchr.c */
1566 1568 wchar_t *wcsrchr(const wchar_t *sp, wchar_t c);
1567 1569 wchar_t *wsrchr(const wchar_t *sp, wchar_t c);
1568 1570
1569 1571 /* wsscanf.c */
1570 1572 int wsscanf(wchar_t *s, const char *format, ...);
1571 1573
1572 1574 /* wssize.c */
1573 1575
1574 1576 /* wsspn.c */
1575 1577 size_t wcsspn(const wchar_t *string, const wchar_t *charset);
1576 1578 size_t wsspn(const wchar_t *string, const wchar_t *charset);
1577 1579
1578 1580 /* wstod.c */
1579 1581 double wcstod(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
1580 1582 float wcstof(const wchar_t *_RESTRICT_KYWD cp, wchar_t **_RESTRICT_KYWD ptr);
1581 1583 long double wcstold(const wchar_t *_RESTRICT_KYWD cp,
1582 1584 wchar_t **_RESTRICT_KYWD ptr);
1583 1585 double wstod(const wchar_t *cp, wchar_t **ptr);
1584 1586
1585 1587 /* wstok.c */
1586 1588 #if !defined(__amd64) /* XX64 - fix me */
1587 1589 wchar_t *wcstok(wchar_t *string, const wchar_t *sepset);
1588 1590 wchar_t *wstok(wchar_t *string, const wchar_t *sepset);
1589 1591 #endif /* __amd64 */
1590 1592
1591 1593 /* wcstol.c */
1592 1594 long wcstol(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr,
1593 1595 int base);
1594 1596 long long wcstoll(const wchar_t *_RESTRICT_KYWD str,
1595 1597 wchar_t **_RESTRICT_KYWD ptr, int base);
1596 1598
1597 1599 /* wcstoul.c */
1598 1600 unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD str,
1599 1601 wchar_t **_RESTRICT_KYWD ptr, int base);
1600 1602 unsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD str,
1601 1603 wchar_t **_RESTRICT_KYWD ptr, int base);
1602 1604
1603 1605 /* wcstoimax.c */
1604 1606 intmax_t wcstoimax(const wchar_t *_RESTRICT_KYWD nptr,
1605 1607 wchar_t **_RESTRICT_KYWD endptr, int base);
1606 1608 uintmax_t wcstoumax(const wchar_t *_RESTRICT_KYWD nptr,
1607 1609 wchar_t **_RESTRICT_KYWD endptr, int base);
1608 1610
1609 1611 /* wstol.c */
1610 1612 long wstol(const wchar_t *str, wchar_t **ptr, int base);
1611 1613
1612 1614 /* wstoll.c */
1613 1615 long long wstoll(const wchar_t *str, wchar_t **ptr, int base);
1614 1616 long long watoll(const wchar_t *p);
1615 1617
1616 1618 /* wsxfrm.c */
1617 1619 size_t wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n);
1618 1620 int wscoll(const wchar_t *s1, const wchar_t *s2);
1619 1621
1620 1622 /*
1621 1623 * /usr/src/lib/libc/port/gen/event_port.c
1622 1624 */
1623 1625 int port_dispatch(int port, int flags, int source, int events, uintptr_t object,
1624 1626 void *user);
1625 1627
1626 1628 /*
1627 1629 * /usr/src/lib/libc/$MACH/gen routines
1628 1630 */
1629 1631
1630 1632 /* alloca.s */
1631 1633
1632 1634 void *__builtin_alloca(size_t);
1633 1635
1634 1636 /*
1635 1637 * modctl(int arg, ...) and utssys(...) are not available from a header
1636 1638 * file, but our utilities which make use of it should be able to be
1637 1639 * lint clean.
1638 1640 */
1639 1641 int modctl(int arg, ...);
1640 1642 int utssys(void *buf, int arg, int type, void *outbp);
1641 1643
1642 1644
1643 1645 typedef float single;
1644 1646 typedef unsigned extended[3];
1645 1647 typedef long double quadruple;
1646 1648 typedef unsigned fp_exception_field_type;
1647 1649
1648 1650 typedef char decimal_string[512];
1649 1651
1650 1652 enum fp_class_type {
1651 1653 fp_zero = 0,
1652 1654 fp_subnormal = 1,
1653 1655 fp_normal = 2,
1654 1656 fp_infinity = 3,
1655 1657 fp_quiet = 4,
1656 1658 fp_signaling = 5
1657 1659 };
1658 1660
1659 1661 enum fp_direction_type {
1660 1662 fp_nearest = 0,
1661 1663 fp_tozero = 1,
1662 1664 fp_positive = 2,
1663 1665 fp_negative = 3
1664 1666 };
1665 1667
1666 1668 typedef struct {
1667 1669 enum fp_class_type fpclass;
1668 1670 int sign;
1669 1671 int exponent;
1670 1672 decimal_string ds;
1671 1673 int more;
1672 1674 int ndigits;
1673 1675 } decimal_record;
1674 1676
1675 1677 enum decimal_form {
1676 1678 fixed_form,
1677 1679 floating_form
1678 1680 };
1679 1681
1680 1682 typedef struct {
1681 1683 enum fp_direction_type rd;
1682 1684 enum decimal_form df;
1683 1685 int ndigits;
1684 1686 } decimal_mode;
1685 1687
1686 1688 enum decimal_string_form {
1687 1689 invalid_form,
1688 1690 whitespace_form,
1689 1691 fixed_int_form,
1690 1692 fixed_intdot_form,
1691 1693 fixed_dotfrac_form,
1692 1694 fixed_intdotfrac_form,
1693 1695 floating_int_form,
1694 1696 floating_intdot_form,
1695 1697 floating_dotfrac_form,
1696 1698 floating_intdotfrac_form,
1697 1699 inf_form,
1698 1700 infinity_form,
1699 1701 nan_form,
1700 1702 nanstring_form
1701 1703 };
1702 1704
1703 1705 typedef int sigfpe_code_type;
1704 1706
1705 1707 typedef void (*sigfpe_handler_type)();
1706 1708
1707 1709 extern sigfpe_handler_type sigfpe(sigfpe_code_type, sigfpe_handler_type);
1708 1710
1709 1711 extern void single_to_decimal(single *, decimal_mode *, decimal_record *,
1710 1712 fp_exception_field_type *);
1711 1713
1712 1714 extern void double_to_decimal(double *, decimal_mode *, decimal_record *,
1713 1715 fp_exception_field_type *);
1714 1716 extern void extended_to_decimal(extended *, decimal_mode *,
1715 1717 decimal_record *, fp_exception_field_type *);
1716 1718 extern void quadruple_to_decimal(quadruple *, decimal_mode *,
1717 1719 decimal_record *, fp_exception_field_type *);
1718 1720 extern void decimal_to_single(single *, decimal_mode *, decimal_record *,
1719 1721 fp_exception_field_type *);
1720 1722 extern void decimal_to_double(double *, decimal_mode *, decimal_record *,
1721 1723 fp_exception_field_type *);
1722 1724 extern void decimal_to_extended(extended *, decimal_mode *,
1723 1725 decimal_record *, fp_exception_field_type *);
1724 1726 extern void decimal_to_quadruple(quadruple *, decimal_mode *,
1725 1727 decimal_record *, fp_exception_field_type *);
1726 1728 extern void string_to_decimal(char **, int, int, decimal_record *,
1727 1729 enum decimal_string_form *, char **);
1728 1730 extern void func_to_decimal(char **, int, int, decimal_record *,
1729 1731 enum decimal_string_form *, char **,
1730 1732 int (*)(void), int *, int (*)(int));
1731 1733 extern void file_to_decimal(char **, int, int, decimal_record *,
1732 1734 enum decimal_string_form *, char **,
1733 1735 FILE *, int *);
1734 1736 extern char *seconvert(single *, int, int *, int *, char *);
1735 1737 extern char *sfconvert(single *, int, int *, int *, char *);
1736 1738 extern char *sgconvert(single *, int, int, char *);
1737 1739 extern char *econvert(double, int, int *, int *, char *);
1738 1740 extern char *fconvert(double, int, int *, int *, char *);
1739 1741 extern char *gconvert(double, int, int, char *);
1740 1742 extern char *qeconvert(quadruple *, int, int *, int *, char *);
1741 1743 extern char *qfconvert(quadruple *, int, int *, int *, char *);
1742 1744 extern char *qgconvert(quadruple *, int, int, char *);
1743 1745
1744 1746 extern void __assert(const char *, const char *, int);
1745 1747
1746 1748 extern int setjmp(jmp_buf);
1747 1749 extern void longjmp(jmp_buf, int);
1748 1750 extern int sigsetjmp(sigjmp_buf, int);
1749 1751 extern void siglongjmp(sigjmp_buf, int);
1750 1752
1751 1753 int uname(struct utsname *);
1752 1754 int _uname(struct utsname *);
1753 1755
1754 1756 int errno;
1755 1757 int *___errno()
1756 1758 { return (&errno); }
1757 1759
1758 1760 extern int getloadavg(double [], int);
1759 1761
1760 1762 extern long pcsample(uintptr_t [], long);
1761 1763
1762 1764 int fstat(int, struct stat *);
1763 1765 int stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
1764 1766 int lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
1765 1767 int mknod(const char *, mode_t, dev_t);
1766 1768
1767 1769 extern int __init_daemon_priv(int, uid_t uid, gid_t gid, ...);
1768 1770 extern void __fini_daemon_priv(const char *, ...);
1769 1771 extern int __init_suid_priv(int, ...);
1770 1772 extern int __priv_bracket(priv_op_t);
1771 1773 extern void __priv_relinquish(void);
1772 1774 extern const char * __priv_getsetbynum(const void *, int);
1773 1775 extern char * __priv_set_to_str(void *, const priv_set_t *, char, int);
1774 1776
1775 1777 /* private interface to get the groups list for a certain user */
1776 1778 int _getgroupsbymember(const char *, gid_t[], int, int);
1777 1779
1778 1780 /* private interface for use only by java */
1779 1781 volatile sc_shared_t *volatile *_thr_schedctl(void);
1780 1782
1781 1783 /* private interface to unmount all autofs mounts */
1782 1784 int _autofssys(enum autofssys_op, void *);
1783 1785
1784 1786 /* label.c */
1785 1787 extern int is_system_labeled(void);
1786 1788
1787 1789 extern int uconv_u16tou32(const uint16_t *, size_t *, uint32_t *, size_t *,
1788 1790 int);
1789 1791 extern int uconv_u16tou8(const uint16_t *, size_t *, uchar_t *, size_t *, int);
1790 1792 extern int uconv_u32tou16(const uint32_t *, size_t *, uint16_t *, size_t *,
1791 1793 int);
1792 1794 extern int uconv_u32tou8(const uint32_t *, size_t *, uchar_t *, size_t *, int);
1793 1795 extern int uconv_u8tou16(const uchar_t *, size_t *, uint16_t *, size_t *, int);
1794 1796 extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int);
1795 1797 extern int u8_validate(char *, size_t, char **, int, int *);
1796 1798 extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *);
1797 1799 extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t,
1798 1800 int *);
1799 1801
1800 1802 /* private locale interfaces */
1801 1803 wint_t __nextwctype(wint_t, wctype_t);
1802 1804 int __iswrune(wint_t);
↓ open down ↓ |
1625 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX