pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/php74/patches



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Tue May 19 10:12:22 UTC 2026

Added Files:
        pkgsrc/lang/php74/patches: patch-ext_standard_scanf.c

Log Message:
php74: Fix for modern C.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/php74/patches/patch-ext_standard_scanf.c

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

Added files:

Index: pkgsrc/lang/php74/patches/patch-ext_standard_scanf.c
diff -u /dev/null pkgsrc/lang/php74/patches/patch-ext_standard_scanf.c:1.1
--- /dev/null   Tue May 19 10:12:22 2026
+++ pkgsrc/lang/php74/patches/patch-ext_standard_scanf.c        Tue May 19 10:12:22 2026
@@ -0,0 +1,50 @@
+$NetBSD: patch-ext_standard_scanf.c,v 1.1 2026/05/19 10:12:22 jperkin Exp $
+
+Fix for modern C.
+
+--- ext/standard/scanf.c.orig  2026-05-19 09:55:56.176982562 +0000
++++ ext/standard/scanf.c
+@@ -585,7 +585,7 @@ PHPAPI int php_sscanf_internal( char *st
+       int  base = 0;
+       int  underflow = 0;
+       size_t width;
+-      zend_long (*fn)() = NULL;
++      zend_long (*fn)(const char *, char **, int) = NULL;
+       char *ch, sch;
+       int  flags;
+       char buf[64];   /* Temporary buffer to hold scanned number
+@@ -750,29 +750,29 @@ literal:
+                       case 'D':
+                               op = 'i';
+                               base = 10;
+-                              fn = (zend_long (*)())ZEND_STRTOL_PTR;
++                              fn = (zend_long (*)(const char *, char **, int))ZEND_STRTOL_PTR;
+                               break;
+                       case 'i':
+                               op = 'i';
+                               base = 0;
+-                              fn = (zend_long (*)())ZEND_STRTOL_PTR;
++                              fn = (zend_long (*)(const char *, char **, int))ZEND_STRTOL_PTR;
+                               break;
+                       case 'o':
+                               op = 'i';
+                               base = 8;
+-                              fn = (zend_long (*)())ZEND_STRTOL_PTR;
++                              fn = (zend_long (*)(const char *, char **, int))ZEND_STRTOL_PTR;
+                               break;
+                       case 'x':
+                       case 'X':
+                               op = 'i';
+                               base = 16;
+-                              fn = (zend_long (*)())ZEND_STRTOL_PTR;
++                              fn = (zend_long (*)(const char *, char **, int))ZEND_STRTOL_PTR;
+                               break;
+                       case 'u':
+                               op = 'i';
+                               base = 10;
+                               flags |= SCAN_UNSIGNED;
+-                              fn = (zend_long (*)())ZEND_STRTOUL_PTR;
++                              fn = (zend_long (*)(const char *, char **, int))ZEND_STRTOUL_PTR;
+                               break;
+ 
+                       case 'f':



Home | Main Index | Thread Index | Old Index