'wmemcpy' undefined; assuming extern returning int

VC6 的问题 对标准C支持不完美 C代码竟然用CPP实现 源代码如下


#ifdef  __cplusplus
inline int fwide(FILE , int _M)
{return (_M); }
inline int mbsinit(const mbstate_t
)
{return (1); }
inline const wchar_t wmemchr(const wchar_t _S, wchar_t _C, size_t _N)
{for (; 0 < _N; ++_S, _N)
if (_S == _C)
return (_S);
return (0); }
inline int wmemcmp(const wchar_t
_S1, const wchar_t _S2, size_t _N)
{for (; 0 < _N; ++_S1, ++_S2, _N)
if (
_S1 != _S2)
return (
_S1 < _S2 ? -1 : +1);
return (0); }
inline wchar_t
wmemcpy(wchar_t _S1, const wchar_t _S2, size_t _N)
{wchar_t _Su1 = _S1;
for (; 0 < _N; ++_Su1, ++_S2, _N)
_Su1 = _S2;
return (_S1); }
inline wchar_t
wmemmove(wchar_t _S1, const wchar_t _S2, size_t _N)
{wchar_t _Su1 = _S1;
if (_S2 < _Su1 && _Su1 < _S2 + _N)
for (_Su1 += _N, _S2 += _N; 0 < _N; _N)
_Su1 = _S2;
else
for (; 0 < _N; _N)
_Su1++ = _S2++;
return (_S1); }
inline wchar_t
wmemset(wchar_t _S, wchar_t _C, size_t _N)
{wchar_t
_Su = _S;
for (; 0 < _N; ++_Su, _N)
_Su = _C;
return (_S); }
} /
end of extern “C” */

赞(0) 打赏
取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

    暂无评论...