php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #75617
Patch patch-ext_recode_recode.c revision 2017-12-03 12:48 UTC by jdolecek at NetBSD dot org

Patch patch-ext_recode_recode.c for Recode related Bug #75617

Patch version 2017-12-03 12:48 UTC

Return to Bug #75617 | Download this patch
Patch Revisions:

Developer: jdolecek@NetBSD.org

$NetBSD: patch-ext_recode_recode.c,v 1.1 2017/11/15 08:56:12 jdolecek Exp $

program_name is expected variable, is required by recode 3.5 and recode 3.6 to actually work.

The config.m4 test for it is broken at least for some platforms -  it only tests if program without it compiles, but on Solaris and MacOS/Darwin at least it only fails when run.

--- ext/recode/recode.c.orig	2016-07-24 13:07:47.000000000 +0000
+++ ext/recode/recode.c
@@ -29,11 +29,8 @@
 
 #if HAVE_LIBRECODE
 
-/* For recode 3.5 */
-#if HAVE_BROKEN_RECODE
-extern char *program_name;
-char *program_name = "php";
-#endif
+extern const char *program_name;
+const char *program_name = "php";
 
 #ifdef HAVE_STDBOOL_H
 # include <stdbool.h>
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 23 02:01:31 2019 UTC