meekrosoft / fff

A testing micro framework for creating function test doubles
Other
766 stars 167 forks source link

EXTERN_C clashes with macro of same name in winnt.h #9

Closed CiderMan closed 7 years ago

CiderMan commented 8 years ago

We have a few files in our unit-tests that need fff.h but also need to include windows.h. Unfortunately, both define a macro EXTERN_C so we get warnings about macro redefinitions:

C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(359) : warning C4005: 'EXTERN_C' : macro redefinition W:\dyn_view\common\interface\unittest/fff.h(86) : see previous definition of 'EXTERN_C'

I suggest that the EXTERN_C/END_EXTERNC in fff.h be prefixed with FFF to avoid this clash. (This is the change we've made locally with search-and-replace and it has resolved the issue.)

Regards,

Steve.

meekrosoft commented 8 years ago

This is a great idea! Could you send me a pull request an I will integrate it in fff

CiderMan commented 8 years ago

Thanks Mike. Since this is an issue at work, I'm just confirming that I can assign IP/copyright for this change before I start. (Currently I've only patched fff.h, not the generation script.) I assume that I just need to update the .rb file, install Ruby and confirm that it produces a usable fff.h?

CiderMan commented 8 years ago

You have a pull request!

meekrosoft commented 8 years ago

Great, thanks so much!

On Fri, Apr 8, 2016 at 1:46 PM, CiderMan notifications@github.com wrote:

You have a pull request!

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/meekrosoft/fff/issues/9#issuecomment-207396524