Commit 9035ac46 authored by JimKleckner's avatar JimKleckner

Windos __stdcall and _USE_MATH_DEFINES

parent d90d2455
...@@ -489,12 +489,17 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -489,12 +489,17 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln(" #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)") code.putln(" #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)")
code.putln("#endif") code.putln("#endif")
code.putln("#ifndef __stdcall") code.putln("#if !defined(WIN32) && !defined(MS_WINDOWS)")
code.putln(" #define __stdcall") code.putln(" #ifndef __stdcall")
code.putln("#endif") code.putln(" #define __stdcall")
code.putln("#ifndef __cdecl") code.putln(" #endif")
code.putln(" #define __cdecl") code.putln(" #ifndef __cdecl")
code.putln(" #define __cdecl")
code.putln(" #endif")
code.putln("#else")
code.putln(" #define _USE_MATH_DEFINES")
code.putln("#endif") code.putln("#endif")
self.generate_extern_c_macro_definition(code) self.generate_extern_c_macro_definition(code)
code.putln("#include <math.h>") code.putln("#include <math.h>")
code.putln("#define %s" % Naming.api_guard_prefix + self.api_name(env)) code.putln("#define %s" % Naming.api_guard_prefix + self.api_name(env))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment