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