On 1/28/19 7:16 AM, Liu Hao wrote:
在 2019/1/28 9:45, Zebediah Figura 写道:
 From 8cb9f70bba03c555767e6d9767b92ac3b9b624f2 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figur...@gmail.com>
Date: Sat, 15 Dec 2018 21:03:47 -0600
Subject: [PATCH] ntintsafe.h: Add header.

Signed-off-by: Zebediah Figura <z.figur...@gmail.com>
---
  mingw-w64-headers/ddk/include/ddk/ntintsafe.h | 401 ++++++++++++++++++
  1 file changed, 401 insertions(+)
  create mode 100644 mingw-w64-headers/ddk/include/ddk/ntintsafe.h

Is is really necessary to duplicate this code for `Rtl*` and non-`Rtl`
variants? Using sort of macros to control what functions to generate
would look more appropriate.

Probably not, no. I'm presuming we'd want to create a common header called something like _mingw_intsafe.h?


P.S. Our implementations of these functions set output parameters to `0`
on overflow but Microsoft variants set them to `-1` for both signed and
unsigned types. Although MSDN says that upon overflow these parameters
are 'not valid' [1] I think we should match MS's behavior. This requires
another patch.

Yep, I'll send a patch to fix this as well.


[1]
https://docs.microsoft.com/en-us/windows/desktop/api/intsafe/nf-intsafe-shorttouchar




_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to