rmt.h revision 1.3 1 1.3 thorpej /* $NetBSD: rmt.h,v 1.3 1997/10/21 19:50:55 thorpej Exp $ */
2 1.1 jtc
3 1.1 jtc /*
4 1.1 jtc * rmt.h
5 1.1 jtc *
6 1.1 jtc * Added routines to replace open(), close(), lseek(), ioctl(), etc.
7 1.1 jtc * The preprocessor can be used to remap these the rmtopen(), etc
8 1.1 jtc * thus minimizing source changes.
9 1.1 jtc *
10 1.1 jtc * This file must be included before <sys/stat.h>, since it redefines
11 1.1 jtc * stat to be rmtstat, so that struct stat xyzzy; declarations work
12 1.1 jtc * properly.
13 1.1 jtc *
14 1.1 jtc * -- Fred Fish (w/some changes by Arnold Robbins)
15 1.1 jtc */
16 1.1 jtc
17 1.2 jtc #ifndef _RMT_H_
18 1.2 jtc #define _RMT_H_
19 1.1 jtc
20 1.3 thorpej #include <sys/cdefs.h>
21 1.3 thorpej
22 1.3 thorpej __BEGIN_DECLS
23 1.3 thorpej int rmtaccess __P((const char *, int));
24 1.3 thorpej int rmtclose __P((int));
25 1.3 thorpej int rmtcreat __P((const char *, mode_t));
26 1.3 thorpej int rmtdup __P((int));
27 1.3 thorpej int rmtfcntl __P((int, int, ...));
28 1.3 thorpej int rmtfstat __P((int, struct stat *));
29 1.3 thorpej int rmtioctl __P((int, unsigned long, ...));
30 1.3 thorpej int rmtisatty __P((int));
31 1.3 thorpej off_t rmtlseek __P((int, off_t, int));
32 1.3 thorpej int rmtlstat __P((const char *, struct stat *));
33 1.3 thorpej int rmtopen __P((const char *, int, ...));
34 1.3 thorpej ssize_t rmtread __P((int, void *, size_t));
35 1.3 thorpej int rmtstat __P((const char *, struct stat *));
36 1.3 thorpej ssize_t rmtwrite __P((int, const void *, size_t));
37 1.3 thorpej __END_DECLS
38 1.3 thorpej
39 1.3 thorpej #ifndef __RMTLIB_PRIVATE /* don't remap if building librmt */
40 1.1 jtc #define access rmtaccess
41 1.1 jtc #define close rmtclose
42 1.1 jtc #define creat rmtcreat
43 1.1 jtc #define dup rmtdup
44 1.1 jtc #define fcntl rmtfcntl
45 1.3 thorpej #undef fstat
46 1.1 jtc #define fstat rmtfstat
47 1.1 jtc #define ioctl rmtioctl
48 1.1 jtc #define isatty rmtisatty
49 1.1 jtc #define lseek rmtlseek
50 1.3 thorpej #undef lstat
51 1.1 jtc #define lstat rmtlstat
52 1.1 jtc #define open rmtopen
53 1.1 jtc #define read rmtread
54 1.3 thorpej #undef stat
55 1.1 jtc #define stat rmtstat
56 1.1 jtc #define write rmtwrite
57 1.3 thorpej #endif /* __RMTLIB_PRIVATE */
58 1.1 jtc
59 1.2 jtc #endif /* _RMT_H_ */
60