문제

  1. Is it same deprecated in GNU as in Microsoft C runtime?

  2. Is deprecation, if there is such in GNU C, enforced by later standard of C after 89/90 or the compiler?

  3. If it's GNU C compiler, since when and does it provide such a secure alternative memory operating function like memcpy_s to the deprecated memcpy in Microsoft C?

  4. If it's later C standard after 89/90, since when and does it provide such a secure alternative memory operating function like memcpy_s to the deprecated memcpy in Microsoft C?

  5. If no such deprecation in GNU C runtime, is there a function which is neither among those memory operations (name started with mem) nor the one I know as bcopy, but I can use to copy memory safe in that it takes a parameter about length of the destination?

  6. If there is/are, could you please list as many as possible?

도움이 되었습니까?

해결책

memcpy_s has been in added since C11 but is an optional extension. memcpy has not been deprecated in C and is not an obsolescent function.

glibc as of now does not support _s functions and there is no plan (AFAIK) for glibc team to support them.

다른 팁

The function memcpy is not deprecated. It's one of the safest and most useful functions in the library. The memcpy_s function became standard in C11 (optional, see "Bounds-checking interface" in Annex K).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top