2013/6/6 dw <limegreenso...@yahoo.com>:
>
>> AFAI researched prototype in platform-header is using SIZE_T.
> The question is, which header do you want to be consistent with? Even
> files within the PSDK don't agree.
>
>  From the platform sdk winnt.h we see:
>
> VOID
> __stosb (
>      __out_ecount_full(Count) PBYTE  Destination,
>      __in BYTE  Value,
>      __in SIZE_T Count
>      );
>
> And from the platform sdk intrin.h we see:
>
> __MACHINEI(void __stosb(unsigned char *, unsigned char, size_t))
>
> And for good measure, in the MSVC runtime, we see
>
> VC\crt\src\intrin.h:__MACHINEI(void __stosb(unsigned char *, unsigned
> char, size_t))
>
> Unfortunately, MS can get away with mixing SIZE_T with size_t, since
> they don't change the size of their ints.
>
> But if you feel strongly, I suppose we can change everything to SIZE_T.
> This will make use compatible with the PSDK, but incompatible with the CRT.
>
> dw

You miss the point, why intrin.h header can use size_t here even for
mingw-w64.  The point is that LP64 target provides type size_t proper
for its ABI.  Same we do for mingw case.  The intrin.h header is a
C-runtime header and due this header additional makes sure we have
C-linkage, we have no issues about signatures here.
Later is btw the cause why implementation in .c can use size_t
instead, due it uses C and therefore has no special signatures, too.
So signature of inline-function has to be same as for its prototype.
For C++ signatures have to be same, as otherwise C++ will see it as
two different functions.  One with C-linkage, and one with C++'s.
As the shared prototype for those functions are coming from winnt.h
header, therefore functions are belonging to platform-header.

Kai

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to