Add $FreeBSD$
Rename local offsetof() macro to boffsetof() to avoid clashing with the offsetof() from <stddef.h>
This commit is contained in:
parent
2e283b0a0c
commit
c23d986ebe
@ -31,6 +31,8 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)def.h 8.2 (Berkeley) 3/21/94
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -94,7 +96,7 @@ struct message {
|
||||
* Given a file address, determine the block number it represents.
|
||||
*/
|
||||
#define blockof(off) ((int) ((off) / 4096))
|
||||
#define offsetof(off) ((int) ((off) % 4096))
|
||||
#define boffsetof(off) ((int) ((off) % 4096))
|
||||
#define positionof(block, offset) ((off_t)(block) * 4096 + (offset))
|
||||
|
||||
/*
|
||||
|
@ -29,6 +29,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -111,7 +113,7 @@ edit1(msgvec, type)
|
||||
(void) fseek(otf, 0L, 2);
|
||||
size = ftell(otf);
|
||||
mp->m_block = blockof(size);
|
||||
mp->m_offset = offsetof(size);
|
||||
mp->m_offset = boffsetof(size);
|
||||
mp->m_size = fsize(fp);
|
||||
mp->m_lines = 0;
|
||||
mp->m_flag |= MODIFY;
|
||||
|
@ -29,6 +29,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -109,7 +111,7 @@ setptr(ibuf)
|
||||
this.m_size = 0;
|
||||
this.m_lines = 0;
|
||||
this.m_block = blockof(offset);
|
||||
this.m_offset = offsetof(offset);
|
||||
this.m_offset = boffsetof(offset);
|
||||
inhead = 1;
|
||||
} else if (linebuf[0] == 0) {
|
||||
inhead = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user