Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Under MinGW bool and uintptr_t are unknown type names #23

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 3 comments
Closed

Under MinGW bool and uintptr_t are unknown type names #23

GoogleCodeExporter opened this issue Mar 19, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Download latest revision(r21) of npapi-sdk headers

2. Create, in the same folder as the headers, a file a.c:
#include "npfunctions.h"
#include <stdio.h>
int main(int argc, char *argv[])
{
  return 0;
}

3. With the MinGW Shell go to said folder and run:
gcc a.c

What is the expected output? What do you see instead?

The expected output is an executable: a.exe

Instead, I see a lot of errors related to 'uintptr_t' and 'bool' being unknown 
type names.

What operating system are you compiling on?

Windows XP, MinGW GCC 4.7.2

Please provide any additional information below.

I believe the reason for this issue is nptypes.h assuming that WIN32 has no 
knowledge of C99. It may be true for MSVC, but isn't true for MinGW( and 
probably not true for Cygwin, and maybe others, too).

In nptypes.h, if I replace, in line 47:
#if defined(WIN32) || defined(OS2)
with:
#if (defined(WIN32) && !defined(__GNUC__)) || defined(OS2)
the issue is resolved, for me.

Original issue reported on code.google.com by TamirE...@gmail.com on 3 Dec 2012 at 6:18

@GoogleCodeExporter
Copy link
Author

I'm fine with the proposed change. Are you, Stuart? If so I'll commit it.

Original comment by josh....@gmail.com on 7 Dec 2012 at 11:46

@GoogleCodeExporter
Copy link
Author

LGTM

Original comment by stuart.morgan on 9 Dec 2012 at 2:33

@GoogleCodeExporter
Copy link
Author

Fixed

Original comment by josh....@gmail.com on 10 Dec 2012 at 10:28

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant