Source code of Windows XP (NT5)
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.

73 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. iis64.h
  5. Abstract:
  6. This include file contains public macros and type definitions to ease
  7. the port from 32- to 64-bits.
  8. Author:
  9. Keith Moore (keithmo) 20-Jan-1998
  10. Revision History:
  11. --*/
  12. #ifndef _IIS64_H_
  13. #define _IIS64_H_
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif // _cplusplus
  17. //
  18. // Ensure the size_t type is properly defined.
  19. //
  20. #ifndef _SIZE_T_DEFINED
  21. #ifdef _WIN64
  22. typedef unsigned __int64 size_t;
  23. #else
  24. typedef unsigned int size_t;
  25. #endif
  26. #define _SIZE_T_DEFINED
  27. #endif
  28. //
  29. // The DIFF macro should be used around an expression involving pointer
  30. // subtraction. The expression passed to DIFF is cast to a size_t type,
  31. // allowing the result to be easily assigned to any 32-bit variable or
  32. // passed to a function expecting a 32-bit argument.
  33. //
  34. #define DIFF(x) ((size_t)(x))
  35. //
  36. // Macros for mapping "native" Win32 HANDLEs <-> Winsock SOCKETs.
  37. //
  38. // N.B. These are temporary and will (hopefully) go away after the
  39. // public WINSOCK2.H header file is made Win64 compliant.
  40. //
  41. #define HANDLE_TO_SOCKET(h) ((SOCKET)(h))
  42. #define SOCKET_TO_HANDLE(s) ((HANDLE)(s))
  43. #ifdef __cplusplus
  44. } // extern "C"
  45. #endif // _cplusplus
  46. #endif // _IIS64_H_