Commit Graph

138 Commits

Author SHA1 Message Date
Christoph M. Becker
81cefab7b0 Stick with zend_long for ABI compatibility
Cf. <https://github.com/php/php-src/pull/4700#issuecomment-531515689>.
2019-09-15 15:11:25 +02:00
bugreportuser
fdcca93056 Fix #78535: auto_detect_line_endings value not parsed as bool 2019-09-14 18:46:09 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Joe Watkins
233115ea23 fix #71609: Segmentation fault on ZTS with gethostbyname 2016-03-31 12:39:01 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
e1cd0e0a38 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
  int to size_t where the underlaying API supports it
  use php_socket_t instead of int
  fix signed/unsigned mismatch warning
  fix compilation warning
  Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
  Add notes about get_class_entry/get_class_name to UPGRADING
  Fix casts in GD
  Drop redundant casting code from ext/filter
  update NEWS
  update NEWS
  update NEWS
  update NEWS
  Added note to UPGRADING regarding 64-bit support in pack()/unpack()
  pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Add 64 bit formats to pack() and unpack()
  Help to CPU branch predictor
  Removed unused EG(orig_error_reporting)
  Update get_class_name semantics
  Remove Z_OBJ_CLASS_NAME_P
  Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
  ...
2014-10-10 22:51:13 +02:00
Anatol Belski
6445c4bd48 use php_socket_t instead of int 2014-10-10 19:00:19 +02:00
Anatol Belski
b946348969 enable static tsrm ls cache in ext/standard 2014-10-05 19:49:41 +02:00
Anatol Belski
d11734b4b0 reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
  the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
  remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-25 18:48:27 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
b7e7a89541 several fixes -
- param parsing Z_PARAM_STR vs Z_PARAM_STRING
- some functions for new params
- etc
2014-08-16 12:55:13 +02:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Andrey Hristov
92d27ccb05 Constify streams API and a few other calls down the rabbit hole.
(`char *` to `const char *` for parameters and few return values)
In a few places int len moved to size_t len.
2013-07-30 12:49:36 +02:00
Jille Timmermans
dba22c0864 Dereferencing process-handles no longer waits on those processes.
Implements FR #46487
2013-01-15 21:50:35 +01:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Gustavo André dos Santos Lopes
0169020e49 - Fixed bug #61253: Wrappers opened with errors concurrency problem
#NOTE: There is a very small possibility that this will further break
#extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the
#only one and it may leak memory after this. I say "further break" because
#extensions that do that are already broken (will segfault) under ZTS, which is
#why this patch is necessary.
#There was what I deem as tacit acceptance from 5.3/5.4 RMs on this.
2012-03-08 12:30:59 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Adam Harvey
6cb7ea4089 Implemented FR #53264 (Add fputcsv method to SplFileObject). 2010-11-09 15:07:50 +00:00
Gustavo André dos Santos Lopes
5c09767d4b - Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
effect)
#Made "from" a proper INI setting and bound it to a global variable.
#Previously, it was simply read from the hash table with the parsed ini file
#by using cfg_get_string (I wonder why this mechanism still exists...)
2010-10-29 15:29:15 +00:00
Pierre Joye
aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Kalle Sommer Nielsen
a12f6d9312 Fixed the $context parameter on copy() to have an effect (approved for 5.3 by Johannes)
# To not change a PHPAPI in a point release, a new function have been added to support contexts:
# php_copy_file_ctx(), php_copy_file_ex() now simply wraps to that
2010-08-17 12:17:28 +00:00
Kalle Sommer Nielsen
ac73c9d8b4 Fixed the context parameter on copy() to actually have an effect
# After looking at the logs, Jani did a bad merge into 5.3, so that 
# the context parameter sent to copy() actually isn't used at all. This 
# relatively simple patch fixes that for trunk.
#
# See FR #42965

# internals:
# This changes the php_copy_*() decls to contain an additional parameter for stream contexts
2010-08-16 21:56:35 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
David Soria Parra
d4e8fa62c6 MFH: Add an escape parameter to fgetcsv to satisfy rfc4180 and bug #40501.
[DOC] 5th parameter available since PHP 5.3+
2007-10-03 10:44:32 +00:00
Hannes Magnusson
3e0e2bb49d Fix ifdefs 2007-01-10 14:40:06 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Hannes Magnusson
d9f03aac34 MFH: sys_get_temp_dir() 2006-12-09 18:00:52 +00:00
Hannes Magnusson
e4bdd6fcba Added missing API function declaration. 2006-10-13 09:34:34 +00:00
Marcus Boerger
9c30e20bd6 - MFH Implement todo: SplFileObject: ability to set the CSV separator per object 2006-07-15 15:08:41 +00:00
Pierre Joye
6c509aa837 - add php_mkdir_ex, works like php_mkdir but allows to silent any error
when no options are used
2006-01-13 04:06:00 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Anantha Kesari H Y
384a96faf6 ext/standard/file.h NetWare LibC has fnmatch and realpath implemented.
ext/standard/syslog.c Except LOG_SYSLOG other syslog macros are supported by NetWare LibC.
ext/standard/string.c NetWare fix for dirname
-- Kamesh
2005-07-15 12:35:12 +00:00
Marcus Boerger
32e478b9fc - Add fputcsv() (David Sklar) 2004-09-26 21:55:22 +00:00
Frank M. Kromann
62cd02c5a7 Adding missing PHPAPI for non ZTS builds 2004-07-30 22:49:02 +00:00
Sara Golemon
a2c24ae90e BugFix#28868 (Part Two): This fixes thread unsafety in the userspace
filters which relates to the fix just applied for userspace wrappers.
2004-06-21 21:08:05 +00:00
Sara Golemon
7fcfa8865e BugFix#28868: Wrapper hash not thread-safe.
Userdefined wrappers were being registered into a global wrapper hash
which can cross threads.  Termination of once instance then has the
potential to leave an active stream in another instance with no wrapper
leading to segfault.
2004-06-21 18:58:55 +00:00