Sync usage with man page.
[netbsd-mini2440.git] / include / rmt.h
blob7bdb2770c25c776014e17b774e433a37775960da
1 /* $NetBSD: rmt.h,v 1.4 1997/10/22 06:59:35 thorpej Exp $ */
3 /*
4 * rmt.h
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
12 * properly.
14 * -- Fred Fish (w/some changes by Arnold Robbins)
17 #ifndef _RMT_H_
18 #define _RMT_H_
20 #include <sys/cdefs.h>
22 __BEGIN_DECLS
23 int rmtaccess(const char *, int);
24 int rmtclose(int);
25 int rmtcreat(const char *, mode_t);
26 int rmtdup(int);
27 int rmtfcntl(int, int, ...);
28 int rmtfstat(int, struct stat *);
29 int rmtioctl(int, unsigned long, ...);
30 int rmtisatty(int);
31 off_t rmtlseek(int, off_t, int);
32 int rmtlstat(const char *, struct stat *);
33 int rmtopen(const char *, int, ...);
34 ssize_t rmtread(int, void *, size_t);
35 int rmtstat(const char *, struct stat *);
36 ssize_t rmtwrite(int, const void *, size_t);
37 __END_DECLS
39 #ifndef __RMTLIB_PRIVATE /* don't remap if building librmt */
40 #define access rmtaccess
41 #define close rmtclose
42 #define creat rmtcreat
43 #define dup rmtdup
44 #define fcntl rmtfcntl
45 #define fstat rmtfstat
46 #define ioctl rmtioctl
47 #define isatty rmtisatty
48 #define lseek rmtlseek
49 #define lstat rmtlstat
50 #define open rmtopen
51 #define read rmtread
52 #define stat rmtstat
53 #define write rmtwrite
54 #endif /* __RMTLIB_PRIVATE */
56 #endif /* _RMT_H_ */