X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=libserialport_internal.h;h=49f36d77b9d256713fba90ddf28c3f06d7df45f5;hb=e9d78d82c4a2bc10863af5511baeae9a954f50db;hp=fde4883cf77d41f43f15cbb94a2eeae2ff61646c;hpb=8488868187ed26f8abd057775ff3cfd2aaf7ea35;p=libserialport.git diff --git a/libserialport_internal.h b/libserialport_internal.h index fde4883..49f36d7 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -51,7 +51,11 @@ static const GUID name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } } #include #include -#include "windows_ddk.h" +/* The largest size that can be passed to WriteFile() safely + * on any architecture. This arises from the expression: + * PAGE_SIZE * (65535 - sizeof(MDL)) / sizeof(ULONG_PTR) + * and this worst-case value is found on x64. */ +#define WRITEFILE_MAX_SIZE 33525760 #else #include #include