Commit c852c28a authored by Sean Finney's avatar Sean Finney

Merge branch 'upstream-experimental' into upstream-sid

parents 176cbd0b 0fab6db7

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -2,13 +2,16 @@ define ____executor_globals ...@@ -2,13 +2,16 @@ define ____executor_globals
if basic_functions_module.zts if basic_functions_module.zts
set $tsrm_ls = ts_resource_ex(0, 0) set $tsrm_ls = ts_resource_ex(0, 0)
set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1]) set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1])
set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
else else
set $eg = executor_globals set $eg = executor_globals
set $cg = compiler_globals
end end
end end
document ____executor_globals document ____executor_globals
portable way of accessing executor_globals, set $eg portable way of accessing executor_globals, set $eg
this also sets compiler_globals to $cg
ZTS detection is automatically based on ext/standard module struct ZTS detection is automatically based on ext/standard module struct
end end
...@@ -65,8 +68,8 @@ define ____printzv_contents ...@@ -65,8 +68,8 @@ define ____printzv_contents
set $zvalue = $arg0 set $zvalue = $arg0
set $type = $zvalue->type set $type = $zvalue->type
printf "(refcount=%d", $zvalue->refcount printf "(refcount=%d", $zvalue->refcount__gc
if $zvalue->is_ref if $zvalue->is_ref__gc
printf ",is_ref" printf ",is_ref"
end end
printf ") " printf ") "
......
This diff is collapsed.
This diff is collapsed.
...@@ -198,13 +198,18 @@ Apache 1.3.x on Unix systems ...@@ -198,13 +198,18 @@ Apache 1.3.x on Unix systems
13. Setup your php.ini file: 13. Setup your php.ini file:
cp php.ini-dist /usr/local/lib/php.ini PHP will use the built-in default values if no php.ini file was
placed in the configuration directory. The default location is
You may edit your .ini file to set PHP options. If you prefer your /usr/local/lib, if you prefer your php.ini in another location, use
php.ini in another location, use --with-config-file-path=/some/path in --with-config-file-path=/some/path in step 10.
step 10.
The PHP distribution provides two sample php.ini files, you can use them
If you instead choose php.ini-recommended, be certain to read the list by
cp php.ini-development /usr/local/lib/php.ini
or
cp php.ini-production /usr/local/lib/php.ini
If you choose one of these php.ini files be certain to read the list
of changes within, as they affect how PHP behaves. of changes within, as they affect how PHP behaves.
14. Edit your httpd.conf to load the PHP module. The path on the right hand 14. Edit your httpd.conf to load the PHP module. The path on the right hand
...@@ -1372,7 +1377,7 @@ Compiling shared PECL extensions with phpize ...@@ -1372,7 +1377,7 @@ Compiling shared PECL extensions with phpize
Sometimes, using the pecl installer is not an option. This could be Sometimes, using the pecl installer is not an option. This could be
because you're behind a firewall, or it could be because the extension because you're behind a firewall, or it could be because the extension
you want to install is not available as a PECL compatible package, such you want to install is not available as a PECL compatible package, such
as unreleased extensions from CVS. If you need to build such an as unreleased extensions from SVN. If you need to build such an
extension, you can use the lower-level build tools to perform the build extension, you can use the lower-level build tools to perform the build
manually. manually.
...@@ -1519,7 +1524,7 @@ The configuration file ...@@ -1519,7 +1524,7 @@ The configuration file
directives are documented in the manual though. For a complete list of directives are documented in the manual though. For a complete list of
directives available in your PHP version, please read your well directives available in your PHP version, please read your well
commented php.ini file. Alternatively, you may find the the latest commented php.ini file. Alternatively, you may find the the latest
php.ini from CVS helpful too. php.ini from SVN helpful too.
Example 6-1. php.ini example Example 6-1. php.ini example
; any text on a line after an unquoted semicolon (;) is ignored ; any text on a line after an unquoted semicolon (;) is ignored
......
-------------------------------------------------------------------- --------------------------------------------------------------------
The PHP License, version 3.01 The PHP License, version 3.01
Copyright (c) 1999 - 2006 The PHP Group. All rights reserved. Copyright (c) 1999 - 2009 The PHP Group. All rights reserved.
-------------------------------------------------------------------- --------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
......
...@@ -7,7 +7,7 @@ $(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h ...@@ -7,7 +7,7 @@ $(builddir)/zend_language_scanner.lo: $(srcdir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h $(builddir)/zend_ini_scanner.lo: $(srcdir)/zend_ini_parser.h
$(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l $(srcdir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
@$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l)
$(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c $(srcdir)/zend_language_parser.h: $(srcdir)/zend_language_parser.c
$(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y $(srcdir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
...@@ -18,6 +18,6 @@ $(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y ...@@ -18,6 +18,6 @@ $(srcdir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
@$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@ @$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
$(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l $(srcdir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
@$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l)
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h $(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(srcdir)/zend_language_parser.h
...@@ -61,6 +61,9 @@ php_lcov.info: lcov-test ...@@ -61,6 +61,9 @@ php_lcov.info: lcov-test
test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \ test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \
test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \ test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \
done done
for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
done
@echo @echo
@echo "Generating $@" @echo "Generating $@"
@$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@ @$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
......
...@@ -82,21 +82,26 @@ PHP_TEST_SHARED_EXTENSIONS = ` \ ...@@ -82,21 +82,26 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
test: all test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \ TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \ if test "$$INI_FILE"; then \
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ $(EGREP) -v '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \ else \
echo > $(top_builddir)/tmp-php.ini; \ echo > $(top_builddir)/tmp-php.ini; \
fi; \ fi; \
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \ INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \ if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \ INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \ $(EGREP) -h -v '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \ fi; \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \ TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \ CC="$(CC)" \
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ $(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \ else \
echo "ERROR: Cannot run tests without CLI sapi."; \ echo "ERROR: Cannot run tests without CLI sapi."; \
fi fi
...@@ -110,7 +115,7 @@ clean: ...@@ -110,7 +115,7 @@ clean:
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/* rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean distclean: clean
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
.PHONY: all clean install distclean test .PHONY: all clean install distclean test
......
This diff is collapsed.
...@@ -96,29 +96,7 @@ OTHER OPTIONS ...@@ -96,29 +96,7 @@ OTHER OPTIONS
function entries and definitions at the end of the file, for copying and function entries and definitions at the end of the file, for copying and
pasting into an already existing module. pasting into an already existing module.
--assign-params --xml[=file]
--string-lens
By default, function proto 'void foo(string bar)' creates the following:
...
zval **bar;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar);
Specifying both of these options changes the generated code to:
...
zval **bar_arg;
int bar_len;
char *bar = NULL;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar_arg);
bar = Z_STRVAL_PP(bar_arg);
bar_len = Z_STRLEN_PP(bar_arg);
You shouldn't have to ask what happens if you leave --string-lens out. If you
have to, it's questionable whether you should be reading this document.
--with-xml[=file]
Creates the basics for phpdoc .xml file. Creates the basics for phpdoc .xml file.
...@@ -156,39 +134,32 @@ EXAMPLE ...@@ -156,39 +134,32 @@ EXAMPLE
question marks to be replaced by you, and you must of course add your own question marks to be replaced by you, and you must of course add your own
value definitions too): value definitions too):
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y[, int color]) /* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
*/ */
PHP_FUNCTION(my_drawtext) PHP_FUNCTION(my_drawtext)
{ {
zval **image, **text, **font, **x, **y, **color; char *text = NULL;
int argc; int argc = ZEND_NUM_ARGS();
int image_id = -1; int image_id = -1;
int font_id = -1; int text_len;
int font_id = -1;
argc = ZEND_NUM_ARGS(); long x;
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) { long y;
WRONG_PARAM_COUNT; long color;
} zval *image = NULL;