summaryrefslogtreecommitdiff
path: root/main/streams.c
Commit message (Collapse)AuthorAgeFilesLines
* Move streams files around a bit, to ease maintenance.Wez Furlong2003-02-161-2790/+0
| | | | | I will update the win32 .dsp in a moment.
* A add much more useful select(2) implementation than is provided byWez Furlong2003-02-161-0/+18
| | | | | | | | | | | | | windows sockets. The winsock implementation will only work with sockets; our implementation works with sockets and file descriptors. By association, stream_select() will now operate correctly with files, pipes and sockets. This change required linking against the winsock2 library. In terms of compatibility, only older versions of windows 95 do not have winsock2 installed by default. It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user. Also, add a win32 compatible pipe test when opening a stream from a pipe. This test will only work on NT, win2k and XP platforms. Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered. I will be working on a fix for this issue for win9x.
* Fixed bug #22234Moriyoshi Koizumi2003-02-151-0/+11
|
* MFB: Fix for bug #22199Wez Furlong2003-02-131-4/+7
|
* A probable cure for many getcwd/relative include related problems for win32.Wez Furlong2003-02-131-2/+2
|
* Fixed a typo.Ilia Alshanetsky2003-02-131-1/+1
|
* Simplified the mode validation code & added support for read+write mode toIlia Alshanetsky2003-02-131-17/+11
| | | | | 'x' mode.
* Clarify error message.Wez Furlong2003-02-131-1/+1
|
* Added 'x' mode for fopen() used on local files. This mode will create a newIlia Alshanetsky2003-02-131-0/+3
| | | | | file only if a file does not already exist (O_CREAT|O_EXCL).
* Moving away from ANSI stdio for plain files.Wez Furlong2003-02-131-14/+120
|
* Whitespace-fix these goto labels.Wez Furlong2003-02-131-2/+2
|
* Fix for Bug #21815 (fpassthru ignored buffered data but then complained anyway)Wez Furlong2003-02-131-1/+2
|
* Added feature request #9173 (added stream_get_line(), this function willIlia Alshanetsky2003-02-091-0/+35
| | | | | | read either the specified number of bytes or until the ending string is found).
* Added get_browser() function. This function can be used to fetch the headersIlia Alshanetsky2003-02-071-0/+4
| | | | | sent by the server when a request is made for a given URL.
* Fix sticky EOF problemSascha Schumann2003-01-301-3/+3
| | | | | | | | | | | Sometimes streams signal a temporary EOF, because all current data has been consumed. But that does not preclude the possibility that more data will become available later. Thus we must not treat eof in the read path as final. Now, "tail -f" like scripts work again.
* Fix for Bug #20827: where stat is a macro on Tru64.Wez Furlong2003-01-061-1/+1
| | | | | Patch from <julien.soula@free.fr>
* Expose stream_filters_hash so that it can be searched by stream_get_filters()Sara Golemon2003-01-061-0/+5
|
* Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF forWez Furlong2003-01-011-1/+7
| | | | | files fopen()ed with that mode.
* Bump year.Sebastian Bergmann2002-12-311-1/+1
|
* MFB: fpos_t -> off_tWez Furlong2002-12-231-1/+1
|
* Fix for Bug #21131: fopen($file, 'a+') would incorrectly assume thatWez Furlong2002-12-221-2/+16
| | | | | | | | | the stream position was at offset 0. This corrects that assumption by querying the stream for it's position when it detects the 'a' "flag" in the mode parameter to fopen. Also added a test for plain files and amended the userstreams test to take this into account.
* Correct mistake introduced by my last commit on these files;Wez Furlong2002-12-191-1/+8
| | | | | | | | *_from_pipe() is for process-pipes created by fopen, not generic pipes created from proc_open(). Correctly implemented the fifo/pipe check for *_from_file() and it seems to be working correctly now.
* MFB: popen/pclose and proc_open/proc_close fixes.Wez Furlong2002-12-121-2/+15
|
* MFBIlia Alshanetsky2002-12-101-5/+1
|
* Emulate fopencookie on *BSD systems.Wez Furlong2002-12-091-2/+55
| | | | | Patch mostly from Melvyn Sopacua <msopacua@idg.nl>
* MFB: #20831 fixWez Furlong2002-12-091-3/+13
|
* MFB: Fix memleak in debug modeMarcus Boerger2002-11-231-1/+1
|
* Fix warning as discussed with Wez.Marcus Boerger2002-11-181-0/+2
|
* wb -> r+bWez Furlong2002-11-181-1/+1
|
* Merge streams changes from branch.Wez Furlong2002-11-181-41/+121
|
* Fixed a problem that would cause include/require("/dir/file") to fail onIlia Alshanetsky2002-11-171-0/+26
| | | | | Windows.
* - MFB: Fixed bug #20484 (stream_get_meta_data crashes on a normal fileDerick Rethans2002-11-141-1/+2
| | | | | stream). (Derick, Wez)
* Fixed a bug that in many situations would cause open_basedir restriction toIlia Alshanetsky2002-11-101-7/+9
| | | | | | be bypassed. Most notable exception, is the inclusion of files via include(), with a partial path.
* php_stream replacement for fprintfMarcus Boerger2002-11-061-0/+19
| | | | | #Agreed by Wez - I will use this mysel soon.
* Probable fix for #20180.Wez Furlong2002-11-011-1/+1
|
* Fix win32 build.Ilia Alshanetsky2002-10-281-0/+4
|
* A better fix for bug #20110.Ilia Alshanetsky2002-10-281-13/+13
|
* Fixed bug #20110.Ilia Alshanetsky2002-10-281-2/+9
|
* dont memmove a null pointer. caught by bounds checker.Shane Caraveo2002-10-271-1/+1
|
* fix Bug #20126Shane Caraveo2002-10-271-3/+3
| | | | | write returns an int, with < 0 being a failure.
* centralize #include "build-defs.h" and drop (sometimes inconsistent) otherSascha Schumann2002-10-241-2/+0
| | | | | instances
* When doing automatic line end detection, pick the line end that is foundIlia Alshanetsky2002-10-221-2/+2
| | | | | first.
* Refine stream_select() to work with streams that have data in their readWez Furlong2002-10-211-1/+3
| | | | | | | | | | buffers. When selecting for read, the streams are examined; if any of them have pending read data, no actual select(2) call is performed; instead the streams with buffered data are returned; just like a regular select call. Prevent erroneous warning in stream_select when obtaining the fd.
* MFHMoriyoshi Koizumi2002-10-211-2/+2
|
* Fixed incorrect handling of files starting with a .Ilia Alshanetsky2002-10-201-1/+12
|
* made fgets() binary safe.Wez Furlong2002-10-191-1/+4
| | | | | | | | | | | php_stream_gets is now a macro which calls php_stream_get_line. The latter has an option argument to return the number of bytes in the line. Functions like fgetcsv(), fgetss() can be made binary safe by calling php_stream_get_line directly. # HEADS UP: You will need to make clean after updating your CVS, as the # binary signature has changed.
* Probable fix for #19944Wez Furlong2002-10-191-1/+1
|
* Fixed bug #19971 (optimized the file() function).Ilia Alshanetsky2002-10-181-4/+9
| | | | | The file() function is now also binary safe.
* Improve EOF detection. Fixes #19970.Wez Furlong2002-10-181-3/+2
|
* Nope, that last one wasn't a leak in main/streams.c, it wasWez Furlong2002-10-151-1/+1
| | | | | file_get_contents misinterpreting the result...