Remove do-nothing header <isc/offset.h>

And replace all uses of isc_offset_t with standard off_t
This commit is contained in:
Tony Finch
2022-12-16 11:47:40 +00:00
parent bed09c1676
commit c7615bc28d
10 changed files with 22 additions and 50 deletions

View File

@@ -287,7 +287,7 @@ isc_file_absolutepath(const char *filename, char *path, size_t pathlen);
*/
isc_result_t
isc_file_truncate(const char *filename, isc_offset_t size);
isc_file_truncate(const char *filename, off_t size);
/*%<
* Truncate/extend the file specified to 'size' bytes.
*/

View File

@@ -138,8 +138,8 @@ 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.
*/
isc_offset_t maximum_size;
bool maximum_reached; /*%< Private. */
off_t maximum_size;
bool maximum_reached; /*%< Private. */
} isc_logfile_t;
/*%

View File

@@ -1,25 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
/*! \file
* \brief
* File offsets are operating-system dependent.
*/
#include <limits.h> /* Required for CHAR_BIT. */
#include <stddef.h> /* For Linux Standard Base. */
#include <sys/types.h>
typedef off_t isc_offset_t;

View File

@@ -15,8 +15,7 @@
/*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <time.h>
#include <isc/lang.h>
#include <isc/types.h>

View File

@@ -19,10 +19,10 @@
* \brief
* OS-specific types, from the OS-specific include directories.
*/
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <isc/offset.h>
#include <stddef.h>
#include <stdint.h>
/*
* XXXDCL This is just for ISC_LIST and ISC_LINK, but gets all of the other