Skip to content

Remove support for unsupported MSVC versions #17128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Zend/zend_config.w32.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@

#include <float.h>

#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)

Expand Down
4 changes: 1 addition & 3 deletions Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,7 @@ char *alloca();

#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 && defined(__i386__)
# define ZEND_FASTCALL __attribute__((fastcall))
#elif defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER == 1700
# define ZEND_FASTCALL __fastcall
#elif defined(_MSC_VER) && _MSC_VER >= 1800
#elif defined(_MSC_VER)
# define ZEND_FASTCALL __vectorcall
#else
# define ZEND_FASTCALL
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
/* Common */
#include <time.h>

#if (defined(PHP_WIN32) && defined(_MSC_VER) && _MSC_VER >= 1900)
#if (defined(PHP_WIN32) && defined(_MSC_VER))
#define timezone _timezone /* timezone is called _timezone in LibC */
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/soap/php_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -2950,7 +2950,7 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
(ta->tm_gmtoff < 0) ? '-' : '+',
labs(ta->tm_gmtoff / 3600), labs( (ta->tm_gmtoff % 3600) / 60 ));
#else
# if defined(__CYGWIN__) || (defined(PHP_WIN32) && defined(_MSC_VER) && _MSC_VER >= 1900)
# if defined(__CYGWIN__) || (defined(PHP_WIN32) && defined(_MSC_VER))
snprintf(tzbuf, sizeof(tzbuf), "%c%02d:%02d", ((ta->tm_isdst ? _timezone - 3600:_timezone)>0)?'-':'+', abs((ta->tm_isdst ? _timezone - 3600 : _timezone) / 3600), abs(((ta->tm_isdst ? _timezone - 3600 : _timezone) % 3600) / 60));
# else
snprintf(tzbuf, sizeof(tzbuf), "%c%02d:%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs(((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) / 60));
Expand Down
13 changes: 0 additions & 13 deletions ext/standard/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,8 @@ PHPAPI struct lconv *localeconv_r(struct lconv *out)
tsrm_mutex_lock( locale_mutex );
#endif

/* cur->locinfo is struct __crt_locale_info which implementation is
hidden in vc14. TODO revisit this and check if a workaround available
and needed. */
#if defined(PHP_WIN32) && _MSC_VER < 1900 && defined(ZTS)
{
/* Even with the enabled per thread locale, localeconv
won't check any locale change in the master thread. */
_locale_t cur = _get_current_locale();
*out = *cur->locinfo->lconv;
_free_locale(cur);
}
#else
/* localeconv doesn't return an error condition */
*out = *localeconv();
#endif

#ifdef ZTS
tsrm_mutex_unlock( locale_mutex );
Expand Down
8 changes: 0 additions & 8 deletions win32/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ struct itimerval {
struct timeval it_value; /* current value */
};

#if !defined(timespec) && _MSC_VER < 1900
struct timespec
{
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
#endif

#define ITIMER_REAL 0 /*generates sigalrm */
#define ITIMER_VIRTUAL 1 /*generates sigvtalrm */
#define ITIMER_VIRT 1 /*generates sigvtalrm */
Expand Down
Loading