gevent-on-pypy / pypycore

gevent.core implemented as cffi module, might be used with pypy
56 stars 16 forks source link

does not compile on osx (libev installed using macports) #2

Open sagivmalihi opened 11 years ago

sagivmalihi commented 11 years ago

needed the following diffs to compile:

diff --git a/pypycore.py b/pypycore.py
index cc07b75..8cccd04 100644
--- a/pypycore.py
+++ b/pypycore.py
@@ -98,7 +98,7 @@ struct ev_child {
 };

 struct stat {
-    long long st_nlink;
+    short st_nlink;
     ...;
 };

@@ -200,7 +200,7 @@ void ev_sleep (ev_tstamp delay); /* sleep for a while */

 libev = C = ffi.verify("""   // passed to the real C compiler
 #include <ev.h>
-""", libraries=["ev"])
+""", libraries=["ev"], include_dirs=["/opt/local/include"], library_dirs=["/opt/local/lib"])

 libev.vfd_open = libev.vfd_get = lambda fd: fd
 libev.vfd_free = lambda fd: None
erikvanzijst commented 11 years ago

I just ran into the same issue and was about to change the stat struct in a similar way. However, it safe to simply go from 8 to 2 bytes?

schmir commented 11 years ago

at the moment it doesn't even matter as st_nlink isn't being used. The declaration must match what the system headers define.

erikvanzijst commented 11 years ago

Great, thanks!

alanyang commented 11 years ago

105 line chang 'long long' to 'short'

jvsteiner commented 10 years ago

having this issue as well. I see it's from mid 2013 - any reason it hasn't been merged yet?

schmir commented 10 years ago

please read the README and try gevent