File: libc.pp

package info (click to toggle)
fpc 2.0.0-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 89,476 kB
  • ctags: 133,433
  • sloc: pascal: 1,075,377; makefile: 310,704; xml: 64,343; perl: 7,703; yacc: 3,297; ansic: 2,265; lex: 839; php: 447; sh: 412; sed: 132; asm: 71; csh: 34; cpp: 26; tcl: 7
file content (251 lines) | stat: -rw-r--r-- 9,667 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
{$mode objfpc}
{$h+}
unit libc;

Interface

uses kerneldefs;

Const
  clib = 'c';
  threadslib = 'pthread';

{$i glue.inc}           // C to Pascal type mappings
{$i endianh.inc}        // endian.h bits/endian.h
{$i typesh.inc}         // types.h sys/types.h
{$i posixopth.inc}      // bits/posix_opt.h
{$i stdinth.inc}        // stdint.h
{$i wordsizeh.inc}      // bits/wordsize.h
{$i limitsh.inc}        // limits.h
{$i posix1_limh.inc}    // bits/posix1_lim.h
{$i posix2_limh.inc}    // bits/posix2_lim.h
{$i xopen_limh.inc}     // bits/xopen_lim.h
{$i local_limh.inc}     // bits/local_lim.h
{$i inttypesh.inc}      // inttypes.h
{$i errnoh.inc}         // errno.h asm/errno.h bits/errno.h
{$i pathsh.inc}         // paths.h
{$i lib_namesh.inc}     // gnu/lib-names.h
{$i xlocaleh.inc}       // xlocale.h
{$i sigcontexth.inc}    // asm/sigcontext.h (from kernel)
{$i sigseth.inc}        // bits/sigset.h
{$i signumh.inc}        // bits/signum.h
{$i siginfoh.inc}       // bits/siginfo.h
{$i sigstackh.inc}      // bits/sigstack.h
{$i sigactionh.inc}     // bits/sigaction.h
{$i signalh.inc}        // signal.h
{$i btimeh.inc}         // bits/time.h
{$i timeh.inc}          // time.h
{$i stimeh.inc}         // sys/time.h
{$i timexh.inc}         // sys/timex.h
{$i timesh.inc}         // sys/times.h
{$i bschedh.inc}        // bits/sched.h
{$i schedh.inc}         // sched.h
{$i pthreadtypesh.inc}  // bits/pthreadtypes.h
{$i pthreadh.inc}       // pthread.h
{$i sigthreadh.inc}     // bits/sigthread.h
{$i semaphoreh.inc}     // semaphore.h
{$i spawnh.inc}         // spawn.h
{$i bfcntlh.inc}        // bits/fcntl.h
{$i fcntlh.inc}         // fcntl.h
{$i fileh.inc}          // sys/file.h
{$i bdirenth.inc}       // bits/dirent.h
{$i direnth.inc}        // dirent.h
{$i bstath.inc}         // bits/stat.h
{$i sstath.inc}         // sys/stat.h
{$i fnmatchh.inc}       // fnmatch.h
{$i gconvh.inc}         // gconv.h
{$i gconfigh.inc}       // _G_config.h
{$i libioh.inc}         // libio.h
{$i stdioh.inc}         // stdio.h
{$i stdio_limh.inc}     // bits/stdio_lim.h
{$i stdio_exth.inc}     // stdio_ext.h
{$i bconfnameh.inc}     // bits/confname.h
{$i unistdh.inc}        // unistd.h
{$i fstabh.inc}         // fstab.h
{$i mntenth.inc}        // mntent.h
{$i ioctlsh.inc}        // bits/ioctls.h
{$i ioctl_typesh.inc}   // bits/ioctl-types.h
{$i btermiosh.inc}      // bits/termios.h
{$i termiosh.inc}       // termios.h
{$i sttydefaultsh.inc}  // sys/ttydefaults.h
{$i sioctlh.inc}        // sys/ioctl.h
{$i srawh.inc}          // sys/raw.h
{$i ptyh.inc}           // pty.h
{$i smounth.inc}        // sys/mount.h
{$i ssysctlh.inc}       // sys/sysctl.h
{$i stringh.inc}        // string.h
{$i stdlibh.inc}        // stdlib.h
{$i malloch.inc}        // malloc.h
{$i ssysinfoh.inc}      // sys/sysinfo.h
{$i bdlfcnh.inc}        // bits/dlfcn.h
{$i dlfcnh.inc}         // dlfcn.h
{$i localeh.inc}        // locale.h
{$i nl_typesh.inc}      // nl_types.h
{$i langinfoh.inc}      // langinfo.h
{$i wordexph.inc}       // wordexp.h
{$i iconvh.inc}         // iconv.h
{$i bresourceh.inc}     // bits/resource.h
{$i sresourceh.inc}     // sys/resource.h
{$i argzh.inc}          // argz.h
{$i envzh.inc}          // envz.h
{$i ctypeh.inc}         // sys/ctype.h
{$i wctypeh.inc}        // wctype.h
{$i wcharh.inc}         // wchar.h
{$i bwaitflagsh.inc}    // bits/waitflags.h
{$i bwaitstatush.inc}   // bits/waitstatus.h
{$i swaith.inc}         // sys/wait.h
{$i butsnameh.inc}      // bits/utsname.h
{$i sutsnameh.inc}      // sys/utsname.h
{$i bmmanh.inc}         // bits/mman.h
{$i smmaph.inc}         // sys/mmap.h
{$i ssyslogh.inc}       // sys/syslog.h
{$i glibc_versionh.inc} // from gnu/libc-version.h
{$i buioh.inc}          // bits/uio.h
{$i suioh.inc}          // sys/uio.h
{$i asockiosh.inc}      // asm/sockios.h
{$i asocketh.inc}       // asm/socket.h
{$i bsockaddrh.inc}     // bits/sockaddr.h (inlined in bits/socket.h)
{$i bsocketh.inc}       // bits/socket.h
{$i ssocketh.inc}       // sys/socket.h
{$i sunh.inc}           // sys/un.h
{$i ninh.inc}           // netinet/in.h
{$i binh.inc}           // bits/in.h, inlined in netinet/in.h
{$i aineth.inc}         // arpa/inet.h
{$i bnetdbh.inc}        // bits/netdb.h
{$i netdbh.inc}         // netdb.h
// empty anyway {$i bselecth.inc}       // bits/select.h
{$i sselecth.inc}       // sys/select.h
{$i pwdh.inc}           // pwd.h
{$i grph.inc}           // grp.h
{$i sptraceh.inc}       // sys/ptrace.h
{$i ulimith.inc}        // ulimit.h
{$i bpollh.inc}         // bits/poll.h
{$i spollh.inc}         // sys/poll.h
{$i utimeh.inc}         // utime.h
{$i sysexitsh.inc}      // sysexits.h
{$i bustath.inc}        // bits/ustat.h
{$i sustath.inc}        // sys/ustat.h
{$i errh.inc}           // err.h
{$i errorh.inc}         // error.h
{$i bfenvh.inc}         // bits/fenv.h
{$i fenvh.inc}          // fenv.h
{$i bipch.inc}          // bits/ipc.h
{$i sipch.inc}          // sys/ipc.h
{$i bshmh.inc}          // bits/shm.h
{$i sshmh.inc}          // sys/shm.h
{$i bsemh.inc}          // bits/sem.h
{$i ssemh.inc}          // sys/sem.h
{$i libgenh.inc}        // libgen.h
{$i butmph.inc}         // bits/utmp.h
{$i utmph.inc}          // utmp.h
{$i butmpxh.inc}        // bits/utmpx.h
{$i utmpxh.inc}         // utmpx.h
{$i svtimesh.inc}       // sys/vtimes.h
{$i svlimith.inc}       // sys/vlimit.h
{$i sucontexth.inc}     // sys/ucontext.h
{$i ucontexth.inc}      // ucontext.h
{$i bmsqh.inc}          // bits/msq.h
{$i smsgh.inc}          // sys/msg.h
{$i bstatfsh.inc}       // bits/statfs.h
{$i sstatfsh.inc}       // sys/statfs.h
{$i bstatvfsh.inc}      // bits/statvfs.h
{$i sstatvfsh.inc}      // sys/statvfs.h
{$i monetaryh.inc}      // monetary.h
{$i mcheckh.inc}        // mcheck.h
{$i printfh.inc}        // printf.h
{$i libintlh.inc}       // libintl.h
{$i shadowh.inc}        // shadow.h
{$i fmtmsgh.inc}        // fmtmsg.h
{$i squotah.inc}        // sys/quota.h
{$i stimebh.inc}        // sys/timeb.h
{$i spermh.inc}         // sys/perm.h
{ $i suserh.inc}        // sys/user.h  // You're not supposed to use this...
{$i sswaph.inc}         // sys/swap.h
{$i ssendfileh.inc}     // sys/sendfile.h
{$i srebooth.inc}       // sys/reboot.h
{$i aioh.inc}           // aio.h
{$i aliasesh.inc}       // aliases.h
{$i globh.inc}          // glob.h
{$i crypth.inc}         // crypt.h
{$i sfsuidh.inc}        // sys/fsuid.h
{$i sklogh.inc}         // sys/klog.h
{$i skdaemonh.inc}      // sys/kdaemon.h
{$i saccth.inc}         // sys/acct.h
{$i bstroptsh.inc}      // bits/stropts.h
{$i stroptsh.inc}       // stropts.h
{$i allocah.inc}        // alloca.h
{$i getopth.inc}        // getopt.h
{$i argph.inc}          // argp.h
{$i nssh.inc}           // nss.h
{$i regexh.inc}         // regex.h
{ $i regexph.inc}       // regexp.h // You're not supposed to use this...
{$i netherneth.inc}     // net/ethernet.h
{$i nifh.inc}           // net/if.h
{$i nif_arph.inc}       // net/if_arp.h
{$i nif_packeth.inc}    // net/if_packet.h
{ $i nppp_defsh.inc}    // net/ppp_defs.h is empty
{$i nif_ppph.inc}       // net/if_ppp.h
{$i nif_shaperh.inc}    // net/if_shaper.h
{ $i nif_slip.h}        // net/if_slip.h in kerneldefs
{ $i nppp_comp.h}       // net/ppp-comp.h in kerneldefs
{$i nrouteh.inc}        // net/route.h
{$i nashh.inc}          // netash/ash.h
{$i nath.inc}           // netatalk/at.h
{$i nax25h.inc}         // netax25/ax25.h
{$i nech.inc}           // neteconet/ec.h
{$i nipxh.inc}          // netipx/ipx.h
{$i npacketh.inc}       // netpacket/packet.h
{$i nnetromh.inc}       // netrom/netrom.h
{$i nroseh.inc}         // netrose/rose.h
{$i nif_etherh.inc}     // netinet/if_ether.h
{$i netherh.inc}        // netinet/ether.h
{$i nicmp6h.inc}        // netinet/icmp6.h
{$i nif_fddih.inc}      // netinet/if_fddi.h
{$i nif_trh.inc}        // netinet/if_tr.h
{$i nigmph.inc}         // netinet/igmp.h
{$i nin_systmh.inc}     // netinet/in_systm.h
{$i niph.inc}           // netinet/ip.h
{$i nip6h.inc}          // netinet/ip6.h
{$i nip_icmph.inc}      // netinet/ip_icmp.h
{$i ntcph.inc}          // netinet/tcp.h
{$i nudph.inc}          // netinet/udp.h
{$i proutedh.inc}       // protocols/routed.h
{$i prwhodh.inc}        // protocols/rwhod.h
{$i ptalkdh.inc}        // protocols/talkd.h
{$i ptimedh.inc}        // protocols/timed.h
{$i sscsih.inc}         // scsi/scsi.h
{$i sscsi_ioctlh.inc}   // scsi/scsi_ioctl.h
{$i ssgh.inc}           // scsi/sg.h
{$i ttyenth.inc}        // ttyent.h
{$i sgttyh.inc}         // sgtty.h
{$i searchh.inc}        // search.h

Implementation

uses kernelioctl;

{$i cerrno.inc}        // errno.h asm/errno.h bits/errno.h macros.
{$i time.inc}         // bits/time.h macros.
{$i stime.inc}        // sys/time.h macros.
{$i dirent.inc}       // dirent.h macros.
{$i sstat.inc}        // sys/stat.h macros.
{$i libio.inc}        // libio.h macros.
{$i termios.inc}      // termios.h macros.
{$i sttydefaults.inc} // sys/ttydefaults.h macros.
{$i sraw.inc}         // sys/raw.h macros.
{$i bwaitstatus.inc}  // bits/waitstatus.h macros.
{$i ssyslog.inc}      // sys/syslog.h macros.
{$i bsocket.inc}      // bits/socket.h macros.
{$i sun.inc}          // sys/un.h macros.
{$i nin.inc}          // netinet/in.h macros.
{$i sselect.inc}      // sys/select.h macros.
{$i squota.inc}       // sys/quota.h macros.
{$i nethernet.inc}    // net/ethernet.h macros.
{$i nif_ppp.inc}      // net/if_ppp.h macros.
{$i nroute.inc}       // net/route.h macros.
{$i nip.inc}          // netinet/ip.h macros.
{$i nif_ether.inc}    // netinet/if_ether.h macros.
{$i nicmp6.inc}       // netinet/icmp6.h macros.
{$i nip_icmp.inc}     // netinet/ip_icmp.h macros.

end.