summaryrefslogtreecommitdiffstats
path: root/newt-svn.patch
diff options
context:
space:
mode:
Diffstat (limited to 'newt-svn.patch')
-rw-r--r--newt-svn.patch320
1 files changed, 0 insertions, 320 deletions
diff --git a/newt-svn.patch b/newt-svn.patch
deleted file mode 100644
index 84724c8..0000000
--- a/newt-svn.patch
+++ /dev/null
@@ -1,320 +0,0 @@
---- pecl/newt/trunk/newt.c 2013/10/12 22:58:46 331791
-+++ pecl/newt/trunk/newt.c 2013/10/13 14:38:40 331792
-@@ -3615,7 +3615,7 @@
-
- items[i].text = Z_STRVAL_PP(z_item_text);
- strs[i] = Z_STRVAL_PP(z_item_value);
-- items[i].value = (const char **)&strs[i];
-+ items[i].value = &strs[i];
- items[i].flags = (z_item_flags ? Z_LVAL_PP(z_item_flags) : 0);
-
- i++;
---- pecl/newt/trunk/newt.c 2013/10/13 14:38:40 331792
-+++ pecl/newt/trunk/newt.c 2013/10/13 14:39:50 331793
-@@ -3129,7 +3129,7 @@
- newtComponent val;
- long pad_left, pad_top, pad_right, pad_bottom, anchor, flags = 0;
-
-- if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "rlllrlllll|l", &z_grid, &col, &row, &z_val, &pad_left,
-+ if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "rlllrlllll|l", &z_grid, &col, &row, &type, &z_val, &pad_left,
- &pad_top, &pad_right, &pad_bottom, &anchor, &flags) == FAILURE) {
- return;
- }
---- pecl/newt/trunk/newt.c 2013/10/13 14:39:50 331793
-+++ pecl/newt/trunk/newt.c 2013/10/13 15:08:10 331794
-@@ -47,6 +47,11 @@
- ZEND_ARG_PASS_INFO(1)
- ZEND_END_ARG_INFO()
-
-+ZEND_BEGIN_ARG_INFO(both_arg_force_ref, 0)
-+ ZEND_ARG_PASS_INFO(1)
-+ ZEND_ARG_PASS_INFO(1)
-+ZEND_END_ARG_INFO()
-+
- ZEND_BEGIN_ARG_INFO(secondandthird_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(1)
-@@ -135,11 +140,7 @@
- #ifdef HAVE_NEWT_LISTITEM_GET_DATA
- PHP_FE(newt_listitem_get_data, NULL)
- #endif
--#ifdef all_args_by_ref
-- PHP_FE(newt_get_screen_size, all_args_by_ref)
--#else
-- PHP_FE(newt_get_screen_size, NULL)
--#endif
-+ PHP_FE(newt_get_screen_size, both_arg_force_ref)
- PHP_FE(newt_label, NULL)
- PHP_FE(newt_label_set_text, NULL)
- PHP_FE(newt_vertical_scrollbar, NULL)
---- pecl/newt/trunk/examples/newt_win_menu.php 2013/10/13 15:08:10 331794
-+++ pecl/newt/trunk/examples/newt_win_menu.php 2013/10/13 15:09:23 331795
-@@ -5,7 +5,7 @@
- $options = array("eth0", "eth1", "lo");
- $option = 1;
-
-- $rc = newt_win_menu("Network configuration tool", "Which interface to configure?", 30, 0, 20, 6, $options, &$option, "Ok", "Back");
-+ $rc = newt_win_menu("Network configuration tool", "Which interface to configure?", 30, 0, 20, 6, $options, $option, "Ok", "Back");
-
- newt_finished ();
-
---- pecl/newt/trunk/examples/redhat_netconf_example.php 2013/10/13 15:08:10 331794
-+++ pecl/newt/trunk/examples/redhat_netconf_example.php 2013/10/13 15:09:23 331795
-@@ -6,7 +6,7 @@
- newt_push_help_line (null);
- newt_draw_root_text (-30, 0, "(c) 1999-2002 RedHat, Inc");
-
-- newt_get_screen_size (&$rows, &$cols);
-+ newt_get_screen_size ($rows, $cols);
-
- newt_open_window ($rows/2-17, $cols/2-10, 34, 17, "Choose a Tool");
-
---- pecl/newt/trunk/newt_vcall.c 2013/10/13 15:09:23 331795
-+++ pecl/newt/trunk/newt_vcall.c 2013/10/13 15:12:56 331796
-@@ -125,6 +125,7 @@
- case 99: return f(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20],a[21],a[22],a[23],a[24],a[25],a[26],a[27],a[28],a[29],a[30],a[31],a[32],a[33],a[34],a[35],a[36],a[37],a[38],a[39],a[40],a[41],a[42],a[43],a[44],a[45],a[46],a[47],a[48],a[49],a[50],a[51],a[52],a[53],a[54],a[55],a[56],a[57],a[58],a[59],a[60],a[61],a[62],a[63],a[64],a[65],a[66],a[67],a[68],a[69],a[70],a[71],a[72],a[73],a[74],a[75],a[76],a[77],a[78],a[79],a[80],a[81],a[82],a[83],a[84],a[85],a[86],a[87],a[88],a[89],a[90],a[91],a[92],a[93],a[94],a[95],a[96],a[97],a[98],NULL);
- case 100: return f(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20],a[21],a[22],a[23],a[24],a[25],a[26],a[27],a[28],a[29],a[30],a[31],a[32],a[33],a[34],a[35],a[36],a[37],a[38],a[39],a[40],a[41],a[42],a[43],a[44],a[45],a[46],a[47],a[48],a[49],a[50],a[51],a[52],a[53],a[54],a[55],a[56],a[57],a[58],a[59],a[60],a[61],a[62],a[63],a[64],a[65],a[66],a[67],a[68],a[69],a[70],a[71],a[72],a[73],a[74],a[75],a[76],a[77],a[78],a[79],a[80],a[81],a[82],a[83],a[84],a[85],a[86],a[87],a[88],a[89],a[90],a[91],a[92],a[93],a[94],a[95],a[96],a[97],a[98],a[99],NULL);
- }
-+ return NULL;
- }
-
- /*
---- pecl/newt/trunk/newt.c 2013/10/13 15:12:56 331796
-+++ pecl/newt/trunk/newt.c 2013/10/13 15:38:00 331797
-@@ -1932,7 +1932,7 @@
-
- int argc = ZEND_NUM_ARGS();
- if (argc < 5) { WRONG_PARAM_COUNT; }
-- if (zend_parse_parameters ((argc - 1) TSRMLS_CC, "rszl", &z_checkboxtree, &text, &text_len, &z_data, &flags) == FAILURE) {
-+ if (zend_parse_parameters (4 TSRMLS_CC, "rszl", &z_checkboxtree, &text, &text_len, &z_data, &flags) == FAILURE) {
- return;
- }
-
-@@ -1946,7 +1946,7 @@
-
- PHP_NEWT_STORE_DATA (z_data, key);
-
-- newt_args = (void **) safe_emalloc (argc, sizeof(void *), 0);
-+ newt_args = (void **) safe_emalloc (argc+1, sizeof(void *), 0);
- newt_args[0] = (void *)checkboxtree;
- newt_args[1] = (void *)text;
- newt_args[2] = (void *)key;
-@@ -1961,8 +1961,9 @@
- }
- newt_args[i] = (void *)Z_LVAL_PP(args[i]);
- }
--
-- newt_vcall ((void *)newtCheckboxTreeAddItem, newt_args, argc);
-+ /* add NEWT_ARG_LAST is forgotten by user to avoid segfault, bug #64990 */
-+ newt_args[argc] = (void *)NEWT_ARG_LAST;
-+ newt_vcall ((void *)newtCheckboxTreeAddItem, newt_args, argc+1);
-
- efree (newt_args);
- efree (args);
---- pecl/newt/trunk/newt.c 2013/10/13 16:10:23 331800
-+++ pecl/newt/trunk/newt.c 2013/10/13 17:13:01 331801
-@@ -249,6 +249,13 @@
- };
- /* }}} */
-
-+ZEND_DECLARE_MODULE_GLOBALS (newt)
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
-+/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-+static PHP_GINIT_FUNCTION(newt);
-+static PHP_GSHUTDOWN_FUNCTION(newt);
-+#endif
-+
- /* {{{ newt_module_entry
- */
- zend_module_entry newt_module_entry = {
-@@ -261,19 +268,33 @@
- NULL,
- PHP_MINFO(newt),
- PHP_NEWT_VERSION,
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
-+ /* This check allows PECL builds from this file to be portable to older PHP releases */
-+ PHP_MODULE_GLOBALS(newt),
-+ PHP_GINIT(newt),
-+ PHP_GSHUTDOWN(newt),
-+ NULL,
-+ STANDARD_MODULE_PROPERTIES_EX
-+#else
- STANDARD_MODULE_PROPERTIES
-+#endif
- };
- /* }}} */
-
--ZEND_DECLARE_MODULE_GLOBALS (newt)
--
- #ifdef COMPILE_DL_NEWT
- ZEND_GET_MODULE(newt)
- #endif
-
--/* {{{ php_newt_init_globals
-+/* {{{ PHP_GINIT_FUNCTION
-+ *
-+ * Zerofill globals during module init
- */
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
-+/* This check allows PECL builds from this file to be portable to older PHP releases */
-+static PHP_GINIT_FUNCTION(newt)
-+#else
- static void php_newt_init_globals (zend_newt_globals *newt_globals TSRMLS_DC)
-+#endif
- {
- newt_globals->newt_has_inited = 0;
-
-@@ -282,9 +303,16 @@
- }
- /* }}} */
-
--/* {{{ php_newt_destroy_globals
-+/* {{{ PHP_GSHUTDOWN_FUNCTION
-+ *
-+ * Called for thread shutdown in ZTS, after module shutdown for non-ZTS
- */
-+/* This check allows PECL builds from this file to be portable to older PHP releases */
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
-+static PHP_GSHUTDOWN_FUNCTION(newt)
-+#else
- static void php_newt_destroy_globals(zend_newt_globals *newt_globals TSRMLS_DC)
-+#endif
- {
- if (newt_globals->newt_has_inited) {
- newtFinished();
-@@ -295,6 +323,7 @@
- }
- /* }}} */
-
-+
- /* {{{ php_newt_free_cb
- */
- void php_newt_free_cb (php_newt_cb **cb_ptr)
-@@ -397,7 +426,12 @@
- le_newt_comp = zend_register_list_destructors_ex(NULL, NULL, le_newt_comp_name, module_number);
- le_newt_grid = zend_register_list_destructors_ex(NULL, NULL, le_newt_grid_name, module_number);
-
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5)
-+ /* This check allows PECL builds from this file to be portable to older PHP releases */
-+ /* this is handled by new globals management code */
-+#else
- ZEND_INIT_MODULE_GLOBALS (newt, php_newt_init_globals, php_newt_destroy_globals);
-+#endif
-
- /* Colorsets */
- REGISTER_NEWT_CONSTANT(NEWT_COLORSET_ROOT);
-@@ -548,8 +582,11 @@
- */
- PHP_MSHUTDOWN_FUNCTION(newt)
- {
-+/* Work around PHP_GSHUTDOWN_FUNCTION not being called in older versions of PHP */
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 2) || (PHP_MAJOR_VERSION < 5)
- #ifndef ZTS
- php_newt_destroy_globals (&newt_globals TSRMLS_CC);
-+#endif
- #endif
-
- return SUCCESS;
---- pecl/newt/trunk/php_newt.h 2013/10/13 16:10:23 331800
-+++ pecl/newt/trunk/php_newt.h 2013/10/13 17:13:01 331801
-@@ -232,8 +232,6 @@
- static void newt_suspend_callback_wrapper (void *cb_key);
- static void newt_help_callback_wrapper (newtComponent form, char *help);
-
--static void php_newt_init_globals (zend_newt_globals *newt_globals TSRMLS_DC);
--static void php_newt_destroy_globals(zend_newt_globals *newt_globals TSRMLS_DC);
- void php_newt_free_cb (php_newt_cb **cb_ptr);
- int php_newt_fetch_resource (zval *rsrc, void *data, int le_type);
-
---- pecl/newt/trunk/config.m4 2013/10/13 17:43:44 331807
-+++ pecl/newt/trunk/config.m4 2013/10/13 17:54:46 331808
-@@ -32,12 +32,12 @@
-
- if test "$PHP_CURSES_DIR" != "no"; then
- for i in $PHP_CURSES_DIR /usr/local /usr; do
-- if test -f $i/lib/libncurses.$SHLIB_SUFFIX_NAME -o -f $i/lib/libncurses.a; then
-- PHP_ADD_LIBRARY_WITH_PATH(ncurses, $i/lib, NEWT_SHARED_LIBADD)
-+ if test -f $i/$PHP_LIBDIR/libncurses.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libncurses.a; then
-+ PHP_ADD_LIBRARY_WITH_PATH(ncurses, $i/$PHP_LIBDIR, NEWT_SHARED_LIBADD)
- break
- fi
-- if test -f $i/lib/libcurses.$SHLIB_SUFFIX_NAME -o -f $i/lib/libcurses.a; then
-- PHP_ADD_LIBRARY_WITH_PATH(curses, $i/lib, NEWT_SHARED_LIBADD)
-+ if test -f $i/$PHP_LIBDIR/libcurses.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libcurses.a; then
-+ PHP_ADD_LIBRARY_WITH_PATH(curses, $i/$PHP_LIBDIR, NEWT_SHARED_LIBADD)
- break
- fi
- done
-@@ -45,8 +45,8 @@
-
- if test "$PHP_SLANG_DIR" != "no"; then
- for i in $PHP_SLANG_DIR /usr/local /usr; do
-- if test -f $i/lib/libslang.$SHLIB_SUFFIX_NAME -o -f $i/lib/libslang.a; then
-- PHP_ADD_LIBRARY_WITH_PATH(slang, $i/lib, NEWT_SHARED_LIBADD)
-+ if test -f $i/$PHP_LIBDIR/libslang.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libslang.a; then
-+ PHP_ADD_LIBRARY_WITH_PATH(slang, $i/$PHP_LIBDIR, NEWT_SHARED_LIBADD)
- break
- fi
- done
-@@ -57,44 +57,44 @@
- PHP_CHECK_LIBRARY(newt,newtInit,
- [
- PHP_ADD_INCLUDE($NEWT_DIR/include)
-- PHP_ADD_LIBRARY_WITH_PATH(newt, $NEWT_DIR/lib, NEWT_SHARED_LIBADD)
-+ PHP_ADD_LIBRARY_WITH_PATH(newt, $NEWT_DIR/$PHP_LIBDIR, NEWT_SHARED_LIBADD)
- AC_DEFINE(HAVE_NEWTLIB,1,[ ])
- ],[
- AC_MSG_ERROR([newt extension requires libnewt])
- ],[
-- -L$NEWT_DIR/lib
-+ -L$NEWT_DIR/$PHP_LIBDIR
- ])
-
- PHP_SUBST(NEWT_SHARED_LIBADD)
-
-- PHP_CHECK_LIBRARY(newt, newtListitem, [AC_DEFINE(HAVE_NEWT_LISTITEM,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtListitemSet, [AC_DEFINE(HAVE_NEWT_LISTITEM_SET,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtListitemGetData, [AC_DEFINE(HAVE_NEWT_LISTITEM_GET_DATA,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtResizeScreen, [AC_DEFINE(HAVE_NEWT_RESIZE_SCREEN,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtListboxItemCount, [AC_DEFINE(HAVE_NEWT_LISTBOX_ITEM_COUNT,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtSetHelpCallback, [AC_DEFINE(HAVE_NEWT_SET_HELP_CALLBACK,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtCursorOff, [AC_DEFINE(HAVE_NEWT_CURSOR_OFF,1,[ ])],, [-L$NEWT_DIR/lib])
-- PHP_CHECK_LIBRARY(newt, newtCursorOn, [AC_DEFINE(HAVE_NEWT_CURSOR_ON,1,[ ])],, [-L$NEWT_DIR/lib])
-+ PHP_CHECK_LIBRARY(newt, newtListitem, [AC_DEFINE(HAVE_NEWT_LISTITEM,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtListitemSet, [AC_DEFINE(HAVE_NEWT_LISTITEM_SET,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtListitemGetData, [AC_DEFINE(HAVE_NEWT_LISTITEM_GET_DATA,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtResizeScreen, [AC_DEFINE(HAVE_NEWT_RESIZE_SCREEN,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtListboxItemCount, [AC_DEFINE(HAVE_NEWT_LISTBOX_ITEM_COUNT,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtSetHelpCallback, [AC_DEFINE(HAVE_NEWT_SET_HELP_CALLBACK,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtCursorOff, [AC_DEFINE(HAVE_NEWT_CURSOR_OFF,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-+ PHP_CHECK_LIBRARY(newt, newtCursorOn, [AC_DEFINE(HAVE_NEWT_CURSOR_ON,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- PHP_CHECK_LIBRARY(newt, newtCheckboxTreeGetCurrent, [
-- AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_GET_CURRENT,1,[ ])],, [-L$NEWT_DIR/lib])
-+ AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_GET_CURRENT,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- PHP_CHECK_LIBRARY(newt, newtCheckboxTreeSetCurrent, [
-- AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_CURRENT,1,[ ])],, [-L$NEWT_DIR/lib])
-+ AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_CURRENT,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- PHP_CHECK_LIBRARY(newt, newtCheckboxTreeSetEntry, [
-- AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_ENTRY,1,[ ])],, [-L$NEWT_DIR/lib])
-+ AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_ENTRY,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- PHP_CHECK_LIBRARY(newt, newtCheckboxTreeSetWidth, [
-- AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_WIDTH,1,[ ])],, [-L$NEWT_DIR/lib])
-+ AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_WIDTH,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- PHP_CHECK_LIBRARY(newt, newtCheckboxTreeGetEntryValue, [
-- AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_GET_ENTRY_VALUE,1,[ ])],, [-L$NEWT_DIR/lib])
-+ AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_GET_ENTRY_VALUE,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- PHP_CHECK_LIBRARY(newt, newtCheckboxTreeSetEntryValue, [
-- AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_ENTRY_VALUE,1,[ ])],, [-L$NEWT_DIR/lib])
-+ AC_DEFINE(HAVE_NEWT_CHECKBOX_TREE_SET_ENTRY_VALUE,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
-- PHP_CHECK_LIBRARY(newt, newtFormSetTimer, [AC_DEFINE(HAVE_NEWT_FORM_SET_TIMER,1,[ ])],, [-L$NEWT_DIR/lib])
-+ PHP_CHECK_LIBRARY(newt, newtFormSetTimer, [AC_DEFINE(HAVE_NEWT_FORM_SET_TIMER,1,[ ])],, [-L$NEWT_DIR/$PHP_LIBDIR])
-
- AC_MSG_CHECKING([if newtExistStruct has u.watch])
-