1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Commit Graph

137 Commits

Author SHA1 Message Date
Arnaud Le Blanc e84add8470 initialize memory 2008-11-04 20:40:04 +00:00
Felipe Pena 66f75b6e8e - Fixed bug #46082 (stream_set_blocking() can cause a crash in some circumstances) 2008-10-24 10:44:19 +00:00
Pierre Joye adfa214688 - drop bindlib usage on windows
- inet_pton, inet_ntop and inet_aton are always available (VC9 uses the CRT implementation, VC6 our own)
2008-08-21 23:37:40 +00:00
Jani Taskinen c3e18660ec - Silence "unused variable" warning when ip6 support is disabled 2008-07-11 13:11:37 +00:00
Antony Dovgal ec101c1274 fix segfault - error_string may be NULL, in this case we have to follow the old behavior 2008-03-11 10:26:51 +00:00
Andrey Hristov af5a93e552 char **error_message was passed but not used. This causes problems in cases
of getaddrinfo() failure, because the upper layers don't get the error.
  initialize a variable because we were reading initialized in case of error.
2008-03-10 19:55:43 +00:00
Sebastian Bergmann 9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Rob Richards 5f7ece064d fix non ipv6 enabled win build 2007-11-06 10:56:53 +00:00
Edin Kadribasic 8b3bfa7cf7 MFB: Fix build 2007-10-12 08:08:02 +00:00
Elizabeth Marie Smith 9e0894fa21 MFB 2007-10-10 23:23:54 +00:00
Jani Taskinen 11a1fa5b92 - Use correct macro name 2007-07-18 09:04:37 +00:00
Jani Taskinen 497218eedf ws fix 2007-07-17 13:29:25 +00:00
Antony Dovgal 8c64f4279b use closesocket() on Win32 and close() on *nix 2007-01-11 15:51:29 +00:00
Sebastian Bergmann 3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Sara Golemon 1ce3ba599b Bug #38687 - sockaddr local storage insufficient for all sock families 2006-09-11 19:18:06 +00:00
Nuno Lopes c2b1be3549 MFB5.2: const keywording 2006-07-01 11:50:52 +00:00
Antony Dovgal a4f9c8efc2 MFB: first check stream for NULL, then dereference 2006-03-19 22:34:26 +00:00
Andi Gutmans 1efe984d08 - Get rid of using ENFORCE_SAFE_MODE. 2006-02-19 04:29:42 +00:00
foobar 251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
foobar 23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Antony Dovgal 79d649e173 fix memleak when connection fails (and we still keep trying) 2005-06-20 23:16:27 +00:00
Ilia Alshanetsky aa52c68a7a bzero > memset 2005-06-14 13:09:04 +00:00
Ilia Alshanetsky b36d4ae02c Added bindto socket context option. 2005-06-14 02:39:42 +00:00
Anantha Kesari H Y 1d7a8a9e69 removed unwanted NEW_LIBC checks 2004-10-06 13:22:21 +00:00
Wez Furlong ff4e970fb1 Make new poll stuff work on win32 (and still be safe on unix) 2004-09-17 14:36:55 +00:00
Wez Furlong 99e290f882 Fix for Bug #24189: possibly unsafe select(2) usage.
We avoid the problem by using poll(2).

On systems without poll(2) (older bsd-ish systems, and win32), we emulate
poll(2) using select(2) and check for valid descriptors before attempting
to access them via the descriptor sets.

If an out-of-range descriptor is detected, an E_WARNING is raised suggesting
that PHP should be recompiled with a larger FD_SETSIZE (and also with a
suggested value).

Most uses of select(2) in the source are to poll a single descriptor, so
a couple of handy wrapper functions have been added to make this easier.

A configure option --enable-fd-setsize has been added to both the unix and
win32 builds; on unix we default to 16384 and on windows we default to 256.
Windows FD_SETSIZE imposes a limit on the maximum number of descriptors that
can be select()ed at once, whereas the unix FD_SETSIZE limit is based on the
highest numbered descriptor; 256 should be plenty for PHP scripts under windows
(the default OS setting is 64).

The win32 specific parts are untested; will do that now.
2004-09-17 12:44:56 +00:00
Wez Furlong f1072c2ae9 Ensure that port numbers get set in the peer/socket name functions.
(duh!)
2004-07-28 23:30:23 +00:00
Wez Furlong 637c424d64 Fix #29431: crash when parsing an invalid network address 2004-07-28 23:15:25 +00:00
Sara Golemon 3feae65f70 BugFix: Copy/Paste mistake referenced undefined variable on platforms without gettimeofday() 2004-04-09 19:18:59 +00:00
Andi Gutmans dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Wez Furlong dbb152b96a Detect and enable IPv6 support under win32.
The ws2tcpip.h header links to IPv6 functions dynamically
and the generated binary will run on win98 and later.
2003-12-06 00:00:31 +00:00
Wez Furlong 5e4eac57bd Export these so that ftp extension can be build as shared ext. 2003-12-02 23:13:43 +00:00
Ilia Alshanetsky c344754d48 Removed unused variables. 2003-11-30 19:43:30 +00:00
Wez Furlong 37f135ceef Add stream_socket_sendto and stream_socket_recvfrom which work very much
like sendto() and recvfrom() syscalls.
2003-11-29 21:46:50 +00:00
Ilia Alshanetsky 93bcd55eaf emalloc -> safe_emalloc 2003-08-12 00:58:52 +00:00
Marcus Boerger 3466a48add Initialize this variable to 0 as suggested by sara 2003-08-10 21:30:36 +00:00
Wez Furlong 8dfe385215 Merge getaddrinfo() tidy-up from PHP_4_3 branch. 2003-06-28 11:12:48 +00:00
James Cox f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Ilia Alshanetsky 56ba9b4ae5 emalloc -> safe_emalloc 2003-05-13 01:57:54 +00:00
Marcus Boerger d0fbdef419 fix warnings - one left 2003-03-08 16:53:54 +00:00
Moriyoshi Koizumi 6716188356 Reverted my previous commit 2003-03-01 18:47:18 +00:00
Moriyoshi Koizumi 3de8b87cba Fixed build 2003-03-01 15:49:06 +00:00
Wez Furlong 349ce76f96 Tidy up stupid signed/unsigned issues with win32 by introducing a php_socket_t typedef. 2003-02-28 21:03:36 +00:00
Wez Furlong 1b53a2d12e New user-space functions:
. stream_socket_client() - similar to fsockopen(), but more powerful.
  . stream_socket_server() - Creates a server socket.
  . stream_socket_accept() - Accept a client connection.
  . stream_socket_get_name() - Get local or remote name of socket.

Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
Ilia Alshanetsky e089944308 compiler warning fixed. 2003-02-28 00:08:00 +00:00
Wez Furlong 203068d055 Fixup build for win32 2003-02-27 18:06:31 +00:00
Wez Furlong fd61f69077 Another big commit (tm).
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
  some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
  (currently only supports OpenSSL, but could support other SSL toolkits,
  and other crypto transport protocols).

Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
  removing the link-time requirement for ssl:// and https:// sockets and
  streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
  there are now a range of possible socket-type streams.

Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.

# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00
Wez Furlong c1bdf163ed Add comment about thread-safety of gethostbyname on win32.
Set the correct path to the win32 config.h file in the .dsp file.
2003-02-21 14:06:55 +00:00
foobar 8e3f23e3c0 ws fixes + missing $Id$ tags, headers added 2003-02-19 08:40:19 +00:00
Zeev Suraski 4934744b93 Win32 build improvements 2003-02-17 13:29:59 +00:00