1 /* $NetBSD: rmt.h,v 1.6 2010/08/31 05:12:35 enami Exp $ */
6 * Added routines to replace open(), close(), lseek(), ioctl(), etc.
7 * The preprocessor can be used to remap these the rmtopen(), etc
8 * thus minimizing source changes.
10 * This file must be included before <sys/stat.h>, since it redefines
11 * stat to be rmtstat, so that struct stat xyzzy; declarations work
14 * -- Fred Fish (w/some changes by Arnold Robbins)
20 #include <sys/cdefs.h>
24 int rmtaccess(const char *, int);
26 int rmtcreat(const char *, mode_t
);
28 int rmtfcntl(int, int, ...);
29 int rmtfstat(int, struct stat
*);
30 int rmtioctl(int, unsigned long, ...);
32 off_t
rmtlseek(int, off_t
, int);
33 int rmtlstat(const char *, struct stat
*);
34 int rmtopen(const char *, int, ...);
35 ssize_t
rmtread(int, void *, size_t);
36 int rmtstat(const char *, struct stat
*);
37 ssize_t
rmtwrite(int, const void *, size_t);
40 #ifndef __RMTLIB_PRIVATE /* don't remap if building librmt */
41 #define access rmtaccess
42 #define close rmtclose
43 #define creat rmtcreat
45 #define fcntl rmtfcntl
46 #define fstat rmtfstat
47 #define ioctl rmtioctl
48 #define isatty rmtisatty
49 #define lseek rmtlseek
50 #define lstat rmtlstat
54 #define write rmtwrite
55 #endif /* __RMTLIB_PRIVATE */