1 /***
2 *memory.h - declarations for buffer (memory) manipulation routines
3 *
4 *           Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 *           This include file contains the function declarations for the
8 *           buffer (memory) manipulation routines.
9 *           [System V]
10 *
11 *           [Public]
12 *
13 ****/
14
15 #if        _MSC_VER > 1000
16 #pragma once
17 #endif
18
19 #ifndef _INC_MEMORY
20 #define _INC_MEMORY
21
22 #include <crtdefs.h>
23
24 #ifdef  __cplusplus
25 extern "C" {
26 #endif
27
28 #ifndef _CONST_RETURN
29 #ifdef  __cplusplus
30 #define _CONST_RETURN  const
31 #define _CRT_CONST_CORRECT_OVERLOADS
32 #else
33 #define _CONST_RETURN
34 #endif
Lines 35 ... 38 are skipped.
39
40 /* Function prototypes */
41 #ifndef _CRT_MEMORY_DEFINED
42 #define _CRT_MEMORY_DEFINED
43 _CRTIMP void *  __cdecl _memccpy( _Out_opt_bytecap_(_MaxCount) void * _Dst, _In_ const void * _Src, _In_ int _Val, _In_ size_t _MaxCount);
44 _Check_return_ _CRTIMP _CONST_RETURN void *  __cdecl memchr( _In_opt_bytecount_(_MaxCount) const void * _Buf , _In_ int _Val, _In_ size_t _MaxCount);
45 _Check_return_ _CRTIMP int        __cdecl _memicmp(_In_opt_bytecount_(_Size) const void * _Buf1, _In_opt_bytecount_(_Size) const void * _Buf2, _In_ size_t _Size);
46 _Check_return_ _CRTIMP int        __cdecl _memicmp_l(_In_opt_bytecount_(_Size) const void * _Buf1, _In_opt_bytecount_(_Size) const void * _Buf2, _In_ size_t _Size, _In_opt_ _locale_t _Locale);
47              _Check_return_ int        __cdecl memcmp(_In_opt_bytecount_(_Size) const void * _Buf1, _In_opt_bytecount_(_Size) const void * _Buf2, _In_ size_t _Size);
48              _CRT_INSECURE_DEPRECATE_MEMORY(memcpy_s) void *  __cdecl memcpy(_Out_opt_bytecapcount_(_Size) void * _Dst, _In_opt_bytecount_(_Size) const void * _Src, _In_ size_t _Size);
49 #if __STDC_WANT_SECURE_LIB__
50 _CRTIMP errno_t  __cdecl memcpy_s(_Out_opt_bytecap_post_bytecount_(_DstSize, _MaxCount) void * _Dst, _In_ rsize_t _DstSize, _In_opt_bytecount_(_MaxCount) const void * _Src, _In_ rsize_t _MaxCount);
51 #endif
52              void *  __cdecl memset(_Out_opt_bytecapcount_(_Size) void * _Dst, _In_ int _Val, _In_ size_t _Size);
53
54 #if        !__STDC__
55 /* Non-ANSI names for compatibility */
56 _CRT_NONSTDC_DEPRECATE(_memccpy) _CRTIMP void * __cdecl memccpy(_Out_opt_bytecap_(_Size) void * _Dst, _In_opt_bytecount_(_Size) const void * _Src, _In_ int _Val, _In_ size_t _Size);
57 _Check_return_ _CRT_NONSTDC_DEPRECATE(_memicmp) _CRTIMP int __cdecl memicmp(_In_opt_bytecount_(_Size) const void * _Buf1, _In_opt_bytecount_(_Size) const void * _Buf2, _In_ size_t _Size);
58 #endif  /* __STDC__ */
59
60 #endif
61
62 #ifdef  __cplusplus
63 #ifndef _CPP_MEMCHR_DEFINED
64 #define _CPP_MEMCHR_DEFINED
65 extern "C++" _Check_return_ inline void * __CRTDECL memchr( _In_opt_bytecount_(_N) void * _Pv , _In_ int _C, _In_ size_t _N)
66     { return (void*)memchr((const void*)_Pv, _C, _N); }
67 #endif
68 #endif
69
70 #ifdef  __cplusplus
71 }
72 #endif
73
74 #endif  /* _INC_MEMORY */
75