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