mirror of
https://github.com/php/php-src.git
synced 2026-04-22 07:28:09 +02:00
- Finally beautify those WIN32|WINNT checks
This commit is contained in:
+3
-3
@@ -33,7 +33,7 @@
|
||||
|
||||
%{
|
||||
|
||||
#if WIN32|WINNT
|
||||
#if ZEND_WIN32
|
||||
#include <winsock.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
@@ -57,7 +57,7 @@
|
||||
# ifdef HAVE_STDIOSTREAM_H
|
||||
# include <stdiostream.h>
|
||||
# endif
|
||||
# if WIN32||WINNT
|
||||
# if ZEND_WIN32
|
||||
# include <strstrea.h>
|
||||
# else
|
||||
# include <strstream.h>
|
||||
@@ -668,7 +668,7 @@ int yyFlexLexer::yylex()
|
||||
|
||||
|
||||
/* redefine YY_INPUT to handle urls for win32*/
|
||||
#if 0 /*WIN32|WINNT*/
|
||||
#if 0 /*ZEND_WIN32*/
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
if ( yyin->_tmpfname != "url" ){ \
|
||||
if ( yy_current_buffer->yy_is_interactive ) \
|
||||
|
||||
+5
-3
@@ -37,7 +37,9 @@
|
||||
* general definitions
|
||||
*/
|
||||
|
||||
#if (defined(WINNT) && WINNT) || (defined(WIN32) && WIN32)
|
||||
#define ZEND_WIN32 ((defined(WINNT) && WINNT) || (defined(WIN32) && WIN32))
|
||||
|
||||
#if ZEND_WIN32
|
||||
# include "zend_config.w32.h"
|
||||
#else
|
||||
# include "zend_config.h"
|
||||
@@ -63,7 +65,7 @@
|
||||
# define DL_FETCH_SYMBOL dlsym
|
||||
# define DL_HANDLE void *
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#elif (WIN32||WINNT)
|
||||
#elif (ZEND_WIN32)
|
||||
# define DL_LOAD(libname) LoadLibrary(libname)
|
||||
# define DL_FETCH_SYMBOL GetProcAddress
|
||||
# define DL_UNLOAD FreeLibrary
|
||||
@@ -350,7 +352,7 @@ END_EXTERN_C()
|
||||
|
||||
#define ZEND_MAX_RESERVED_RESOURCES 1
|
||||
|
||||
#if (WINNT|WIN32)
|
||||
#if (ZEND_WIN32)
|
||||
/* Only use this macro if you know for sure that all of the switches values
|
||||
are covered by its case statements */
|
||||
#define EMPTY_SWITCH_DEFAULT_CASE() \
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ ZEND_API void wrong_param_count(void);
|
||||
#define BYREF_ALLOW 2
|
||||
#define BYREF_FORCE_REST 3
|
||||
|
||||
#if !(WIN32||WINNT)
|
||||
#if !(ZEND_WIN32)
|
||||
#define DLEXPORT
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -447,7 +447,7 @@ void zend_debug_alloc_output(char *format, ...)
|
||||
vsprintf(output_buf, format, args);
|
||||
va_end(args);
|
||||
|
||||
#if WIN32||WINNT
|
||||
#if ZEND_WIN32
|
||||
OutputDebugString(output_buf);
|
||||
#else
|
||||
fprintf(stderr, output_buf);
|
||||
|
||||
@@ -79,7 +79,7 @@ void clean_module_constants(int module_number)
|
||||
|
||||
int zend_startup_constants(ELS_D)
|
||||
{
|
||||
#if WIN32|WINNT
|
||||
#if ZEND_WIN32
|
||||
DWORD dwBuild=0;
|
||||
DWORD dwVersion = GetVersion();
|
||||
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||
|
||||
+1
-1
@@ -967,7 +967,7 @@ static int zend_check_symbol(zval **pz)
|
||||
#endif
|
||||
|
||||
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && (WINNT|WIN32))
|
||||
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && (ZEND_WIN32))
|
||||
# define do_alloca(p) alloca(p)
|
||||
# define free_alloca(p)
|
||||
#else
|
||||
|
||||
@@ -49,7 +49,7 @@ int zend_load_extension(char *path)
|
||||
|
||||
handle = DL_LOAD(path);
|
||||
if (!handle) {
|
||||
#if !(WIN32||WINNT)
|
||||
#if !(ZEND_WIN32)
|
||||
fprintf(stderr, "Failed loading %s: %s\n", path, dlerror());
|
||||
#else
|
||||
fprintf(stderr, "Failed loading %s\n", path);
|
||||
|
||||
Reference in New Issue
Block a user