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:
parent
8e545d5961
commit
e0a828ecbd
|
@ -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];
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue