116. [func] Added <isc/offset.h> for isc_offset_t
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/assertions.h>
|
||||
#include <isc/error.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -830,19 +828,13 @@ typedef enum {
|
||||
JOURNAL_STATE_TRANSACTION
|
||||
} journal_state_t;
|
||||
|
||||
/*
|
||||
* XXXRTH We use 'off_t' in the following structure. If we continue to
|
||||
* use stdio instead of creating an ISC file module, we'll convert
|
||||
* 'off_t' to 'long'.
|
||||
*/
|
||||
|
||||
struct dns_journal {
|
||||
unsigned int magic; /* JOUR */
|
||||
isc_mem_t *mctx; /* Memory context */
|
||||
journal_state_t state;
|
||||
const char *filename; /* Journal file name */
|
||||
FILE * fp; /* File handle */
|
||||
off_t offset; /* Current file offset */
|
||||
isc_offset_t offset; /* Current file offset */
|
||||
journal_header_t header; /* In-core journal header */
|
||||
journal_pos_t *index; /* In-core journal index */
|
||||
|
||||
|
||||
@@ -15,13 +15,11 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.h,v 1.17 2000/04/27 23:44:44 tale Exp $ */
|
||||
/* $Id: log.h,v 1.18 2000/04/28 00:36:55 tale Exp $ */
|
||||
|
||||
#ifndef ISC_LOG_H
|
||||
#define ISC_LOG_H 1
|
||||
|
||||
#include <sys/types.h> /* XXXDCL NT; need for off_t on some systems */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <syslog.h> /* XXXDCL NT */
|
||||
@@ -108,8 +106,7 @@ typedef struct isc_logfile {
|
||||
* anyone would want). st_size returned by fstat should be typedef'd
|
||||
* to a size large enough for the largest possible file on a system.
|
||||
*/
|
||||
/* XXXDCL NT */
|
||||
off_t maximum_size;
|
||||
isc_offset_t maximum_size;
|
||||
} isc_logfile_t;
|
||||
|
||||
/*
|
||||
|
||||
@@ -18,8 +18,21 @@
|
||||
#ifndef ISC_TYPES_H
|
||||
#define ISC_TYPES_H 1
|
||||
|
||||
/*
|
||||
* OS-specific types, from the OS-specific include directories.
|
||||
*/
|
||||
#include <isc/int.h>
|
||||
#include <isc/offset.h>
|
||||
|
||||
/*
|
||||
* XXXDCL should isc_boolean_t be moved here, requiring an explicit include
|
||||
* of <isc/boolean.h> when ISC_TRUE/ISC_FALSE/ISC_TF() are desired?
|
||||
*/
|
||||
#include <isc/boolean.h>
|
||||
/*
|
||||
* XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other
|
||||
* list macros too.
|
||||
*/
|
||||
#include <isc/list.h>
|
||||
|
||||
/***
|
||||
@@ -30,7 +43,7 @@ typedef struct isc_bitstring isc_bitstring_t;
|
||||
typedef struct isc_buffer isc_buffer_t;
|
||||
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t;
|
||||
typedef struct isc_event isc_event_t;
|
||||
typedef ISC_LIST(struct isc_event) isc_eventlist_t;
|
||||
typedef ISC_LIST(isc_event_t) isc_eventlist_t;
|
||||
typedef unsigned int isc_eventtype_t;
|
||||
typedef struct isc_interface isc_interface_t;
|
||||
typedef struct isc_interfaceiter isc_interfaceiter_t;
|
||||
|
||||
31
lib/isc/unix/include/isc/offset.h
Normal file
31
lib/isc/unix/include/isc/offset.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2000 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: offset.h,v 1.1 2000/04/28 00:36:56 tale Exp $ */
|
||||
|
||||
#ifndef ISC_OFFSET_T
|
||||
#define ISC_OFFSET_T 1
|
||||
|
||||
/*
|
||||
* File offsets are operating-system dependent.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef isc_offset_t off_t;
|
||||
|
||||
#endif /* ISC_OFFSET_T */
|
||||
Reference in New Issue
Block a user