2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2000, 2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: stdio.h,v 1.6.206.1 2004/03/06 08:14:48 marka Exp $ */
26 #include <isc/result.h>
31 isc_stdio_open(const char *filename, const char *mode, FILE **fp);
34 isc_stdio_close(FILE *f);
37 isc_stdio_seek(FILE *f, long offset, int whence);
40 isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f,
44 isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
48 isc_stdio_flush(FILE *f);
50 * These functions are wrappers around the corresponding stdio functions,
51 * returning a detailed error code in the form of an an isc_result_t. ANSI C
52 * does not guarantee that stdio functions set errno, hence these functions
53 * must use platform dependent methods (e.g., the POSIX errno) to construct the
58 isc_stdio_sync(FILE *f);
60 * Invoke fsync() on the file descriptor underlying an stdio stream, or an
61 * equivalent system-dependent operation. Note that this function has no
62 * direct counterpart in the stdio library.
67 #endif /* ISC_STDIO_H */