[pypy-svn] r50653 - pypy/dist/pypy/rpython/module
fijal at codespeak.net
fijal at codespeak.net
Tue Jan 15 22:20:09 CET 2008
Author: fijal
Date: Tue Jan 15 22:20:07 2008
New Revision: 50653
Modified:
pypy/dist/pypy/rpython/module/ll_os.py
Log:
Quick and dirty fix to make windows work. We need to have a sane way
of doing this at some point (and making llvm happy at the same time)
Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os.py Tue Jan 15 22:20:07 2008
@@ -76,27 +76,28 @@
self.configure(CConfig)
# we need an indirection via c functions to get macro calls working on llvm
- decl_snippet = """
+ if hasattr(os, 'WCOREDUMP'):
+ decl_snippet = """
%(ret_type)s pypy_macro_wrapper_%(name)s (int status);
- """
- def_snippet = """
+ """
+ def_snippet = """
%(ret_type)s pypy_macro_wrapper_%(name)s (int status) {
- return %(name)s(status);
+ return %(name)s(status);
}
- """
- decls = []
- defs = []
- for name in self.w_star:
- data = {'ret_type': 'int', 'name': name}
- decls.append(decl_snippet % data)
- defs.append(def_snippet % data)
- h_source = decls + defs
-
- self.compilation_info = self.compilation_info.merge(
- ExternalCompilationInfo(
- post_include_lines = decls,
- separate_module_sources = ["\n".join(h_source)]
- ))
+ """
+ decls = []
+ defs = []
+ for name in self.w_star:
+ data = {'ret_type': 'int', 'name': name}
+ decls.append(decl_snippet % data)
+ defs.append(def_snippet % data)
+ h_source = decls + defs
+
+ self.compilation_info = self.compilation_info.merge(
+ ExternalCompilationInfo(
+ post_include_lines = decls,
+ separate_module_sources = ["\n".join(h_source)]
+ ))
# a simple, yet usefull factory
def extdef_for_os_function_returning_int(self, name, **kwds):
More information about the Pypy-commit
mailing list