diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index 9340031b6..7314c9af1 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,25 @@ +2004-06-16 Danny Smith + + * include/winnt.h (IMAGE_ORDINAL_FLAG): Map to ... + (IMAGE_ORDINAL_FLAG{32,64}: New defines. + (IMAGE_SNAP_BY_ORDINAL): Map to ... + (IMAGE_SNAP_BY_ORDINAL{32,64}: New defines. + (IMAGE_ORDINAL): Map to ... + (IMAGE_ORDINAL{32,64}: New defines. + (IMAGE_THUNK_DATA): Map to ... + (IMAGE_THUNK_DATA{32,64}: New structures. + (IMAGE_THUNK_DATA): Map to ... + (IMAGE_THUNK_DATA{32,64}: New structures. + (IMAGE_IMPORT_DESCRIPTOR): Map to ... + (IMAGE_IMPORT_DESCRIPTOR{32,64}: New structures. + (IMAGE_IMAGE_TLS_DIRECTORY) Map to ... + (IMAGE_IMAGE_TLS_DIRECTORY{32,64}: New structures. + +2004-06-16 Bang Jun-Young + + * w32api/include/winnt.h (WAITORTIMERCALLBACKFUNC): Protect with + _WIN32_WINNT >= 0x0500. + 2004-06-05 Luke Dunstan * include/winbase.h (GetWriteWatch): Correct prototype. diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h index a34bdf929..024831354 100644 --- a/winsup/w32api/include/winnt.h +++ b/winsup/w32api/include/winnt.h @@ -1047,9 +1047,21 @@ typedef DWORD FLONG; #define IMAGE_ARCHIVE_PAD "\n" #define IMAGE_ARCHIVE_LINKER_MEMBER "/ " #define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// " -#define IMAGE_ORDINAL_FLAG 0x80000000 -#define IMAGE_SNAP_BY_ORDINAL(o) ((o&IMAGE_ORDINAL_FLAG)!=0) -#define IMAGE_ORDINAL(o) (o&0xffff) +#define IMAGE_ORDINAL_FLAG32 0x80000000 +#define IMAGE_SNAP_BY_ORDINAL32(o) ((o&IMAGE_ORDINAL_FLAG32)!=0) +#define IMAGE_ORDINAL32(o) (o&0xffff) +#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL +#define IMAGE_SNAP_BY_ORDINAL64(o) ((o&IMAGE_ORDINAL_FLAG64)!=0) +#define IMAGE_ORDINAL64(o) (o&0xffff) +#ifdef _WIN64 +#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64 +#define IMAGE_SNAP_BY_ORDINAL(o) IMAGE_SNAP_BY_ORDINAL64(o) +#define IMAGE_ORDINAL(o) IMAGE_ORDINAL64(o) +#else +#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32 +#define IMAGE_SNAP_BY_ORDINAL(o) IMAGE_SNAP_BY_ORDINAL32(o) +#define IMAGE_ORDINAL(o) IMAGE_ORDINAL32(o) +#endif #define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000 #define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000 #define IMAGE_DEBUG_TYPE_UNKNOWN 0 @@ -2627,23 +2639,38 @@ typedef struct _IMAGE_IMPORT_BY_NAME { WORD Hint; BYTE Name[1]; } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME; -typedef struct _IMAGE_THUNK_DATA { +typedef struct _IMAGE_THUNK_DATA32 { union { - PBYTE ForwarderString; - PDWORD Function; + DWORD ForwarderString; + DWORD Function; DWORD Ordinal; - PIMAGE_IMPORT_BY_NAME AddressOfData; + DWORD AddressOfData; } u1; -} IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA; +} IMAGE_THUNK_DATA32,*PIMAGE_THUNK_DATA32; +typedef struct _IMAGE_THUNK_DATA64 { + union { + ULONGLONG ForwarderString; + ULONGLONG Function; + ULONGLONG Ordinal; + ULONGLONG AddressOfData; + } u1; +} IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64; +#ifdef __WIN64 +typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA; +typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA; +#else +typedef IMAGE_THUNK_DATA32 IMAGE_THUNK_DATA; +typedef PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA; +#endif typedef struct _IMAGE_IMPORT_DESCRIPTOR { _ANONYMOUS_UNION union { DWORD Characteristics; - PIMAGE_THUNK_DATA OriginalFirstThunk; + DWORD OriginalFirstThunk; } DUMMYUNIONNAME; DWORD TimeDateStamp; DWORD ForwarderChain; DWORD Name; - PIMAGE_THUNK_DATA FirstThunk; + DWORD FirstThunk; } IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR; typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR { DWORD TimeDateStamp; @@ -2656,14 +2683,29 @@ typedef struct _IMAGE_BOUND_FORWARDER_REF { WORD Reserved; } IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF; typedef void(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID,DWORD,PVOID); -typedef struct _IMAGE_TLS_DIRECTORY { +typedef struct _IMAGE_TLS_DIRECTORY32 { DWORD StartAddressOfRawData; DWORD EndAddressOfRawData; - PDWORD AddressOfIndex; - PIMAGE_TLS_CALLBACK *AddressOfCallBacks; + DWORD AddressOfIndex; + DWORD AddressOfCallBacks; DWORD SizeOfZeroFill; DWORD Characteristics; -} IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY; +} IMAGE_TLS_DIRECTORY32,*PIMAGE_TLS_DIRECTORY32; +typedef struct _IMAGE_TLS_DIRECTORY64 { + ULONGLONG StartAddressOfRawData; + ULONGLONG EndAddressOfRawData; + ULONGLONG AddressOfIndex; + ULONGLONG AddressOfCallBacks; + DWORD SizeOfZeroFill; + DWORD Characteristics; +} IMAGE_TLS_DIRECTORY64, *PIMAGE_TLS_DIRECTORY64; +#ifdef __WIN64 +typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY; +typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY; +#else +typedef IMAGE_TLS_DIRECTORY32 IMAGE_TLS_DIRECTORY; +typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY; +#endif typedef struct _IMAGE_RESOURCE_DIRECTORY { DWORD Characteristics; DWORD TimeDateStamp; @@ -3266,7 +3308,9 @@ typedef struct _ADMINISTRATOR_POWER_POLICY { #include #endif /* WINVER >= 0x0500 */ +#if (_WIN32_WINNT >= 0x0500) typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); +#endif #ifdef UNICODE typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;