Avoid g++ surround _stdcall with __attribute__ string

I use MinGW's g++ to preprocess my file which has the following function:

1
2
3
4
5
6
7
[call_as(ReadAt)]
    HRESULT _stdcall RemoteReadAt(
        [in] ULARGE_INTEGER ulOffset,
        [out, size_is(cb), length_is(*pcbRead)]
        byte *pv,
        [in] ULONG cb,
        [out] ULONG *pcbRead); 


The preprocess output is:

[call_as(ReadAt)] 
    HRESULT __attribute__((__stdcall__)) RemoteReadAt( 
        [in] ULARGE_INTEGER ulOffset, 
        [out, size_is(cb), length_is(*pcbRead)] 
        byte *pv, 
        [in] ULONG cb, 
        [out] ULONG *pcbRead); 

Is there a g++ option that avoids changing the 2nd line in the output? Please assume that I won't have access to the file so I am looking for a g++ option.

Since it is g++ specific, I assumed that Linux programmers will have better feedback. Apologies if this is the wrong Forum.
Last edited on
Have you tried -D_stdcall=_stdcall
Thanks SGH. That is a very good tip. I was actually using -D__stdcall =__stdcall (2 underscores) because some files use __stdcall. Apparently going back to the complaining file I noticed that it uses _stdcall (single underscore).

Now I use: -D_stdcall=_stdcall -D__stdcall=__stdcall
Topic archived. No new replies allowed.