diff options
author | Eric Wong <e@80x24.org> | 2016-07-28 00:06:46 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-28 02:08:58 +0000 |
commit | 77e43e7803440af0cee9272fb00930664abe01aa (patch) | |
tree | e77258df750438ccd0ea6225ff1739e035bac2cc /ext/clogger_ext/blocking_helpers.h | |
parent | 489fdac7bed0750f09d65b6105cb0b70d7ccf61f (diff) | |
download | clogger-77e43e7803440af0cee9272fb00930664abe01aa.tar.gz |
These defines may cause incompatibilities if Ruby or other system headers decide to clobber these. It's also confusing to override existing, well-known-and-standardized functions.
Diffstat (limited to 'ext/clogger_ext/blocking_helpers.h')
-rw-r--r-- | ext/clogger_ext/blocking_helpers.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/clogger_ext/blocking_helpers.h b/ext/clogger_ext/blocking_helpers.h index c03c2f5..15634b8 100644 --- a/ext/clogger_ext/blocking_helpers.h +++ b/ext/clogger_ext/blocking_helpers.h @@ -54,6 +54,9 @@ static ssize_t my_write(int fd, const void *buf, size_t count) return r; } -# define stat(path,buf) my_stat((path),(buf)) -# define write(fd,buf,count) my_write((fd),(buf),(count)) +# define nogvl_stat(path,buf) my_stat((path),(buf)) +# define nogvl_write(fd,buf,count) my_write((fd),(buf),(count)) +#else /* !WITHOUT_GVL, for Ruby 1.8 users: */ +# define nogvl_stat(path,buf) stat((path),(buf)) +# define nogvl_write(fd,buf,buf) write((fd),(buf),(count)) #endif /* !WITHOUT_GVL */ |