Home | History | Annotate | Line # | Download | only in include
rmt.h revision 1.6
      1  1.6    enami /*	$NetBSD: rmt.h,v 1.6 2010/08/31 05:12:35 enami 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.6    enami int	isrmt(int);
     24  1.5    perry int	rmtaccess(const char *, int);
     25  1.5    perry int	rmtclose(int);
     26  1.5    perry int	rmtcreat(const char *, mode_t);
     27  1.5    perry int	rmtdup(int);
     28  1.5    perry int	rmtfcntl(int, int, ...);
     29  1.5    perry int	rmtfstat(int, struct stat *);
     30  1.5    perry int	rmtioctl(int, unsigned long, ...);
     31  1.5    perry int	rmtisatty(int);
     32  1.5    perry off_t	rmtlseek(int, off_t, int);
     33  1.5    perry int	rmtlstat(const char *, struct stat *);
     34  1.5    perry int	rmtopen(const char *, int, ...);
     35  1.5    perry ssize_t	rmtread(int, void *, size_t);
     36  1.5    perry int	rmtstat(const char *, struct stat *);
     37  1.5    perry ssize_t	rmtwrite(int, const void *, size_t);
     38  1.3  thorpej __END_DECLS
     39  1.3  thorpej 
     40  1.3  thorpej #ifndef __RMTLIB_PRIVATE	/* don't remap if building librmt */
     41  1.1      jtc #define access rmtaccess
     42  1.1      jtc #define close rmtclose
     43  1.1      jtc #define creat rmtcreat
     44  1.1      jtc #define dup rmtdup
     45  1.1      jtc #define fcntl rmtfcntl
     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.1      jtc #define lstat rmtlstat
     51  1.1      jtc #define open rmtopen
     52  1.1      jtc #define read rmtread
     53  1.1      jtc #define stat rmtstat
     54  1.1      jtc #define write rmtwrite
     55  1.3  thorpej #endif /* __RMTLIB_PRIVATE */
     56  1.1      jtc 
     57  1.2      jtc #endif /* _RMT_H_ */
     58