4 # Generate the reentr.c and reentr.h,
5 # and optionally also the relevant metaconfig units (-U option).
15 A => "char*", # as an input argument
16 B => "char*", # as an output argument
17 C => "const char*", # as a read-only input argument
25 # (See the definitions after __DATA__.)
26 # In func|inc|type|... a "S" means "type*", and a "R" means "type**".
27 # (The "types" are often structs, such as "struct passwd".)
29 # After the prototypes one can have |X=...|Y=... to define more types.
30 # A commonly used extra type is to define D to be equal to "type_data",
31 # for example "struct_hostent_data to" go with "struct hostent".
33 # Example #1: I_XSBWR means int func_r(X, type, char*, size_t, type**)
34 # Example #2: S_SBIE means type func_r(type, char*, int, int*)
35 # Example #3: S_CBI means type func_r(const char*, char*, int)
38 die "reentr.h: $!" unless open(H, ">reentr.h");
44 * Copyright (c) 1997-2002, Larry Wall
46 * You may distribute under the terms of either the GNU General Public
47 * License or the Artistic License, as specified in the README file.
49 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
50 * This file is built by reentrl.pl from data in reentr.pl.
56 #ifdef USE_REENTRANT_API
58 /* Deprecations: some platforms have the said reentrant interfaces
59 * but they are declared obsolete and are not to be used. Often this
60 * means that the platform has threadsafed the interfaces (hopefully).
61 * All this is OS version dependent, so we are of course fooling ourselves.
62 * If you know of more deprecations on some platforms, please add your own. */
67 # undef HAS_ENDGRENT_R
68 # undef HAS_ENDPWENT_R
69 # undef HAS_GETGRENT_R
70 # undef HAS_GETPWENT_R
71 # undef HAS_SETLOCALE_R
73 # undef HAS_STRERROR_R
74 # define NETDB_R_OBSOLETE
77 #if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */
79 # undef HAS_STRERROR_R
80 # define NETDB_R_OBSOLETE
83 #ifdef NETDB_R_OBSOLETE
84 # undef HAS_ENDHOSTENT_R
85 # undef HAS_ENDNETENT_R
86 # undef HAS_ENDPROTOENT_R
87 # undef HAS_ENDSERVENT_R
88 # undef HAS_GETHOSTBYADDR_R
89 # undef HAS_GETHOSTBYNAME_R
90 # undef HAS_GETHOSTENT_R
91 # undef HAS_GETNETBYADDR_R
92 # undef HAS_GETNETBYNAME_R
93 # undef HAS_GETNETENT_R
94 # undef HAS_GETPROTOBYNAME_R
95 # undef HAS_GETPROTOBYNUMBER_R
96 # undef HAS_GETPROTOENT_R
97 # undef HAS_GETSERVBYNAME_R
98 # undef HAS_GETSERVBYPORT_R
99 # undef HAS_GETSERVENT_R
100 # undef HAS_SETHOSTENT_R
101 # undef HAS_SETNETENT_R
102 # undef HAS_SETPROTOENT_R
103 # undef HAS_SETSERVENT_R
116 # include <stdlib.h> /* drand48_data */
123 #ifdef HAS_GETSPNAM_R
131 my %seenh; # the different prototypes signatures for this function
132 my %seena; # the different prototypes signatures for this function in order
133 my @seenf; # all the seen functions
134 my %seenp; # the different prototype signatures for all functions
135 my %seent; # the return type of this function
136 my %seens; # the type of this function's "S"
137 my %seend; # the type of this function's "D"
138 my %seenu; # the length of the argument list of this function
140 while (<DATA>) { # Read in the protypes.
143 my ($func, $hdr, $type, @p) = split(/\s*\|\s*/, $_, -1);
145 # Split off the real function name and the argument list.
146 ($func, $u) = split(' ', $func);
147 $seenu{$func} = defined $u ? length $u : 0;
148 my $FUNC = uc $func; # for output.
156 # Set any special mapping variables (like X=x_t)
158 while ($p[-1] =~ /=/) {
159 my ($k, $v) = ($p[-1] =~ /^([A-Za-z])\s*=\s*(.*)/);
165 # If given the -U option open up the metaconfig unit for this function.
166 if ($opts{U} && open(U, ">d_${func}_r.U")) {
171 # The metaconfig units needs prerequisite dependencies.
175 if ($hdr ne 'stdio') { # There's no i_stdio.
178 $prereqsh = "\$$prereqs $prereqh";
180 my @prereq = qw(Inlibc Protochk Hasproto i_systypes usethreads);
181 push @prereq, $prereqs;
182 my $hdrs = "\$i_systypes sys/types.h define stdio.h $prereqsh";
183 if ($hdr eq 'time') {
184 $hdrs .= " \$i_systime sys/time.h";
185 push @prereq, 'i_systime';
187 # Output the metaconfig unit header.
189 ?RCS: \$Id: d_${func}_r.U,v $
191 ?RCS: Copyright (c) 2002 Jarkko Hietaniemi
193 ?RCS: You may distribute under the terms of either the GNU General Public
194 ?RCS: License or the Artistic License, as specified in the README file.
196 ?RCS: Generated by the reentr.pl from the Perl 5.8 distribution.
198 ?MAKE:d_${func}_r ${func}_r_proto: @prereq
199 ?MAKE: -pick add \$@ %<
201 ?S: This variable conditionally defines the HAS_${FUNC}_R symbol,
202 ?S: which indicates to the C program that the ${func}_r()
203 ?S: routine is available.
206 ?S: This variable encodes the prototype of ${func}_r.
207 ?S: It is zero if d_${func}_r is undef, and one of the
208 ?S: REENTRANT_PROTO_T_ABC macros of reentr.h if d_${func}_r
212 ?C: This symbol, if defined, indicates that the ${func}_r routine
213 ?C: is available to ${func} re-entrantly.
216 ?C: This symbol encodes the prototype of ${func}_r.
217 ?C: It is zero if d_${func}_r is undef, and one of the
218 ?C: REENTRANT_PROTO_T_ABC macros of reentr.h if d_${func}_r
221 ?H:#\$d_${func}_r HAS_${FUNC}_R /**/
222 ?H:#define ${FUNC}_R_PROTO \$${func}_r_proto /**/
224 ?T:try hdrs d_${func}_r_proto
225 ?LINT:set d_${func}_r
226 ?LINT:set ${func}_r_proto
227 : see if ${func}_r exists
228 set ${func}_r d_${func}_r
230 case "\$d_${func}_r" in
235 case "\$d_${func}_r_proto:\$usethreads" in
236 ":define") d_${func}_r_proto=define
237 set d_${func}_r_proto ${func}_r \$hdrs
241 case "\$d_${func}_r_proto" in
246 my ($r, $a) = ($p =~ /^(.)_(.+)/);
247 my $v = join(", ", map { $m{$_} } split '', $a);
250 case "\$${func}_r_proto" in
251 ''|0) try='$m{$r} ${func}_r($v);'
252 ./protochk "extern \$try" \$hdrs && ${func}_r_proto=$p ;;
256 $seenh{$func}->{$p}++;
257 push @{$seena{$func}}, $p;
259 $seent{$func} = $type;
260 $seens{$func} = $m{S};
261 $seend{$func} = $m{D};
265 case "\$${func}_r_proto" in
266 ''|0) d_${func}_r=undef
268 echo "Disabling ${func}_r, cannot determine prototype." >&4 ;;
269 * ) case "\$${func}_r_proto" in
271 *) ${func}_r_proto="REENTRANT_PROTO_\$${func}_r_proto" ;;
273 echo "Prototype: \$try" ;;
276 *) case "\$usethreads" in
277 define) echo "${func}_r has no prototype, not using it." >&4 ;;
295 # Prepare to continue writing the reentr.h.
300 # Write out all the known prototype signatures.
302 for my $p (sort keys %seenp) {
303 print "#define REENTRANT_PROTO_${p} ${i}\n";
308 my @struct; # REENTR struct members
309 my @size; # struct member buffer size initialization code
310 my @init; # struct member buffer initialization (malloc) code
311 my @free; # struct member buffer release (free) code
312 my @wrap; # the wrapper (foo(a) -> foo_r(a,...)) cpp code
313 my @define; # defines for optional features
317 join " || ", map { "${FUNC}_R_PROTO == REENTRANT_PROTO_$_" } @_;
330 New(31338, PL_reentrant_buffer->_${func}_buffer, PL_reentrant_buffer->_${func}_size, char);
333 Safefree(PL_reentrant_buffer->_${func}_buffer);
338 my ($n, $p, @F) = @_;
342 /* The @F using \L$n? */
348 my $HAS = "${FUNC}_R_HAS_$n";
350 my @h = grep { /$p/ } @{$seena{$func}};
351 unless (defined $GENFUNC) {
353 $GENFUNC =~ s/^GET//;
356 push @define, "#if defined(HAS_${FUNC}_R) && (" . join(" || ", map { "${FUNC}_R_PROTO == REENTRANT_PROTO_$_" } @h) . ")\n";
368 /* Any of the @F using \L$n? */
371 push @define, "#if (" . join(" || ", map { "defined($_)" } @H) . ")\n";
373 # define USE_${GENFUNC}_$n
375 # undef USE_${GENFUNC}_$n
381 define('BUFFER', 'B',
382 qw(getgrent getgrgid getgrnam));
385 qw(getgrent getgrgid getgrnam));
387 qw(getpwent getpwnam getpwuid));
389 qw(getspent getspnam));
392 qw(getgrent getgrgid getgrnam setgrent endgrent));
394 qw(getpwent getpwnam getpwuid setpwent endpwent));
396 define('BUFFER', 'B',
397 qw(getpwent getpwgid getpwnam));
400 qw(gethostent gethostbyaddr gethostbyname));
402 qw(getnetent getnetbyaddr getnetbyname));
404 qw(getprotoent getprotobyname getprotobynumber));
406 qw(getservent getservbyname getservbyport));
408 define('BUFFER', 'B',
409 qw(gethostent gethostbyaddr gethostbyname));
410 define('BUFFER', 'B',
411 qw(getnetent getnetbyaddr getnetbyname));
412 define('BUFFER', 'B',
413 qw(getprotoent getprotobyname getprotobynumber));
414 define('BUFFER', 'B',
415 qw(getservent getservbyname getservbyport));
418 qw(gethostent gethostbyaddr gethostbyname));
420 qw(getnetent getnetbyaddr getnetbyname));
422 # The following loop accumulates the "ssif" (struct, size, init, free)
423 # sections that declare the struct members (in reentr.h), and the buffer
424 # size initialization, buffer initialization (malloc), and buffer
425 # release (free) code (in reentr.c).
427 # The loop also contains a lot of intrinsic logic about groups of
428 # functions (since functions of certain kind operate the same way).
430 for my $func (@seenf) {
432 my $ifdef = "#ifdef HAS_${FUNC}_R\n";
433 my $endif = "#endif /* HAS_${FUNC}_R */\n";
434 if (exists $seena{$func}) {
435 my @p = @{$seena{$func}};
436 if ($func =~ /^(asctime|ctime|getlogin|setlocale|strerror|ttyname)$/) {
439 char* _${func}_buffer;
440 size_t _${func}_size;
443 PL_reentrant_buffer->_${func}_size = REENTRANTSMALLSIZE;
448 elsif ($func =~ /^(crypt)$/) {
451 #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
452 $seend{$func} _${func}_data;
454 $seent{$func} _${func}_struct;
459 PL_reentrant_buffer->_${func}_struct.initialized = 0;
464 elsif ($func =~ /^(drand48|gmtime|localtime|random)$/) {
467 $seent{$func} _${func}_struct;
469 if ($1 eq 'drand48') {
471 double _${func}_double;
476 elsif ($func =~ /^(getgrnam|getpwnam|getspnam)$/) {
478 # 'genfunc' can be read either as 'generic' or 'genre',
479 # it represents a group of functions.
481 $genfunc =~ s/nam/ent/g;
482 $genfunc =~ s/^get//;
483 my $GENFUNC = uc $genfunc;
485 $seent{$func} _${genfunc}_struct;
486 char* _${genfunc}_buffer;
487 size_t _${genfunc}_size;
490 # ifdef USE_${GENFUNC}_PTR
491 $seent{$func}* _${genfunc}_ptr;
494 if ($genfunc eq 'getspent') {
496 PL_reentrant_buffer->_${genfunc}_size = 1024;
500 # ifdef USE_${GENFUNC}_FPTR
501 FILE* _${genfunc}_fptr;
505 # ifdef USE_${GENFUNC}_FPTR
506 PL_reentrant_buffer->_${genfunc}_fptr = NULL;
509 my $sc = $genfunc eq 'getgrent' ?
510 '_SC_GETGR_R_SIZE_MAX' : '_SC_GETPW_R_SIZE_MAX';
511 my $sz = $genfunc eq 'getgrent' ?
512 '_grent_size' : '_pwent_size';
514 # if defined(HAS_SYSCONF) && defined($sc) && !defined(__GLIBC__)
515 PL_reentrant_buffer->_${genfunc}_size = sysconf($sc);
516 if (PL_reentrant_buffer->$sz == -1)
517 PL_reentrant_buffer->$sz = REENTRANTUSUALSIZE;
519 # if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
520 PL_reentrant_buffer->_${genfunc}_size = SIABUFSIZ;
523 PL_reentrant_buffer->_${genfunc}_size = BUFSIZ;
525 PL_reentrant_buffer->_${genfunc}_size = REENTRANTUSUALSIZE;
531 pushinitfree $genfunc;
534 elsif ($func =~ /^(gethostbyname|getnetbyname|getservbyname|getprotobyname)$/) {
537 $genfunc =~ s/byname/ent/;
538 $genfunc =~ s/^get//;
539 my $GENFUNC = uc $genfunc;
540 my $D = ifprotomatch($FUNC, grep {/D/} @p);
541 my $d = $seend{$func};
542 $d =~ s/\*$//; # snip: we need need the base type.
544 $seent{$func} _${genfunc}_struct;
548 char* _${genfunc}_buffer;
549 size_t _${genfunc}_size;
551 # ifdef USE_${GENFUNC}_PTR
552 $seent{$func}* _${genfunc}_ptr;
556 # ifdef USE_${GENFUNC}_ERRNO
557 int _${genfunc}_errno;
562 PL_reentrant_buffer->_${genfunc}_size = REENTRANTUSUALSIZE;
567 New(31338, PL_reentrant_buffer->_${genfunc}_buffer, PL_reentrant_buffer->_${genfunc}_size, char);
572 Safefree(PL_reentrant_buffer->_${genfunc}_buffer);
577 elsif ($func =~ /^(readdir|readdir64)$/) {
579 my $R = ifprotomatch($FUNC, grep {/R/} @p);
581 $seent{$func}* _${func}_struct;
582 size_t _${func}_size;
584 $seent{$func}* _${func}_ptr;
588 /* This is the size Solaris recommends.
589 * (though we go static, should use pathconf() instead) */
590 PL_reentrant_buffer->_${func}_size = sizeof($seent{$func}) + MAXPATHLEN + 1;
593 PL_reentrant_buffer->_${func}_struct = ($seent{$func}*)safemalloc(PL_reentrant_buffer->_${func}_size);
596 Safefree(PL_reentrant_buffer->_${func}_struct);
607 # Write out what we have learned.
610 my $v = join(", ", @v[0..$seenu{$func}-1]);
612 my ($r, $a) = split '_', $p;
613 my $test = $r eq 'I' ? ' == 0' : '';
616 if ($genfunc =~ /^(?:get|set|end)(pw|gr|host|net|proto|serv|sp)/) {
617 $genfunc = "${1}ent";
618 } elsif ($genfunc eq 'srand48') {
619 $genfunc = "drand48";
623 substr($b, 0, $seenu{$func}) = '';
625 $true = "PL_reentrant_buffer->_${genfunc}_ptr";
626 } elsif ($b =~ /T/ && $func eq 'drand48') {
627 $true = "PL_reentrant_buffer->_${genfunc}_double";
628 } elsif ($b =~ /S/) {
629 if ($func =~ /^readdir/) {
630 $true = "PL_reentrant_buffer->_${genfunc}_struct";
632 $true = "&PL_reentrant_buffer->_${genfunc}_struct";
634 } elsif ($b =~ /B/) {
635 $true = "PL_reentrant_buffer->_${genfunc}_buffer";
641 "&PL_reentrant_buffer->_${genfunc}_ptr" :
643 "&PL_reentrant_buffer->_${genfunc}_errno" :
645 "PL_reentrant_buffer->_${genfunc}_buffer" :
647 "PL_reentrant_buffer->_${genfunc}_size" :
649 "&PL_reentrant_buffer->_${genfunc}_fptr" :
651 "&PL_reentrant_buffer->_${genfunc}_data" :
653 ($func =~ /^readdir/ ?
654 "PL_reentrant_buffer->_${genfunc}_struct" :
655 "&PL_reentrant_buffer->_${genfunc}_struct" ) :
656 $_ eq 'T' && $func eq 'drand48' ?
657 "&PL_reentrant_buffer->_${genfunc}_double" :
660 $w = ", $w" if length $v;
662 my $call = "${func}_r($v$w)";
663 $call = "((errno = $call))" if $r eq 'I';
665 # if !defined($func) && ${FUNC}_R_PROTO == REENTRANT_PROTO_$p
667 if ($r eq 'V' || $r eq 'B') {
669 # define $func($v) $call
672 if ($func =~ /^get/) {
673 my $rv = $v ? ", $v" : "";
675 # define $func($v) ($call$test ? $true : (errno == ERANGE ? Perl_reentrant_retry("$func"$rv) : 0))
679 # define $func($v) ($call$test ? $true : 0)
688 push @wrap, $endif, "\n";
696 /* Defines for indicating which special features are supported. */
701 int dummy; /* cannot have empty structs */
707 #endif /* USE_REENTRANT_API */
715 # Prepare to write the reentr.c.
717 die "reentr.c: $!" unless open(C, ">reentr.c");
723 * Copyright (c) 1997-2002, Larry Wall
725 * You may distribute under the terms of either the GNU General Public
726 * License or the Artistic License, as specified in the README file.
728 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
729 * This file is built by reentrl.pl from data in reentr.pl.
731 * "Saruman," I said, standing away from him, "only one hand at a time can
732 * wield the One, and you know that well, so do not trouble to say we!"
737 #define PERL_IN_REENTR_C
742 Perl_reentrant_size(pTHX) {
743 #ifdef USE_REENTRANT_API
744 #define REENTRANTSMALLSIZE 256 /* Make something up. */
745 #define REENTRANTUSUALSIZE 4096 /* Make something up. */
747 #endif /* USE_REENTRANT_API */
751 Perl_reentrant_init(pTHX) {
752 #ifdef USE_REENTRANT_API
753 New(31337, PL_reentrant_buffer, 1, REENTR);
754 Perl_reentrant_size(aTHX);
756 #endif /* USE_REENTRANT_API */
760 Perl_reentrant_free(pTHX) {
761 #ifdef USE_REENTRANT_API
763 Safefree(PL_reentrant_buffer);
764 #endif /* USE_REENTRANT_API */
768 Perl_reentrant_retry(const char *f, ...)
772 #ifdef USE_REENTRANT_API
773 # if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SRVENT_BUFFER)
776 # if defined(USE_SERVENT_BUFFER)
779 # if defined(USE_HOSTENT_BUFFER)
782 # if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
789 #define REENTRANTHALFMAXSIZE 32768 /* The maximum may end up twice this. */
791 switch (PL_op->op_type) {
792 #ifdef USE_HOSTENT_BUFFER
797 if (PL_reentrant_buffer->_hostent_size <= REENTRANTHALFMAXSIZE) {
798 PL_reentrant_buffer->_hostent_size *= 2;
799 Renew(PL_reentrant_buffer->_hostent_buffer,
800 PL_reentrant_buffer->_hostent_size, char);
801 switch (PL_op->op_type) {
803 p0 = va_arg(ap, void *);
804 asize = va_arg(ap, size_t);
805 anint = va_arg(ap, int);
806 retptr = gethostbyaddr(p0, asize, anint); break;
808 p0 = va_arg(ap, void *);
809 retptr = gethostbyname(p0); break;
811 retptr = gethostent(); break;
819 #ifdef USE_GRENT_BUFFER
824 if (PL_reentrant_buffer->_grent_size <= REENTRANTHALFMAXSIZE) {
826 PL_reentrant_buffer->_grent_size *= 2;
827 Renew(PL_reentrant_buffer->_grent_buffer,
828 PL_reentrant_buffer->_grent_size, char);
829 switch (PL_op->op_type) {
831 p0 = va_arg(ap, void *);
832 retptr = getgrnam(p0); break;
834 gid = va_arg(ap, Gid_t);
835 retptr = getgrgid(gid); break;
837 retptr = getgrent(); break;
845 #ifdef USE_NETENT_BUFFER
850 if (PL_reentrant_buffer->_netent_size <= REENTRANTHALFMAXSIZE) {
852 PL_reentrant_buffer->_netent_size *= 2;
853 Renew(PL_reentrant_buffer->_netent_buffer,
854 PL_reentrant_buffer->_netent_size, char);
855 switch (PL_op->op_type) {
857 net = va_arg(ap, Netdb_net_t);
858 anint = va_arg(ap, int);
859 retptr = getnetbyaddr(net, anint); break;
861 p0 = va_arg(ap, void *);
862 retptr = getnetbyname(p0); break;
864 retptr = getnetent(); break;
872 #ifdef USE_PWENT_BUFFER
877 if (PL_reentrant_buffer->_pwent_size <= REENTRANTHALFMAXSIZE) {
879 PL_reentrant_buffer->_pwent_size *= 2;
880 Renew(PL_reentrant_buffer->_pwent_buffer,
881 PL_reentrant_buffer->_pwent_size, char);
882 switch (PL_op->op_type) {
884 p0 = va_arg(ap, void *);
885 retptr = getpwnam(p0); break;
887 uid = va_arg(ap, Uid_t);
888 retptr = getpwuid(uid); break;
890 retptr = getpwent(); break;
898 #ifdef USE_PROTOENT_BUFFER
903 if (PL_reentrant_buffer->_protoent_size <= REENTRANTHALFMAXSIZE) {
904 PL_reentrant_buffer->_protoent_size *= 2;
905 Renew(PL_reentrant_buffer->_protoent_buffer,
906 PL_reentrant_buffer->_protoent_size, char);
907 switch (PL_op->op_type) {
909 p0 = va_arg(ap, void *);
910 retptr = getprotobyname(p0); break;
912 anint = va_arg(ap, int);
913 retptr = getprotobynumber(anint); break;
915 retptr = getprotoent(); break;
923 #ifdef USE_SERVENT_BUFFER
928 if (PL_reentrant_buffer->_servent_size <= REENTRANTHALFMAXSIZE) {
929 PL_reentrant_buffer->_servent_size *= 2;
930 Renew(PL_reentrant_buffer->_servent_buffer,
931 PL_reentrant_buffer->_servent_size, char);
932 switch (PL_op->op_type) {
934 p0 = va_arg(ap, void *);
935 p1 = va_arg(ap, void *);
936 retptr = getservbyname(p0, p1); break;
938 anint = va_arg(ap, int);
939 p0 = va_arg(ap, void *);
940 retptr = getservbyport(anint, p0); break;
942 retptr = getservent(); break;
951 /* Not known how to retry, so just fail. */
963 asctime S |time |const struct tm|B_SB|B_SBI|I_SB|I_SBI
964 crypt CC |crypt |struct crypt_data|B_CCS|B_CCD|D=CRYPTD*
965 ctermid B |stdio | |B_B
966 ctime S |time |const time_t |B_SB|B_SBI|I_SB|I_SBI
967 drand48 |stdlib |struct drand48_data |I_ST|T=double*
968 endgrent |grp | |I_H|V_H
969 endhostent |netdb | |I_D|V_D|D=struct hostent_data*
970 endnetent |netdb | |I_D|V_D|D=struct netent_data*
971 endprotoent |netdb | |I_D|V_D|D=struct protoent_data*
972 endpwent |pwd | |I_H|V_H
973 endservent |netdb | |I_D|V_D|D=struct servent_data*
974 getgrent |grp |struct group |I_SBWR|I_SBIR|S_SBW|S_SBI|I_SBI|I_SBIH
975 getgrgid T |grp |struct group |I_TSBWR|I_TSBIR|I_TSBI|S_TSBI|T=gid_t
976 getgrnam C |grp |struct group |I_CSBWR|I_CSBIR|S_CBI|I_CSBI|S_CSBI
977 gethostbyaddr CWI |netdb |struct hostent |I_CWISBWRE|S_CWISBWIE|S_CWISBIE|S_TWISBIE|S_CIISBIE|S_CSBIE|S_TSBIE|I_CWISD|I_CIISD|I_CII|D=struct hostent_data*|T=const void*
978 gethostbyname C |netdb |struct hostent |I_CSBWRE|S_CSBIE|I_CSD|D=struct hostent_data*
979 gethostent |netdb |struct hostent |I_SBWRE|I_SBIE|S_SBIE|S_SBI|I_SBI|I_SD|D=struct hostent_data*
980 getlogin |unistd | |I_BW|I_BI|B_BW|B_BI
981 getnetbyaddr LI |netdb |struct netent |I_UISBWRE|I_LISBI|S_TISBI|S_LISBI|I_TISD|I_LISD|I_IISD|D=struct netent_data*|T=in_addr_t|U=unsigned long
982 getnetbyname C |netdb |struct netent |I_CSBWRE|I_CSBI|S_CSBI|I_CSD|D=struct netent_data*
983 getnetent |netdb |struct netent |I_SBWRE|I_SBIE|S_SBIE|S_SBI|I_SBI|I_SD|D=struct netent_data*
984 getprotobyname C|netdb |struct protoent|I_CSBWR|S_CSBI|I_CSD|D=struct protoent_data*
985 getprotobynumber I |netdb |struct protoent|I_ISBWR|S_ISBI|I_ISD|D=struct protoent_data*
986 getprotoent |netdb |struct protoent|I_SBWR|I_SBI|S_SBI|I_SD|D=struct protoent_data*
987 getpwent |pwd |struct passwd |I_SBWR|I_SBIR|S_SBW|S_SBI|I_SBI|I_SBIH
988 getpwnam C |pwd |struct passwd |I_CSBWR|I_CSBIR|S_CSBI|I_CSBI
989 getpwuid T |pwd |struct passwd |I_TSBWR|I_TSBIR|I_TSBI|S_TSBI|T=uid_t
990 getservbyname CC|netdb |struct servent |I_CCSBWR|S_CCSBI|I_CCSD|D=struct servent_data*
991 getservbyport IC|netdb |struct servent |I_ICSBWR|S_ICSBI|I_ICSD|D=struct servent_data*
992 getservent |netdb |struct servent |I_SBWR|I_SBI|S_SBI|I_SD|D=struct servent_data*
993 getspnam C |shadow |struct spwd |I_CSBWR|S_CSBI
994 gmtime T |time |struct tm |S_TS|I_TS|T=const time_t*
995 localtime T |time |struct tm |S_TS|I_TS|T=const time_t*
996 random |stdlib |struct random_data|I_TS|T=int*
997 readdir T |dirent |struct dirent |I_TSR|I_TS|T=DIR*
998 readdir64 T |dirent |struct dirent64|I_TSR|I_TS|T=DIR*
999 setgrent |grp | |I_H|V_H
1000 sethostent I |netdb | |I_ID|V_ID|D=struct hostent_data*
1001 setlocale IC |locale | |I_ICBI
1002 setnetent I |netdb | |I_ID|V_ID|D=struct netent_data*
1003 setprotoent I |netdb | |I_ID|V_ID|D=struct protoent_data*
1004 setpwent |pwd | |I_H|V_H
1005 setservent I |netdb | |I_ID|V_ID|D=struct servent_data*
1006 srand48 L |stdlib |struct drand48_data |I_LS
1007 srandom T |stdlib |struct random_data|I_TS|T=unsigned int
1008 strerror I |string | |I_IBW|I_IBI|B_IBW
1009 tmpnam B |stdio | |B_B
1010 ttyname I |unistd | |I_IBW|I_IBI|B_IBI