Make this somewhat less yucky:

- Make this work with versioned stat(2)-family functions.
- Prototype the rmt(3) functions here, and make them match the prototypes
  of the functions they're remapping.
- Allow rmtlib.c to include this in a way that doesn't remap any functions.
This commit is contained in:
thorpej 1997-10-21 19:50:55 +00:00
parent 6eb98e720f
commit cfe8d3b81c

View File

@ -1,4 +1,4 @@
/* $NetBSD: rmt.h,v 1.2 1996/08/09 03:59:40 jtc Exp $ */
/* $NetBSD: rmt.h,v 1.3 1997/10/21 19:50:55 thorpej Exp $ */
/*
* rmt.h
@ -17,19 +17,43 @@
#ifndef _RMT_H_
#define _RMT_H_
#include <sys/cdefs.h>
__BEGIN_DECLS
int rmtaccess __P((const char *, int));
int rmtclose __P((int));
int rmtcreat __P((const char *, mode_t));
int rmtdup __P((int));
int rmtfcntl __P((int, int, ...));
int rmtfstat __P((int, struct stat *));
int rmtioctl __P((int, unsigned long, ...));
int rmtisatty __P((int));
off_t rmtlseek __P((int, off_t, int));
int rmtlstat __P((const char *, struct stat *));
int rmtopen __P((const char *, int, ...));
ssize_t rmtread __P((int, void *, size_t));
int rmtstat __P((const char *, struct stat *));
ssize_t rmtwrite __P((int, const void *, size_t));
__END_DECLS
#ifndef __RMTLIB_PRIVATE /* don't remap if building librmt */
#define access rmtaccess
#define close rmtclose
#define creat rmtcreat
#define dup rmtdup
#define fcntl rmtfcntl
#undef fstat
#define fstat rmtfstat
#define ioctl rmtioctl
#define isatty rmtisatty
#define lseek rmtlseek
#undef lstat
#define lstat rmtlstat
#define open rmtopen
#define read rmtread
#undef stat
#define stat rmtstat
#define write rmtwrite
#endif /* __RMTLIB_PRIVATE */
#endif /* _RMT_H_ */