xref: /illumos-gate/usr/src/cmd/sort/streams_stdio.h (revision 101e15b5f8a77d9433805e541996abaabc9ca8c1)
1*101e15b5SRichard Lowe /*
2*101e15b5SRichard Lowe  * CDDL HEADER START
3*101e15b5SRichard Lowe  *
4*101e15b5SRichard Lowe  * The contents of this file are subject to the terms of the
5*101e15b5SRichard Lowe  * Common Development and Distribution License, Version 1.0 only
6*101e15b5SRichard Lowe  * (the "License").  You may not use this file except in compliance
7*101e15b5SRichard Lowe  * with the License.
8*101e15b5SRichard Lowe  *
9*101e15b5SRichard Lowe  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*101e15b5SRichard Lowe  * or http://www.opensolaris.org/os/licensing.
11*101e15b5SRichard Lowe  * See the License for the specific language governing permissions
12*101e15b5SRichard Lowe  * and limitations under the License.
13*101e15b5SRichard Lowe  *
14*101e15b5SRichard Lowe  * When distributing Covered Code, include this CDDL HEADER in each
15*101e15b5SRichard Lowe  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*101e15b5SRichard Lowe  * If applicable, add the following below this CDDL HEADER, with the
17*101e15b5SRichard Lowe  * fields enclosed by brackets "[]" replaced with your own identifying
18*101e15b5SRichard Lowe  * information: Portions Copyright [yyyy] [name of copyright owner]
19*101e15b5SRichard Lowe  *
20*101e15b5SRichard Lowe  * CDDL HEADER END
21*101e15b5SRichard Lowe  */
22*101e15b5SRichard Lowe /*
23*101e15b5SRichard Lowe  * Copyright (c) 1998-2000 by Sun Microsystems, Inc.
24*101e15b5SRichard Lowe  * All rights reserved.
25*101e15b5SRichard Lowe  */
26*101e15b5SRichard Lowe 
27*101e15b5SRichard Lowe #ifndef	_STREAMS_STDIO_H
28*101e15b5SRichard Lowe #define	_STREAMS_STDIO_H
29*101e15b5SRichard Lowe 
30*101e15b5SRichard Lowe #ifdef	__cplusplus
31*101e15b5SRichard Lowe extern "C" {
32*101e15b5SRichard Lowe #endif
33*101e15b5SRichard Lowe 
34*101e15b5SRichard Lowe #include <sys/mman.h>
35*101e15b5SRichard Lowe #include <sys/types.h>
36*101e15b5SRichard Lowe #include <sys/stat.h>
37*101e15b5SRichard Lowe 
38*101e15b5SRichard Lowe #include <fcntl.h>
39*101e15b5SRichard Lowe #include <stdio.h>
40*101e15b5SRichard Lowe #include <stdlib.h>
41*101e15b5SRichard Lowe #include <string.h>
42*101e15b5SRichard Lowe #include <unistd.h>
43*101e15b5SRichard Lowe 
44*101e15b5SRichard Lowe #include "fields.h"
45*101e15b5SRichard Lowe #include "statistics.h"
46*101e15b5SRichard Lowe #include "types.h"
47*101e15b5SRichard Lowe #include "utility.h"
48*101e15b5SRichard Lowe 
49*101e15b5SRichard Lowe extern int stream_stdio_open_for_write(stream_t *str);
50*101e15b5SRichard Lowe extern int stream_stdio_is_closable(stream_t *str);
51*101e15b5SRichard Lowe extern int stream_stdio_close(stream_t *str);
52*101e15b5SRichard Lowe extern int stream_stdio_unlink(stream_t *str);
53*101e15b5SRichard Lowe extern int stream_stdio_free(stream_t *str);
54*101e15b5SRichard Lowe 
55*101e15b5SRichard Lowe extern ssize_t stream_stdio_fetch_overwrite(stream_t *);
56*101e15b5SRichard Lowe extern void stream_stdio_put_line_unique(stream_t *, line_rec_t *);
57*101e15b5SRichard Lowe extern void stream_stdio_flush(stream_t *);
58*101e15b5SRichard Lowe 
59*101e15b5SRichard Lowe extern const stream_ops_t stream_stdio_ops;
60*101e15b5SRichard Lowe 
61*101e15b5SRichard Lowe #ifdef	__cplusplus
62*101e15b5SRichard Lowe }
63*101e15b5SRichard Lowe #endif
64*101e15b5SRichard Lowe 
65*101e15b5SRichard Lowe #endif	/* _STREAMS_STDIO_H */
66