Add a header file for fundamental constants/defines

parent d5c1bbd7
......@@ -172,6 +172,7 @@ fellow_sources = \
compiler.h \
debug.h \
$(fellow_state_tables) \
fellow_const.h \
fellow_debug.h \
fellow_inject.h \
fellow_io_backend.h \
......@@ -255,6 +256,7 @@ fellow_log_dbg_SOURCES = fellow_log_dbg.c \
buddy.h \
buddy_util.h \
$(fellow_state_tables) \
fellow_const.h \
fellow_debug.h \
fellow_io_backend.h \
fellow_io.h \
......
/*-
* SPDX-License-Identifier: LGPL-2.1-only
* Copyright 2022 UPLEX Nils Goroll Systemoptimierung. All rights reserved.
* Author: Nils Goroll <nils.goroll@uplex.de>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA Also add information on how to contact you by
* electronic and paper mail.
*/
// minimum disk block = 4096 bytes
#define MIN_FELLOW_BITS 12
#define MIN_FELLOW_BLOCK ((size_t)1 << MIN_FELLOW_BITS)
#define FELLOW_BLOCK_ALIGN (MIN_FELLOW_BLOCK - 1)
#define FELLOW_BLOCK_RNDUP(off) \
(((off) + FELLOW_BLOCK_ALIGN) & ~FELLOW_BLOCK_ALIGN)
......@@ -20,12 +20,7 @@
* electronic and paper mail.
*/
// minimum disk block = 4096 bytes
#define MIN_FELLOW_BITS 12
#define MIN_FELLOW_BLOCK ((size_t)1 << MIN_FELLOW_BITS)
#define FELLOW_BLOCK_ALIGN (MIN_FELLOW_BLOCK - 1)
#define FELLOW_BLOCK_RNDUP(off) \
(((off) + FELLOW_BLOCK_ALIGN) & ~FELLOW_BLOCK_ALIGN)
#include "fellow_const.h"
/*
* fdb encodes offset and size in a single off_t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment