Skip to content

Commit 86b056f

Browse files
Fix two C++-Builder 11 issues (#634)
* Invert preprocessor condition, as the Microsoft compiler seems to be the special case - not the other way around * Removed redefinition of typedef 'PHIDP_PREPARSED_DATA' in hidapi_hidsdi.h to match the original hidsdi.h As reported in #630
1 parent 3c04eac commit 86b056f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

windows/hidapi_descriptor_reconstruct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ typedef struct hidp_preparsed_data_ {
213213
USHORT FirstByteOfLinkCollectionArray;
214214
USHORT NumberLinkCollectionNodes;
215215

216-
#if defined(__MINGW32__) || defined(__CYGWIN__)
216+
#ifndef _MSC_VER
217217
// MINGW fails with: Flexible array member in union not supported
218218
// Solution: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
219219
union {

windows/hidapi_hidsdi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ typedef struct _HIDD_ATTRIBUTES{
4040
USHORT VersionNumber;
4141
} HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES;
4242

43-
typedef struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA;
44-
4543
typedef void (__stdcall *HidD_GetHidGuid_)(LPGUID hid_guid);
4644
typedef BOOLEAN (__stdcall *HidD_GetAttributes_)(HANDLE device, PHIDD_ATTRIBUTES attrib);
4745
typedef BOOLEAN (__stdcall *HidD_GetSerialNumberString_)(HANDLE device, PVOID buffer, ULONG buffer_len);

0 commit comments

Comments
 (0)