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