This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
merge changes 1424, 1428 from maintbranch
[perl5.git] / opcode.pl
CommitLineData
79072805
LW
1#!/usr/bin/perl
2
36477c24 3unlink "opcode.h";
79072805
LW
4open(OC, ">opcode.h") || die "Can't create opcode.h: $!\n";
5select OC;
6
7# Read data.
8
9while (<DATA>) {
10 chop;
11 next unless $_;
12 next if /^#/;
c07a80fd 13 ($key, $desc, $check, $flags, $args) = split(/\t+/, $_, 5);
14
15 warn qq[Description "$desc" duplicates $seen{$desc}\n] if $seen{$desc};
16 die qq[Opcode "$key" duplicates $seen{$key}\n] if $seen{$key};
17 $seen{$desc} = qq[description of opcode "$key"];
18 $seen{$key} = qq[opcode "$key"];
19
79072805 20 push(@ops, $key);
c07a80fd 21 $desc{$key} = $desc;
79072805
LW
22 $check{$key} = $check;
23 $ckname{$check}++;
24 $flags{$key} = $flags;
25 $args{$key} = $args;
26}
27
28# Emit defines.
29
30$i = 0;
748a9306
LW
31print <<"END";
32#define pp_i_preinc pp_preinc
33#define pp_i_predec pp_predec
34#define pp_i_postinc pp_postinc
35#define pp_i_postdec pp_postdec
36
37typedef enum {
38END
79072805
LW
39for (@ops) {
40 print "\t", &tab(3,"OP_\U$_,"), "/* ", $i++, " */\n";
41}
85e6fe83 42print "\t", &tab(3,"OP_max"), "\n";
79072805
LW
43print "} opcode;\n";
44print "\n#define MAXO ", scalar @ops, "\n\n";
45
c07a80fd 46# Emit op names and descriptions.
79072805
LW
47
48print <<END;
49#ifndef DOINIT
a0d0e21e 50EXT char *op_name[];
79072805 51#else
a0d0e21e 52EXT char *op_name[] = {
79072805
LW
53END
54
55for (@ops) {
c07a80fd 56 print qq(\t"$_",\n);
57}
58
59print <<END;
60};
61#endif
62
63END
64
65print <<END;
66#ifndef DOINIT
67EXT char *op_desc[];
68#else
69EXT char *op_desc[] = {
70END
71
72for (@ops) {
73 print qq(\t"$desc{$_}",\n);
79072805
LW
74}
75
76print <<END;
77};
78#endif
79
5d11ae5e 80#ifndef PERL_OBJECT
aeea060c
NIS
81START_EXTERN_C
82
79072805
LW
83END
84
85# Emit function declarations.
86
87for (sort keys %ckname) {
11343788 88 print "OP *\t", &tab(3,$_),"_((OP* o));\n";
79072805
LW
89}
90
91print "\n";
92
93for (@ops) {
db173bac 94 print "OP *\t", &tab(3, "pp_$_"), "_((ARGSproto));\n";
79072805
LW
95}
96
97# Emit ppcode switch array.
98
99print <<END;
100
aeea060c 101END_EXTERN_C
5d11ae5e 102#endif /* PERL_OBJECT */
aeea060c 103
79072805 104#ifndef DOINIT
5d11ae5e 105EXT OP * (CPERLscope(*ppaddr)[])(ARGSproto);
79072805 106#else
5d11ae5e
SM
107#ifndef PERL_OBJECT
108EXT OP * (CPERLscope(*ppaddr)[])(ARGSproto) = {
79072805
LW
109END
110
111for (@ops) {
db173bac 112 print "\tpp_$_,\n";
79072805
LW
113}
114
115print <<END;
116};
5d11ae5e 117#endif /* PERL_OBJECT */
79072805
LW
118#endif
119
120END
121
122# Emit check routines.
123
124print <<END;
125#ifndef DOINIT
5d11ae5e 126EXT OP * (CPERLscope(*check)[]) _((OP *op));
79072805 127#else
5d11ae5e
SM
128#ifndef PERL_OBJECT
129EXT OP * (CPERLscope(*check)[]) _((OP *op)) = {
79072805
LW
130END
131
132for (@ops) {
db173bac 133 print "\t", &tab(3, "$check{$_},"), "/* $_ */\n";
79072805
LW
134}
135
136print <<END;
137};
5d11ae5e 138#endif /* PERL_OBJECT */
79072805
LW
139#endif
140
141END
142
143# Emit allowed argument types.
144
145print <<END;
146#ifndef DOINIT
147EXT U32 opargs[];
148#else
a0d0e21e 149EXT U32 opargs[] = {
79072805
LW
150END
151
152%argnum = (
153 S, 1, # scalar
154 L, 2, # list
155 A, 3, # array value
156 H, 4, # hash value
157 C, 5, # code value
158 F, 6, # file value
159 R, 7, # scalar reference
160);
161
db173bac
MB
162%opclass = (
163 '0', 0, # baseop
164 '1', 1, # unop
165 '2', 2, # binop
166 '|', 3, # logop
167 '?', 4, # condop
168 '@', 5, # listop
169 '/', 6, # pmop
170 '$', 7, # svop
171 '*', 8, # gvop
172 '"', 9, # pvop
173 '{', 10, # loop
174 ';', 11, # cop
175 '%', 12, # baseop_or_unop
176 '-', 13, # filestatop
177 '}', 14, # loopexop
178);
179
79072805
LW
180for (@ops) {
181 $argsum = 0;
182 $flags = $flags{$_};
183 $argsum |= 1 if $flags =~ /m/; # needs stack mark
184 $argsum |= 2 if $flags =~ /f/; # fold constants
185 $argsum |= 4 if $flags =~ /s/; # always produces scalar
186 $argsum |= 8 if $flags =~ /t/; # needs target scalar
187 $argsum |= 16 if $flags =~ /i/; # always produces integer
188 $argsum |= 32 if $flags =~ /I/; # has corresponding int op
189 $argsum |= 64 if $flags =~ /d/; # danger, unknown side effects
a0d0e21e 190 $argsum |= 128 if $flags =~ /u/; # defaults to $_
db173bac
MB
191
192 $flags =~ /([^a-zA-Z])/ or die qq[Opcode "$_" has no class indicator];
db173bac
MB
193 $argsum |= $opclass{$1} << 8;
194 $mul = 4096; # 2 ^ OASHIFT
79072805
LW
195 for $arg (split(' ',$args{$_})) {
196 $argnum = ($arg =~ s/\?//) ? 8 : 0;
197 $argnum += $argnum{$arg};
198 $argsum += $argnum * $mul;
199 $mul <<= 4;
200 }
201 $argsum = sprintf("0x%08x", $argsum);
db173bac 202 print "\t", &tab(3, "$argsum,"), "/* $_ */\n";
79072805
LW
203}
204
205print <<END;
206};
207#endif
208END
209
735e0d5c
IZ
210close OC or die "Error closing opcode.h: $!";
211
2cd61cdb 212unlink "pp_proto.h";
735e0d5c
IZ
213open PP, '>pp_proto.h' or die "Error creating pp_proto.h: $!";
214for (@ops) {
15e52e56 215 next if /^i_(pre|post)(inc|dec)$/;
735e0d5c
IZ
216 print PP "PPDEF(pp_$_)\n";
217}
218
219close PP or die "Error closing pp_proto.h: $!";
220
79072805
LW
221###########################################################################
222sub tab {
223 local($l, $t) = @_;
224 $t .= "\t" x ($l - (length($t) + 1) / 8);
225 $t;
226}
227###########################################################################
228__END__
229
230# Nothing.
231
232null null operation ck_null 0
93a17b20 233stub stub ck_null 0
db173bac 234scalar scalar ck_fun s% S
79072805
LW
235
236# Pushy stuff.
237
db173bac
MB
238pushmark pushmark ck_null s0
239wantarray wantarray ck_null is0
79072805 240
db173bac 241const constant item ck_svconst s$
79072805 242
db173bac
MB
243gvsv scalar variable ck_null ds*
244gv glob value ck_null ds*
245gelem glob elem ck_null d2 S S
246padsv private variable ck_null ds0
247padav private array ck_null d0
248padhv private hash ck_null d0
249padany private something ck_null d0
79072805 250
db173bac 251pushre push regexp ck_null /
79072805
LW
252
253# References and stuff.
254
db173bac
MB
255rv2gv ref-to-glob cast ck_rvconst ds1
256rv2sv scalar deref ck_rvconst ds1
257av2arylen array length ck_null is1
258rv2cv subroutine deref ck_rvconst d1
259anoncode anonymous subroutine ck_anoncode $
260prototype subroutine prototype ck_null s% S
5d11ae5e
SM
261refgen reference constructor ck_spair m1 L
262srefgen scalar ref constructor ck_null fs1 S
db173bac
MB
263ref reference-type operator ck_fun stu% S?
264bless bless ck_fun s@ S S?
79072805
LW
265
266# Pushy I/O.
267
db173bac 268backtick backticks ck_null t%
0a753a76 269# glob defaults its first arg to $_
db173bac
MB
270glob glob ck_glob t@ S? S?
271readline <HANDLE> ck_null t%
272rcatline append I/O operator ck_null t%
79072805
LW
273
274# Bindable operators.
275
db173bac 276regcmaybe regexp comp once ck_fun s1 S
2cd61cdb 277regcreset regexp reset interpolation flag ck_fun s1 S
db173bac
MB
278regcomp regexp compilation ck_null s| S
279match pattern match ck_match d/
280subst substitution ck_null dis/ S
281substcont substitution cont ck_null dis|
282trans character translation ck_null is" S
79072805
LW
283
284# Lvalue operators.
db173bac
MB
285# sassign is special-cased for op class
286
287sassign scalar assignment ck_null s0
288aassign list assignment ck_null t2 L L
289
290chop chop ck_spair mts% L
291schop scalar chop ck_null stu% S?
292chomp safe chop ck_spair mts% L
293schomp scalar safe chop ck_null stu% S?
294defined defined operator ck_rfun isu% S?
295undef undef operator ck_lfun s% S?
296study study ck_fun su% S?
297pos match position ck_lfun stu% S?
298
299preinc preincrement ck_lfun dIs1 S
300i_preinc integer preincrement ck_lfun dis1 S
301predec predecrement ck_lfun dIs1 S
302i_predec integer predecrement ck_lfun dis1 S
303postinc postincrement ck_lfun dIst1 S
304i_postinc integer postincrement ck_lfun dist1 S
305postdec postdecrement ck_lfun dIst1 S
306i_postdec integer postdecrement ck_lfun dist1 S
79072805
LW
307
308# Ordinary operators.
309
db173bac
MB
310pow exponentiation ck_null fst2 S S
311
312multiply multiplication ck_null Ifst2 S S
313i_multiply integer multiplication ck_null ifst2 S S
314divide division ck_null Ifst2 S S
315i_divide integer division ck_null ifst2 S S
316modulo modulus ck_null Iifst2 S S
317i_modulo integer modulus ck_null ifst2 S S
318repeat repeat ck_repeat mt2 L S
319
320add addition ck_null Ifst2 S S
321i_add integer addition ck_null ifst2 S S
322subtract subtraction ck_null Ifst2 S S
323i_subtract integer subtraction ck_null ifst2 S S
324concat concatenation ck_concat fst2 S S
325stringify string ck_fun fst@ S
326
327left_shift left bitshift ck_bitop fst2 S S
328right_shift right bitshift ck_bitop fst2 S S
329
330lt numeric lt ck_null Iifs2 S S
331i_lt integer lt ck_null ifs2 S S
332gt numeric gt ck_null Iifs2 S S
333i_gt integer gt ck_null ifs2 S S
334le numeric le ck_null Iifs2 S S
335i_le integer le ck_null ifs2 S S
336ge numeric ge ck_null Iifs2 S S
337i_ge integer ge ck_null ifs2 S S
338eq numeric eq ck_null Iifs2 S S
339i_eq integer eq ck_null ifs2 S S
340ne numeric ne ck_null Iifs2 S S
341i_ne integer ne ck_null ifs2 S S
342ncmp spaceship operator ck_null Iifst2 S S
343i_ncmp integer spaceship ck_null ifst2 S S
344
345slt string lt ck_scmp ifs2 S S
346sgt string gt ck_scmp ifs2 S S
347sle string le ck_scmp ifs2 S S
348sge string ge ck_scmp ifs2 S S
349seq string eq ck_null ifs2 S S
350sne string ne ck_null ifs2 S S
351scmp string comparison ck_scmp ifst2 S S
352
353bit_and bitwise and ck_bitop fst2 S S
354bit_xor bitwise xor ck_bitop fst2 S S
355bit_or bitwise or ck_bitop fst2 S S
356
357negate negate ck_null Ifst1 S
358i_negate integer negate ck_null ifst1 S
359not not ck_null ifs1 S
360complement 1's complement ck_bitop fst1 S
79072805
LW
361
362# High falutin' math.
363
db173bac
MB
364atan2 atan2 ck_fun fst@ S S
365sin sin ck_fun fstu% S?
366cos cos ck_fun fstu% S?
367rand rand ck_fun st% S?
368srand srand ck_fun s% S?
369exp exp ck_fun fstu% S?
370log log ck_fun fstu% S?
371sqrt sqrt ck_fun fstu% S?
79072805 372
cf26c822
CS
373# Lowbrow math.
374
db173bac
MB
375int int ck_fun fstu% S?
376hex hex ck_fun fstu% S?
377oct oct ck_fun fstu% S?
378abs abs ck_fun fstu% S?
79072805
LW
379
380# String stuff.
381
db173bac 382length length ck_lengthconst istu% S?
7b8d334a 383substr substr ck_fun st@ S S S? S?
db173bac 384vec vec ck_fun ist@ S S S
79072805 385
db173bac
MB
386index index ck_index ist@ S S S?
387rindex rindex ck_index ist@ S S S?
79072805 388
db173bac
MB
389sprintf sprintf ck_fun_locale mfst@ S L
390formline formline ck_fun ms@ S L
391ord ord ck_fun ifstu% S?
392chr chr ck_fun fstu% S?
393crypt crypt ck_fun fst@ S S
394ucfirst upper case first ck_fun_locale fstu% S?
395lcfirst lower case first ck_fun_locale fstu% S?
396uc upper case ck_fun_locale fstu% S?
397lc lower case ck_fun_locale fstu% S?
398quotemeta quote metachars ck_fun fstu% S?
79072805
LW
399
400# Arrays.
401
db173bac
MB
402rv2av array deref ck_rvconst dt1
403aelemfast known array element ck_null s* A S
404aelem array element ck_null s2 A S
405aslice array slice ck_null m@ A L
79072805 406
aa689395 407# Hashes.
79072805 408
db173bac
MB
409each each ck_fun t% H
410values values ck_fun t% H
411keys keys ck_fun t% H
412delete delete ck_delete % S
413exists exists operator ck_exists is% S
414rv2hv hash deref ck_rvconst dt1
415helem hash elem ck_null s2@ H S
416hslice hash slice ck_null m@ H L
79072805
LW
417
418# Explosives and implosives.
419
db173bac
MB
420unpack unpack ck_fun @ S S
421pack pack ck_fun mst@ S L
422split split ck_split t@ S S S
423join join ck_fun mst@ S L
79072805
LW
424
425# List operators.
426
db173bac
MB
427list list ck_null m@ L
428lslice list slice ck_null 2 H L L
429anonlist anonymous list ck_fun ms@ L
430anonhash anonymous hash ck_fun ms@ L
79072805 431
db173bac
MB
432splice splice ck_fun m@ A S? S? L
433push push ck_fun imst@ A L
434pop pop ck_shift si% A
435shift shift ck_shift s% A
436unshift unshift ck_fun imst@ A L
437sort sort ck_sort m@ C? L
438reverse reverse ck_fun mt@ L
79072805 439
db173bac
MB
440grepstart grep ck_grep dm@ C L
441grepwhile grep iterator ck_null dt|
79072805 442
db173bac
MB
443mapstart map ck_grep dm@ C L
444mapwhile map iterator ck_null dt|
a0d0e21e 445
79072805
LW
446# Range stuff.
447
db173bac
MB
448range flipflop ck_null ? S S
449flip range (or flip) ck_null 1 S S
450flop range (or flop) ck_null 1
79072805
LW
451
452# Control.
453
db173bac
MB
454and logical and ck_null |
455or logical or ck_null |
456xor logical xor ck_null fs| S S
457cond_expr conditional expression ck_null d?
458andassign logical and assignment ck_null s|
459orassign logical or assignment ck_null s|
460
461method method lookup ck_null d1
462entersub subroutine entry ck_subr dmt1 L
463leavesub subroutine exit ck_null 1
464caller caller ck_fun t% S?
465warn warn ck_fun imst@ L
466die die ck_fun dimst@ L
467reset reset ck_fun is% S?
468
469lineseq line sequence ck_null @
470nextstate next statement ck_null s;
471dbstate debug next statement ck_null s;
472unstack unstack ck_null s0
79072805 473enter block entry ck_null 0
db173bac
MB
474leave block exit ck_null @
475scope block ck_null @
476enteriter foreach loop entry ck_null d{
79072805 477iter foreach loop iterator ck_null 0
db173bac
MB
478enterloop loop entry ck_null d{
479leaveloop loop exit ck_null 2
480return return ck_null dm@ L
481last last ck_null ds}
482next next ck_null ds}
483redo redo ck_null ds}
484dump dump ck_null ds}
485goto goto ck_null ds}
486exit exit ck_fun ds% S?
79072805 487
a0d0e21e
LW
488#nswitch numeric switch ck_null d
489#cswitch character switch ck_null d
79072805
LW
490
491# I/O.
492
db173bac
MB
493open open ck_fun ist@ F S?
494close close ck_fun is% F?
495pipe_op pipe ck_fun is@ F F
79072805 496
db173bac
MB
497fileno fileno ck_fun ist% F
498umask umask ck_fun ist% S?
499binmode binmode ck_fun s% F
79072805 500
db173bac
MB
501tie tie ck_fun idms@ R S L
502untie untie ck_fun is% R
503tied tied ck_fun s% R
504dbmopen dbmopen ck_fun is@ H S S
505dbmclose dbmclose ck_fun is% H
79072805 506
db173bac
MB
507sselect select system call ck_select t@ S S S S
508select select ck_select st@ F?
79072805 509
db173bac 510getc getc ck_eof st% F?
d1a002d4 511read read ck_fun imst@ F R S S?
db173bac
MB
512enterwrite write ck_fun dis% F?
513leavewrite write exit ck_null 1
79072805 514
db173bac
MB
515prtf printf ck_listiob ims@ F? L
516print print ck_listiob ims@ F? L
79072805 517
db173bac
MB
518sysopen sysopen ck_fun s@ F S S S?
519sysseek sysseek ck_fun s@ F S S
d1a002d4 520sysread sysread ck_fun imst@ F R S S?
db173bac 521syswrite syswrite ck_fun imst@ F S S S?
79072805 522
db173bac 523send send ck_fun imst@ F S S S?
d1a002d4 524recv recv ck_fun imst@ F R S S
79072805 525
db173bac
MB
526eof eof ck_eof is% F?
527tell tell ck_fun st% F?
528seek seek ck_fun s@ F S S
9b01e405 529# truncate really behaves as if it had both "S S" and "F S"
db173bac 530truncate truncate ck_trunc is@ S S
79072805 531
db173bac
MB
532fcntl fcntl ck_fun st@ F S S
533ioctl ioctl ck_fun st@ F S S
534flock flock ck_fun ist@ F S
79072805
LW
535
536# Sockets.
537
db173bac
MB
538socket socket ck_fun is@ F S S S
539sockpair socketpair ck_fun is@ F F S S S
79072805 540
db173bac
MB
541bind bind ck_fun is@ F S
542connect connect ck_fun is@ F S
543listen listen ck_fun is@ F S
544accept accept ck_fun ist@ F F
545shutdown shutdown ck_fun ist@ F S
79072805 546
db173bac
MB
547gsockopt getsockopt ck_fun is@ F S S
548ssockopt setsockopt ck_fun is@ F S S S
79072805 549
db173bac
MB
550getsockname getsockname ck_fun is% F
551getpeername getpeername ck_fun is% F
79072805
LW
552
553# Stat calls.
554
db173bac
MB
555lstat lstat ck_ftst u- F
556stat stat ck_ftst u- F
557ftrread -R ck_ftst isu- F
558ftrwrite -W ck_ftst isu- F
559ftrexec -X ck_ftst isu- F
560fteread -r ck_ftst isu- F
561ftewrite -w ck_ftst isu- F
562fteexec -x ck_ftst isu- F
563ftis -e ck_ftst isu- F
564fteowned -O ck_ftst isu- F
565ftrowned -o ck_ftst isu- F
566ftzero -z ck_ftst isu- F
567ftsize -s ck_ftst istu- F
568ftmtime -M ck_ftst stu- F
569ftatime -A ck_ftst stu- F
570ftctime -C ck_ftst stu- F
571ftsock -S ck_ftst isu- F
572ftchr -c ck_ftst isu- F
573ftblk -b ck_ftst isu- F
574ftfile -f ck_ftst isu- F
575ftdir -d ck_ftst isu- F
576ftpipe -p ck_ftst isu- F
577ftlink -l ck_ftst isu- F
578ftsuid -u ck_ftst isu- F
579ftsgid -g ck_ftst isu- F
580ftsvtx -k ck_ftst isu- F
581fttty -t ck_ftst is- F
582fttext -T ck_ftst isu- F
583ftbinary -B ck_ftst isu- F
79072805
LW
584
585# File calls.
586
db173bac
MB
587chdir chdir ck_fun ist% S?
588chown chown ck_fun imst@ L
589chroot chroot ck_fun istu% S?
590unlink unlink ck_fun imstu@ L
591chmod chmod ck_fun imst@ L
592utime utime ck_fun imst@ L
593rename rename ck_fun ist@ S S
594link link ck_fun ist@ S S
595symlink symlink ck_fun ist@ S S
596readlink readlink ck_fun stu% S?
597mkdir mkdir ck_fun ist@ S S
598rmdir rmdir ck_fun istu% S?
79072805
LW
599
600# Directory calls.
601
db173bac
MB
602open_dir opendir ck_fun is@ F S
603readdir readdir ck_fun % F
604telldir telldir ck_fun st% F
605seekdir seekdir ck_fun s@ F S
606rewinddir rewinddir ck_fun s% F
607closedir closedir ck_fun is% F
79072805
LW
608
609# Process control.
610
db173bac
MB
611fork fork ck_null ist0
612wait wait ck_null ist0
613waitpid waitpid ck_fun ist@ S S
614system system ck_exec imst@ S? L
615exec exec ck_exec dimst@ S? L
616kill kill ck_fun dimst@ L
617getppid getppid ck_null ist0
618getpgrp getpgrp ck_fun ist% S?
619setpgrp setpgrp ck_fun ist@ S? S?
620getpriority getpriority ck_fun ist@ S S
621setpriority setpriority ck_fun ist@ S S S
79072805
LW
622
623# Time calls.
624
db173bac 625time time ck_null ist0
79072805 626tms times ck_null 0
db173bac
MB
627localtime localtime ck_fun t% S?
628gmtime gmtime ck_fun t% S?
629alarm alarm ck_fun istu% S?
630sleep sleep ck_fun ist% S?
79072805
LW
631
632# Shared memory.
633
db173bac
MB
634shmget shmget ck_fun imst@ S S S
635shmctl shmctl ck_fun imst@ S S S
636shmread shmread ck_fun imst@ S S S S
637shmwrite shmwrite ck_fun imst@ S S S S
79072805
LW
638
639# Message passing.
640
db173bac
MB
641msgget msgget ck_fun imst@ S S
642msgctl msgctl ck_fun imst@ S S S
643msgsnd msgsnd ck_fun imst@ S S S
644msgrcv msgrcv ck_fun imst@ S S S S S
79072805
LW
645
646# Semaphores.
647
db173bac
MB
648semget semget ck_fun imst@ S S S
649semctl semctl ck_fun imst@ S S S S
650semop semop ck_fun imst@ S S
79072805
LW
651
652# Eval.
653
db173bac
MB
654require require ck_require du% S?
655dofile do 'file' ck_fun d1 S
656entereval eval string ck_eval d% S
657leaveeval eval exit ck_null 1 S
658#evalonce eval constant string ck_null d1 S
659entertry eval block ck_null |
660leavetry eval block exit ck_null @
79072805
LW
661
662# Get system info.
663
db173bac
MB
664ghbyname gethostbyname ck_fun % S
665ghbyaddr gethostbyaddr ck_fun @ S S
79072805 666ghostent gethostent ck_null 0
db173bac
MB
667gnbyname getnetbyname ck_fun % S
668gnbyaddr getnetbyaddr ck_fun @ S S
79072805 669gnetent getnetent ck_null 0
db173bac
MB
670gpbyname getprotobyname ck_fun % S
671gpbynumber getprotobynumber ck_fun @ S
79072805 672gprotoent getprotoent ck_null 0
db173bac
MB
673gsbyname getservbyname ck_fun @ S S
674gsbyport getservbyport ck_fun @ S S
79072805 675gservent getservent ck_null 0
db173bac
MB
676shostent sethostent ck_fun is% S
677snetent setnetent ck_fun is% S
678sprotoent setprotoent ck_fun is% S
679sservent setservent ck_fun is% S
680ehostent endhostent ck_null is0
681enetent endnetent ck_null is0
682eprotoent endprotoent ck_null is0
683eservent endservent ck_null is0
684gpwnam getpwnam ck_fun % S
685gpwuid getpwuid ck_fun % S
79072805 686gpwent getpwent ck_null 0
db173bac
MB
687spwent setpwent ck_null is0
688epwent endpwent ck_null is0
689ggrnam getgrnam ck_fun % S
690ggrgid getgrgid ck_fun % S
79072805 691ggrent getgrent ck_null 0
db173bac
MB
692sgrent setgrent ck_null is0
693egrent endgrent ck_null is0
694getlogin getlogin ck_null st0
79072805
LW
695
696# Miscellaneous.
697
db173bac 698syscall syscall ck_fun imst@ S L
c0329465
MB
699
700# For multi-threading
db173bac 701lock lock ck_rfun s% S
2faa37cc 702threadsv per-thread variable ck_null ds0