Commit Graph

21 Commits

Author SHA1 Message Date
Peter Kokot
b86dfd76a2
Remove php_win32_init_gettimeofday declaration (#15451)
* Remove php_win32_init_gettimeofday declaration

Follow-up of GH-15400 (25afbdb09e).

* Remove unused header include

* Include php.h before win32/ioutil.h
2024-08-17 13:58:40 +02:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Gabriel Caruso
c215b8d147 Trailing whitespaces on win32
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:41:26 -02:00
Anatol Belski
a56700043e vim folds and modelines 2017-07-04 16:08:48 +02:00
Anatol Belski
cefa8ddcc9 Merge branch 'PHP-7.1'
* PHP-7.1:
  add missing datatype as sync for 5113909
2017-02-11 14:53:20 +01:00
Anatol Belski
bf2627e58c add missing datatype as sync for 5113909 2017-02-11 14:51:15 +01:00
Kalle Sommer Nielsen
13e076f446 We do not need to check the return value of php_win32_init_gettimeofday() anymore, as the symbol is always going to be available to us 2016-08-11 04:35:51 +02:00
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