summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/spec/stdio.spec
blob: 561085ce1ed9cb0364918958a0aa4e5d9c3a3b21 (plain)
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"%Z%%M%	%I%	%E% SMI"
#

function	clearerr
include		<stdio.h>
declaration	void clearerr(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	ctermid
include		<stdio.h>
declaration	char *ctermid(char *s)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
exception	is_empty_string($return)
end

function	ctermid_r
include		<stdio.h>
declaration	char *ctermid_r(char *s)
version		SUNW_0.7
exception	is_empty_string($return)
end

function	cuserid
include		<stdio.h>
declaration	char *cuserid(char *s)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	_cuserid # extends libc/spec/stdio.spec cuserid
weak		cuserid
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	enable_extended_FILE_stdio
arch		sparc i386
version		sparc=SUNW_1.23 i386=SUNW_1.23
end

function	fclose
include		<stdio.h>
declaration	int fclose(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EAGAIN EBADF EFBIG EINTR EIO ENOSPC EPIPE ENXIO
end

function	fdopen
include		<stdio.h>
declaration	FILE *fdopen(int fildes, const char *mode)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EBADF EINVAL EMFILE ENOMEM
end

function	_fdopen
weak		fdopen
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
end

function	feof
include		<stdio.h>
declaration	int feof(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	ferror
include		<stdio.h>
declaration	int ferror(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	fflush
include		<stdio.h>
declaration	int fflush(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EAGAIN EBADF EFBIG EINTR EIO ENOSPC EPIPE ENXIO
end

function	fgetc
include		<stdio.h>
declaration	int fgetc(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	fgetpos
include		<stdio.h>
declaration	int fgetpos(FILE *_RESTRICT_KYWD stream, \
			fpos_t *_RESTRICT_KYWD pos)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EBADF ESPIPE EOVERFLOW
exception	$return == -1
end

function	fgets
include		<stdio.h>
declaration	char *fgets(char *_RESTRICT_KYWD s, int n, \
			FILE *_RESTRICT_KYWD stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	fileno
include		<stdio.h>
declaration	int fileno(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	_fileno
weak		fileno
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	flockfile
include		<stdio.h>
declaration	void flockfile(FILE *stream)
version		i386=SUNW_0.7 sparc=SISCD_2.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	fopen
include		<stdio.h>
declaration	FILE *fopen(const char *_RESTRICT_KYWD filename, \
			const char *_RESTRICT_KYWD mode)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EACCES EINTR EISDIR ELOOP EMFILE ENAMETOOLONG ENFILE ENOENT \
			ENOSPC ENOTDIR ENXIO EOVERFLOW EROFS EINVAL ENOMEM \
			ETXTBSY
end

function	fputc
include		<stdio.h>
declaration	int fputc(int c, FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EFBIG
end

function	fputs
include		<stdio.h>
declaration	int fputs(const char *_RESTRICT_KYWD s, \
			FILE *_RESTRICT_KYWD stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EFBIG
end

function	fread
include		<stdio.h>, <errno.h>
declaration	size_t fread(void *_RESTRICT_KYWD ptr, size_t size, \
			size_t nitems, \
			FILE *_RESTRICT_KYWD stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EOVERFLOW EFBIG
exception	$return == 0 && (errno == EOVERFLOW || errno == EFBIG)
end

function	freopen
include		<stdio.h>
declaration	FILE *freopen(const char *_RESTRICT_KYWD filename, \
			const char *_RESTRICT_KYWD mode, \
			FILE *_RESTRICT_KYWD stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EACCES EINTR EISDIR ELOOP EMFILE ENAMETOOLONG ENFILE \
			ENOENT ENOSPC ENOTDIR ENXIO EOVERFLOW EROFS \
			EINVAL ENOMEM ETXTBSY
end

function	fscanf
include		<stdio.h>
declaration	int fscanf(FILE *_RESTRICT_KYWD strm, \
			const char *_RESTRICT_KYWD format, ...)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EOVERFLOW
exception	$return == -1
end

function	fwscanf
include		<stdio.h>, <wchar.h>
declaration	int fwscanf(FILE *_RESTRICT_KYWD stream, \
		const wchar_t *_RESTRICT_KYWD format, ...)
version		SUNW_1.18
end

function	fseek
include		<stdio.h>
declaration	int fseek(FILE *stream, long offset, int whence)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EAGAIN EBADF EFBIG EINTR EINVAL EIO ENOSPC EPIPE ENXIO EOVERFLOW
end

function	fseeko
include		<stdio.h>
declaration	int fseeko(FILE *stream, off_t offset, int whence)
version		SUNW_1.1
errno		EAGAIN EBADF EFBIG EINTR EINVAL EIO ENOSPC EPIPE ENXIO EOVERFLOW
end

function	fsetpos
include		<stdio.h>
declaration	int fsetpos(FILE *stream, const fpos_t *pos)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EBADF ESPIPE
exception	$return == -1
end

function	ftell
include		<stdio.h>
declaration	long ftell(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EBADF ESPIPE EOVERFLOW
end

function	ftello
include		<stdio.h>
declaration	off_t ftello(FILE *stream)
version		SUNW_1.1
errno		EBADF ESPIPE EOVERFLOW
end

function	funlockfile
include		<stdio.h>
declaration	void funlockfile(FILE *stream)
version		i386=SUNW_0.7 sparc=SISCD_2.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	fwrite
include		<stdio.h>
declaration	size_t fwrite(const void *_RESTRICT_KYWD ptr, size_t size, \
			size_t nitems, \
			FILE *_RESTRICT_KYWD stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW EFBIG
exception	$return == 0
end

function	getc
include		<stdio.h>
declaration	int getc(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	getc_unlocked
include		<stdio.h>
declaration	int getc_unlocked(FILE *stream)
version		i386=SUNW_0.7 sparc=SISCD_2.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	getchar
include		<stdio.h>
declaration	int getchar(void)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	getchar_unlocked
include		<stdio.h>
declaration	int getchar_unlocked(void)
version		i386=SUNW_0.7 sparc=SISCD_2.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	getpass
include		<unistd.h>
declaration	char *getpass(const char *prompt)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EINTR EIO EMFILE ENFILE ENXIO
end

function	_getpass
weak		getpass
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	getpassphrase
include		<unistd.h>
declaration	char *getpassphrase(const char *prompt)
version		SUNW_1.1
errno		EINTR EIO EMFILE ENFILE ENXIO
end

function	gets
include		<stdio.h>
declaration	char *gets(char *s)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	getw
include		<stdio.h>
declaration	int getw(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EOVERFLOW
end

function	_getw
weak		getw
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	pclose
include		<stdio.h>
declaration	int pclose(FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
exception	$return == -1
end

function	_pclose
weak		pclose
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	popen
include		<stdio.h>
declaration	FILE *popen(const char *command, const char *mode)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
exception	$return == 0
end

function	_popen
weak		popen
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	putc
include		<stdio.h>
declaration	int putc(int c, FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EFBIG
end

function	putc_unlocked
include		<stdio.h>
declaration	int putc_unlocked(int c, FILE *stream)
version		i386=SUNW_0.7 sparc=SISCD_2.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EFBIG
end

function	putchar
include		<stdio.h>
declaration	int putchar(int c)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EFBIG
end

function	putchar_unlocked
include		<stdio.h>
declaration	int putchar_unlocked(int c)
version		i386=SUNW_0.7 sparc=SISCD_2.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EFBIG
end

function	puts
include		<stdio.h>
declaration	int puts(const char *s)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EFBIG
end

function	putw
include		<stdio.h>
declaration	int putw(int w, FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
errno		EFBIG
end

function	_putw
weak		putw
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	scanf
include		<stdio.h>
declaration	int scanf(const char *_RESTRICT_KYWD format, ...)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW
exception	$return == -1
end

function	setbuf
include		<stdio.h>
declaration	void setbuf(FILE *_RESTRICT_KYWD stream, \
			char *_RESTRICT_KYWD buf)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
end

function	setbuffer
include		<stdio.h>
declaration	void setbuffer(FILE *iop, char *abuf, size_t asize)
version		SUNW_0.9
end

function	setlinebuf
include		<stdio.h>
declaration	int setlinebuf(FILE *iop)
version		SUNW_0.9
end

function	setvbuf
include		<stdio.h>
declaration	int setvbuf(FILE *_RESTRICT_KYWD stream, \
			char *_RESTRICT_KYWD buf, int type, size_t size)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
end

function	sscanf
include		<stdio.h>
declaration	int sscanf(const char *_RESTRICT_KYWD s, \
			const char *_RESTRICT_KYWD format, ...)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EOVERFLOW
exception	$return == -1
end

function	system
declaration	int system(const char *string )
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
exception	$return == 0
end

function	tempnam
include		<stdio.h>
declaration	char *tempnam(const char *dir, const char *pfx)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
exception	$return == 0
end

function	_tempnam
weak		tempnam
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7 \
		amd64=SUNW_0.7
end

function	tmpfile
include		<stdio.h>
declaration	FILE *tmpfile(void)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
errno		EINTR EMFILE ENFILE ENOSPC ENOMEM
end

function	tmpnam
include		<stdio.h>
declaration	char *tmpnam(char *s)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
exception	$return == 0
end

function	tmpnam_r
include		<stdio.h>
declaration	char *tmpnam_r(char *s)
version		SUNW_0.7
exception	$return == 0
end

function	ungetc
include		<stdio.h>
declaration	int ungetc(int c, FILE *stream)
version		sparc=SYSVABI_1.3 i386=SYSVABI_1.3 sparcv9=SUNW_0.7  \
		amd64=SUNW_0.7
end

function	_vfscanf
weak		vfscanf
version		SUNW_1.21
end

function	vfscanf
include		<stdarg.h>, <stdio.h>
declaration	int vfscanf(FILE *_RESTRICT_KYWD strm, \
			const char *_RESTRICT_KYWD format, va_list arg)
version		SUNW_1.21
errno		EOVERFLOW
exception	$return == -1
end

function	vfwscanf
include		<stdarg.h>, <stdio.h>, <wchar.h>
declaration	int vfwscanf(FILE *_RESTRICT_KYWD stream, \
		const wchar_t *_RESTRICT_KYWD format, va_list arg)
version		SUNW_1.21
end

function	_vscanf
weak		vscanf
version		SUNW_1.21
end

function	vscanf
include		<stdarg.h>, <stdio.h>
declaration	int vscanf(const char *_RESTRICT_KYWD format, va_list arg)
version		SUNW_1.21
errno		EOVERFLOW
exception	$return == -1
end

function	_vsscanf
weak		vsscanf
version		SUNW_1.21
end

function	vsscanf
include		<stdarg.h>, <stdio.h>
declaration	int vsscanf(const char *_RESTRICT_KYWD s, \
			const char *_RESTRICT_KYWD format, va_list arg)
version		SUNW_1.21
errno		EOVERFLOW
exception	$return == -1
end

function	vswscanf
include		<stdarg.h>, <stdio.h>, <wchar.h>
declaration	int vswscanf(const wchar_t *_RESTRICT_KYWD ws, \
		const wchar_t *_RESTRICT_KYWD format, va_list arg)
version		SUNW_1.21
end

function	vwscanf
include		<stdarg.h>, <stdio.h>, <wchar.h>
declaration	int vwscanf(const wchar_t *_RESTRICT_KYWD format, va_list arg)
version		SUNW_1.21
end

function	wscanf
include		<stdio.h>, <wchar.h>
declaration	int wscanf(const wchar_t *_RESTRICT_KYWD format, ...)
version		SUNW_1.18
end