pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/php-apcu



Module Name:    pkgsrc
Committed By:   gdt
Date:           Mon Dec  4 01:34:54 UTC 2023

Modified Files:
        pkgsrc/www/php-apcu: Makefile distinfo
Added Files:
        pkgsrc/www/php-apcu/patches: patch-apc__shm.c

Log Message:
www/php-apcu: Fix type error in printf

The code printed key_t with %d.  POSIX requires only an arithmetic
type, and on NetBSD, it's long.  Cast to intmax_t and use %jd to work
around.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/www/php-apcu/Makefile \
    pkgsrc/www/php-apcu/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/php-apcu/patches/patch-apc__shm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/php-apcu/Makefile
diff -u pkgsrc/www/php-apcu/Makefile:1.23 pkgsrc/www/php-apcu/Makefile:1.24
--- pkgsrc/www/php-apcu/Makefile:1.23   Thu Nov 30 16:31:21 2023
+++ pkgsrc/www/php-apcu/Makefile        Mon Dec  4 01:34:54 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2023/11/30 16:31:21 taca Exp $
+# $NetBSD: Makefile,v 1.24 2023/12/04 01:34:54 gdt Exp $
 
 MODNAME=       apcu
 PECL_VERSION=  5.1.23
+PKGREVISION=   1
 CATEGORIES+=   sysutils
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
Index: pkgsrc/www/php-apcu/distinfo
diff -u pkgsrc/www/php-apcu/distinfo:1.23 pkgsrc/www/php-apcu/distinfo:1.24
--- pkgsrc/www/php-apcu/distinfo:1.23   Thu Nov 30 16:31:21 2023
+++ pkgsrc/www/php-apcu/distinfo        Mon Dec  4 01:34:54 2023
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.23 2023/11/30 16:31:21 taca Exp $
+$NetBSD: distinfo,v 1.24 2023/12/04 01:34:54 gdt Exp $
 
 BLAKE2s (php-apcu/apcu-5.1.23.tgz) = af4d09863f6fc326f3829394a7e4d0e0f8aa22f4023f722d33aabd271c2db44b
 SHA512 (php-apcu/apcu-5.1.23.tgz) = 89e9f10f5d8d1a9503132e80140680be2a10d96f957f69b2f77cc1c496d15cc26dfe4c0368ebe46c72c68d1b4a794d3ddc95942b02d3ba5e8c971b09969058d8
 Size (php-apcu/apcu-5.1.23.tgz) = 90897 bytes
+SHA1 (patch-apc__shm.c) = 174d71ebd3919f0405c8bcf7122ce31ff7d20847
 SHA1 (patch-config.m4) = 5f301583137a0c5a928b7372aa32cd319aa17cc7

Added files:

Index: pkgsrc/www/php-apcu/patches/patch-apc__shm.c
diff -u /dev/null pkgsrc/www/php-apcu/patches/patch-apc__shm.c:1.1
--- /dev/null   Mon Dec  4 01:34:54 2023
+++ pkgsrc/www/php-apcu/patches/patch-apc__shm.c        Mon Dec  4 01:34:54 2023
@@ -0,0 +1,19 @@
+$NetBSD: patch-apc__shm.c,v 1.1 2023/12/04 01:34:54 gdt Exp $
+
+The code assumes key_t is printable with %d (int), but POSIX requires
+only that key_t is an arithmetic type.  Dismiss floating point as
+unreasonable and cast to intmax_t.
+
+Not yet reported upstream.
+
+--- apc_shm.c.orig     2023-12-04 01:27:07.199895899 +0000
++++ apc_shm.c
+@@ -53,7 +53,7 @@ int apc_shm_create(int proj, size_t size
+ 
+       oflag = IPC_CREAT | SHM_R | SHM_A;
+       if ((shmid = shmget(key, size, oflag)) < 0) {
+-              zend_error_noreturn(E_CORE_ERROR, "apc_shm_create: shmget(%d, %zd, %d) failed: %s. It is possible that the chosen SHM segment size is higher than the operation system allows. Linux 
has usually a default limit of 32MB per segment.", key, size, oflag, strerror(errno));
++              zend_error_noreturn(E_CORE_ERROR, "apc_shm_create: shmget(%jd, %zd, %d) failed: %s. It is possible that the chosen SHM segment size is higher than the operation system allows. Linux 
has usually a default limit of 32MB per segment.", (intmax_t) key, size, oflag, strerror(errno));
+       }
+ 
+       return shmid;



Home | Main Index | Thread Index | Old Index