Commit Graph

14 Commits

Author SHA1 Message Date
Anatol Belski
06332e6706 introduced DllMain for the main php DLL
The particular need on this is because of the current situation
with determining the background functionality for the
gettimeofday. DllMain allows to initialize stuff before the DLL
can be actually used. Thus, we use different time API on win7
and win8 and later, so the function pointer needs to be
initialized before anything in the DLL could even demand it.

The change also opens the door for the further optimizations,
as now we're able to do the very basic initializations for the
whole DLL before it could ever start to live. Fe on this way the
TLS initialization could be done, when utilizing the
DLL_THREAD_ATTACH/DETACH case. Whether it's really usable in
portable way should be synced with other platforms.

Be aware that it's dangerous as it possibly causes dead locks.
So to use with care. One willing to add items to DllMain should
better read the documentation twice and even then try to defer
the necessary action.
2015-06-02 15:56:32 +02:00
Anatol Belski
f2ad1fb3c9 fix preprocessor conditions 2014-11-06 14:03:42 +01:00
Chris Tankersley
6b0eca060f Various fixes to allow support for new VS2014 features
- Added some typeof checks to handle JS errors introduced in VS2014
 - Added VS2014 to the list of compilers
 - Changed to use stdint.h if we are using VS2014 or higher
 - Skip defining timespec if we're using VS2014 or higher
 - Moved u_char typedef out to always be defined regardless of VS version
2014-11-05 18:00:09 -05:00
Anatol Belski
c7490a6edd add usleep() to the header, already exported to dll 2013-07-10 16:16:33 +02:00
Pierre Joye
b54a6fc5b3 - add nanosleep
- expose nanosleep and usleep
- [DOC] time_ nanosleep and time_ sleep_ until available on windows
2009-01-19 02:29:24 +00:00
Zeev Suraski
7240050243 Commit missing stuff 2003-02-18 13:34:52 +00:00
foobar
4e3d4e4329 - Let's be consistent with these.. 2003-02-17 03:07:33 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
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.
2003-02-16 03:48:49 +00:00
Edin Kadribasic
2183565321 Allow dynamically compiled extensions to use gettimeofday() on win32. 2002-06-23 23:22:33 +00:00
Sascha Schumann
16017f6d78 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

  All identifiers that begin with an underscore and either an uppercase
  letter or another underscore are always reserved for any use by the
  implementation.
2000-07-02 23:46:51 +00:00
Zeev Suraski
397df3ca87 - Revert bogus time.h commit
- Fixed a problem under some versions of Windows that could cause PHP to hang
  on startup if errors occured, e.g. in the php.ini file
2000-06-30 13:23:08 +00:00
Zeev Suraski
37fb71b9ba Set version number on DLLs 2000-06-30 12:16:58 +00:00
Shane Caraveo
1e6c79bc15 need to prevent multiple usage 1999-11-30 03:54:51 +00:00
Zeev Suraski
aceaabceff PHP 4.0 1999-04-07 21:05:13 +00:00