* include/basetsd.h: RC_INVOKED protection and realignment.

Thanks to: Colin Peters <colinpeters@users.sourceforge.net>
This commit is contained in:
Earnie Boyd 2001-06-11 17:29:54 +00:00
parent 43b44bc5ad
commit a179327987
2 changed files with 41 additions and 29 deletions

View File

@ -1,4 +1,9 @@
2001.06.11 Earnie Boyd <earnie@users.sourceforge.net>
* include/basetsd.h: RC_INVOKED protection and realignment.
Thanks to: Colin Peters <colinpeters@users.sourceforge.net>
2001.06.06 Earnie Boyd <earnie@users.sourceforge.net> 2001.06.06 Earnie Boyd <earnie@users.sourceforge.net>
* Makefile.in (bindist): Reassign value of exec_prefix on make command * Makefile.in (bindist): Reassign value of exec_prefix on make command

View File

@ -1,5 +1,40 @@
#ifndef _BASETSD_H #ifndef _BASETSD_H
#define _BASETSD_H #define _BASETSD_H
#if defined(_WIN64)
#define __int3264 __int64
#define ADDRESS_TAG_BIT 0x40000000000UI64
#else /* !_WIN64 */
#define __int3264 __int32
#define ADDRESS_TAG_BIT 0x80000000UL
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
#endif /* !_WIN64 */
#define UlongToPtr(ul) ULongToPtr(ul)
#define UintToPtr(ui) UIntToPtr(ui)
#define MAXUINT_PTR (~((UINT_PTR)0))
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
#define MININT_PTR (~MAXINT_PTR)
#define MAXULONG_PTR (~((ULONG_PTR)0))
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
#define MINLONG_PTR (~MAXLONG_PTR)
#define MAXUHALF_PTR ((UHALF_PTR)~0)
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
#ifndef RC_INVOKED
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -16,8 +51,6 @@ typedef __int64 INT_PTR, *PINT_PTR;
typedef unsigned __int64 UINT_PTR, *PUINT_PTR; typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
typedef __int64 LONG_PTR, *PLONG_PTR; typedef __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR; typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#define __int3264 __int64
#define ADDRESS_TAG_BIT 0x40000000000UI64
typedef unsigned __int64 HANDLE_PTR; typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR; typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR; typedef int HALF_PTR, *PHALF_PTR;
@ -56,38 +89,11 @@ typedef int INT_PTR, *PINT_PTR;
typedef unsigned int UINT_PTR, *PUINT_PTR; typedef unsigned int UINT_PTR, *PUINT_PTR;
typedef long LONG_PTR, *PLONG_PTR; typedef long LONG_PTR, *PLONG_PTR;
typedef unsigned long ULONG_PTR, *PULONG_PTR; typedef unsigned long ULONG_PTR, *PULONG_PTR;
#define __int3264 __int32
#define ADDRESS_TAG_BIT 0x80000000UL
typedef unsigned short UHALF_PTR, *PUHALF_PTR; typedef unsigned short UHALF_PTR, *PUHALF_PTR;
typedef short HALF_PTR, *PHALF_PTR; typedef short HALF_PTR, *PHALF_PTR;
typedef unsigned long HANDLE_PTR; typedef unsigned long HANDLE_PTR;
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
#endif /* !_WIN64 */ #endif /* !_WIN64 */
#define UlongToPtr(ul) ULongToPtr(ul)
#define UintToPtr(ui) UIntToPtr(ui)
#define MAXUINT_PTR (~((UINT_PTR)0))
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
#define MININT_PTR (~MAXINT_PTR)
#define MAXULONG_PTR (~((ULONG_PTR)0))
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
#define MINLONG_PTR (~MAXLONG_PTR)
#define MAXUHALF_PTR ((UHALF_PTR)~0)
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
typedef ULONG_PTR SIZE_T, *PSIZE_T; typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T; typedef LONG_PTR SSIZE_T, *PSSIZE_T;
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
@ -99,5 +105,6 @@ typedef unsigned __int64 UINT64, *PUINT64;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* !RC_INVOKED */
#endif /* _BASETSD_H */ #endif /* _BASETSD_H */