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