--- freem/src/shmmgr.c 2025/01/19 02:04:04 1.1.1.1 +++ freem/src/shmmgr.c 2025/03/09 19:50:47 1.4 @@ -1,23 +1,11 @@ /* - * * - * * * - * * * - * *************** - * * * * * - * * MUMPS * - * * * * * - * *************** - * * * - * * * - * * - * - * shmmgr.c + * $Id: shmmgr.c,v 1.4 2025/03/09 19:50:47 snw Exp $ * shared memory manager * * - * Author: Serena Willis + * Author: Serena Willis * Copyright (C) 1998 MUG Deutschland - * Copyright (C) 2020 Coherent Logic Development LLC + * Copyright (C) 2020, 2025 Coherent Logic Development LLC * * * This file is part of FreeM. @@ -35,6 +23,13 @@ * You should have received a copy of the GNU Affero Public License * along with FreeM. If not, see . * + * $Log: shmmgr.c,v $ + * Revision 1.4 2025/03/09 19:50:47 snw + * Second phase of REUSE compliance and header reformat + * + * + * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC + * SPDX-License-Identifier: AGPL-3.0-or-later **/ #include @@ -100,7 +95,7 @@ short shm_init(const size_t seg_size) shm_config->seg_id = shmget (shm_config->key, shm_config->segsiz, 0660 | IPC_CREAT); if (shm_config->seg_id == -1) { if (errno == 22) { - fprintf (stderr, "shm_init: cannot get shared memory segment of %d bytes\r\n\r\n", shm_config->segsiz); + fprintf (stderr, "shm_init: cannot get shared memory segment of %ld bytes\r\n\r\n", (unsigned long) shm_config->segsiz); fprintf (stderr, "You may need to tune your kernel parameters, or manually set a smaller shared memory segment size in both the FreeM daemon and each interpreter process by using the `-S` command-line flag.\r\n\r\nPlease refer to the FreeM Platform Notes for your operating system for details.\r\n\r\n"); } return SHMS_GET_ERR; @@ -473,14 +468,14 @@ void shm_dump(void) { printf ("SHARED MEMORY CONFIGURATION\r\n"); - printf (" pgsiz %d\r\n", shm_config->pgsiz); + printf (" pgsiz %ld\r\n", (unsigned long) shm_config->pgsiz); printf (" pgct %d\r\n", shm_config->pgct); - printf (" key %d\r\n", shm_config->key); + printf (" key %ld\r\n", shm_config->key); printf (" segid %d\r\n", shm_config->seg_id); - printf (" sizeof shm_page_t %d\r\n", sizeof (shm_page_t)); - printf (" segsiz %d\r\n", shm_config->segsiz); + printf (" sizeof shm_page_t %ld\r\n", (long) sizeof (shm_page_t)); + printf (" segsiz %ld\r\n", (long) shm_config->segsiz); printf (" shm address %p\r\n", shm_config->dta); - printf (" alloc_map size %d\r\n", sizeof (shm_page_t) * shm_config->pgct); + printf (" alloc_map size %ld\r\n", (unsigned long) sizeof (shm_page_t) * shm_config->pgct); printf (" buf address %p\r\n", shm_config->buf); }