utarray_str_cpy: warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup.
Jeff17Robbins opened this issue · comments
In utarray.h
, utarray_sr_cpy()
uses strdup
. Would it be alright to change this to _strdup
?
strdup
is the standard name for strdup
. I've never heard of _strdup
.
There is definitely no _strdup
(nor strdup
) in ISO C++.
There is no _strdup
(nor strdup
) in ISO C11.
According to N2433, strdup
will be the standard spelling in ISO C2x, whenever it is released.
Changing away from the POSIX spelling strdup
to a spelling that does not exist on any system I've ever seen would be a bad thing IMO, not a good thing.
Apparently I misconstrued the VS 2019 warning text -- my bad! [viz. https://stackoverflow.com/questions/7582394/strdup-or-strdup]
I will do what that SO suggests #define _CRT_NONSTDC_NO_DEPRECATE
-- sorry for wasting your time with my misunderstanding / ignorance.