Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
1.9 KiB

  1. /***
  2. *memory.h - declarations for buffer (memory) manipulation routines
  3. *
  4. * Copyright (c) 1985-2001, 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. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. #ifndef _INC_MEMORY
  18. #define _INC_MEMORY
  19. #if !defined(_WIN32)
  20. #error ERROR: Only Win32 target supported!
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #if !defined(_W64)
  26. #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
  27. #define _W64 __w64
  28. #else
  29. #define _W64
  30. #endif
  31. #endif
  32. /* Define _CRTIMP */
  33. #ifndef _CRTIMP
  34. #ifdef _DLL
  35. #define _CRTIMP __declspec(dllimport)
  36. #else /* ndef _DLL */
  37. #define _CRTIMP
  38. #endif /* _DLL */
  39. #endif /* _CRTIMP */
  40. /* Define __cdecl for non-Microsoft compilers */
  41. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  42. #define __cdecl
  43. #endif
  44. #ifndef _SIZE_T_DEFINED
  45. #ifdef _WIN64
  46. typedef unsigned __int64 size_t;
  47. #else
  48. typedef _W64 unsigned int size_t;
  49. #endif
  50. #define _SIZE_T_DEFINED
  51. #endif
  52. /* Function prototypes */
  53. _CRTIMP void * __cdecl _memccpy(void *, const void *, int, size_t);
  54. _CRTIMP void * __cdecl memchr(const void *, int, size_t);
  55. _CRTIMP int __cdecl _memicmp(const void *, const void *, size_t);
  56. int __cdecl memcmp(const void *, const void *, size_t);
  57. void * __cdecl memcpy(void *, const void *, size_t);
  58. void * __cdecl memset(void *, int, size_t);
  59. #if !__STDC__
  60. /* Non-ANSI names for compatibility */
  61. _CRTIMP void * __cdecl memccpy(void *, const void *, int, size_t);
  62. _CRTIMP int __cdecl memicmp(const void *, const void *, size_t);
  63. #endif /* __STDC__ */
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif /* _INC_MEMORY */