--- freem/src/shmmgr.c 2025/01/19 02:04:04 1.1.1.1 +++ freem/src/shmmgr.c 2025/02/28 20:51:20 1.2 @@ -100,7 +100,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 +473,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); }