[pypy-svn] r59055 - pypy/branch/cbuild-refactor/pypy/translator/c/src
fijal at codespeak.net
fijal at codespeak.net
Mon Oct 13 10:09:05 CEST 2008
Author: fijal
Date: Mon Oct 13 10:09:05 2008
New Revision: 59055
Modified:
pypy/branch/cbuild-refactor/pypy/translator/c/src/signals.h
Log:
including the whole python.h for couple of constants seems to make
little sense, try to be a bit smarter.
Modified: pypy/branch/cbuild-refactor/pypy/translator/c/src/signals.h
==============================================================================
--- pypy/branch/cbuild-refactor/pypy/translator/c/src/signals.h (original)
+++ pypy/branch/cbuild-refactor/pypy/translator/c/src/signals.h Mon Oct 13 10:09:05 2008
@@ -4,7 +4,21 @@
#ifndef _PYPY_SIGNALS_H
#define _PYPY_SIGNALS_H
-#include "Python.h" /* XXX for LONG_MIN */
+#include <limits.h>
+
+#ifndef LONG_MAX
+#if SIZEOF_LONG == 4
+#define LONG_MAX 0X7FFFFFFFL
+#elif SIZEOF_LONG == 8
+#define LONG_MAX 0X7FFFFFFFFFFFFFFFL
+#else
+#error "could not set LONG_MAX in pyport.h"
+#endif
+#endif
+
+#ifndef LONG_MIN
+#define LONG_MIN (-LONG_MAX-1)
+#endif
#include <stdlib.h>
More information about the Pypy-commit
mailing list