|
|
| version 1.1, 2025/01/19 02:04:04 | version 1.5, 2025/03/24 02:57:25 |
|---|---|
| Line 1 | Line 1 |
| /* | /* |
| * * | * $Id$ |
| * * * | |
| * * * | |
| * *************** | |
| * * * * * | |
| * * MUMPS * | |
| * * * * * | |
| * *************** | |
| * * * | |
| * * * | |
| * * | |
| * | |
| * locktab.c | |
| * lock table implementation | * lock table implementation |
| * | * |
| * | * |
| * Author: Serena Willis <jpw@coherent-logic.com> | * Author: Serena Willis <snw@coherent-logic.com> |
| * Copyright (C) 1998 MUG Deutschland | * Copyright (C) 1998 MUG Deutschland |
| * Copyright (C) 2021 Coherent Logic Development LLC | * Copyright (C) 2021, 2025 Coherent Logic Development LLC |
| * | * |
| * | * |
| * This file is part of FreeM. | * This file is part of FreeM. |
| Line 35 | Line 23 |
| * You should have received a copy of the GNU Affero Public License | * You should have received a copy of the GNU Affero Public License |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | |
| * Revision 1.5 2025/03/24 02:57:25 snw | |
| * Shared memory compatibility fixes for OS/2 | |
| * | |
| * Revision 1.4 2025/03/09 19:14:25 snw | |
| * First phase of REUSE compliance and header reformat | |
| * | |
| * | |
| * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC | |
| * SPDX-License-Identifier: AGPL-3.0-or-later | |
| **/ | **/ |
| #include <stdio.h> | #include <stdio.h> |
| Line 49 | Line 47 |
| #include "mref.h" | #include "mref.h" |
| #include "transact.h" | #include "transact.h" |
| #if !defined(__OpenBSD__) && !defined(__APPLE__) | #if !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__OS2__) |
| union semun { | union semun { |
| int val; /* Value for SETVAL */ | int val; /* Value for SETVAL */ |
| struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ | struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ |
| Line 441 locktab_ent_t *locktab_find(char *key) | Line 439 locktab_ent_t *locktab_find(char *key) |
| snprintf (chk_ns, 255, "SYSTEM"); | snprintf (chk_ns, 255, "SYSTEM"); |
| } | } |
| else { | else { |
| snprintf (chk_ns, 255, nsname); | snprintf (chk_ns, 255, "%s", nsname); |
| } | } |
| for (lck = shm_config->hdr->locktab_head; lck != NULL; lck = lck->next) { | for (lck = shm_config->hdr->locktab_head; lck != NULL; lck = lck->next) { |