1: /*
2: * $Id: journal.h,v 1.4 2025/04/08 20:00:56 snw Exp $
3: * Function prototypes, structs, and macros for FreeM
4: * journaling implementation
5: *
6: *
7: * Author: Serena Willis <snw@coherent-logic.com>
8: * Copyright (C) 1998 MUG Deutschland
9: * Copyright (C) 2020, 2025 Coherent Logic Development LLC
10: *
11: *
12: * This file is part of FreeM.
13: *
14: * FreeM is free software: you can redistribute it and/or modify
15: * it under the terms of the GNU Affero Public License as published by
16: * the Free Software Foundation, either version 3 of the License, or
17: * (at your option) any later version.
18: *
19: * FreeM is distributed in the hope that it will be useful,
20: * but WITHOUT ANY WARRANTY; without even the implied warranty of
21: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22: * GNU Affero Public License for more details.
23: *
24: * You should have received a copy of the GNU Affero Public License
25: * along with FreeM. If not, see <https://www.gnu.org/licenses/>.
26: *
27: * $Log: journal.h,v $
28: * Revision 1.4 2025/04/08 20:00:56 snw
29: * Global handler now uses a header file and maintains the last journaling transaction ID
30: *
31: * Revision 1.3 2025/03/09 19:14:25 snw
32: * First phase of REUSE compliance and header reformat
33: *
34: *
35: * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
36: * SPDX-License-Identifier: AGPL-3.0-or-later
37: **/
38:
39: #ifndef _JOURNAL_H
40: # define _JOURNAL_H
41:
42: #include <time.h>
43: #include <limits.h>
44:
45: #if !defined(PATH_MAX) && defined(_SCO_DS)
46: # define PATH_MAX 4096
47: #endif
48:
49: #if !defined(PATH_MAX) && defined(__gnu_hurd__)
50: # define PATH_MAX 1024
51: #endif
52:
53: #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
54: # include <sys/syslimits.h>
55: #endif
56:
57: #include "jnldefs.h"
58:
59: extern unsigned long jnl_tran_id;
60: extern short jnl_enabled;
61:
62: extern short jnl_init(char *jnlfile, char *hostid, unsigned long jnl_cut_threshold, unsigned long tran_id);
63: extern short jnl_ent_init(jnl_ent_t *entry);
64: extern short jnl_ent_write(short action, char *key, char *data);
65:
66: #endif
67:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>