Back to using regular `strdup`, with an `hb-private.hh` fix that special-cases VC++'s

definition and usage of the words
This commit is contained in:
ThePhD 2015-06-23 09:07:17 -04:00
parent 8e545d5961
commit e0a828ecbd
2 changed files with 4 additions and 1 deletions

View File

@ -219,7 +219,7 @@ struct hb_language_item_t {
}
inline hb_language_item_t & operator = (const char *s) {
lang = (hb_language_t) _strdup (s);
lang = (hb_language_t) strdup (s);
for (unsigned char *p = (unsigned char *) lang; *p; p++)
*p = canon_map[*p];

View File

@ -132,6 +132,9 @@ static int errno = 0; /* Use something better? */
# endif
# if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf _snprintf
# elif defined(_MSC_VER) && _MSC_VER >= 1900
# /* Covers VC++ Error for strdup being a deprected POSIX name and to instead use _strdup instead */
# define strdup _strdup
# endif
#endif