Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make sure pTHX is available for sterror

  • Loading branch information...
commit ac13e283db7b895e8f2d1a0b65cd1adfb0ebb75b 1 parent a854e89
@Leont authored
Showing with 3 additions and 1 deletion.
  1. +1 −0  Changes
  2. +2 −1  lib/File/Map.xs
View
1  Changes
@@ -2,6 +2,7 @@ Revision history for File-Map
{{$NEXT}}
It's called HAS_STRERROR_R and not HAVE_STRERROR_R
+ Make sure pTHX is available for sterror (5.8.7 compatibility)
0.51 2012-06-13 21:06:41 Europe/Amsterdam
Remove threads.pm from dependencies
View
3  lib/File/Map.xs
@@ -130,7 +130,7 @@ static const struct {
#else
-static void get_sys_error(char* buffer, size_t buffer_size) {
+static void S_get_sys_error(pTHX_ char* buffer, size_t buffer_size) {
#ifdef HAS_STRERROR_R
# if STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
const char* message = strerror_r(errno, buffer, buffer_size);
@@ -145,6 +145,7 @@ static void get_sys_error(char* buffer, size_t buffer_size) {
buffer[buffer_size - 1] = '\0';
#endif
}
+#define get_sys_error(buffer, buffer_size) S_get_sys_error(aTHX_ buffer, buffer_size)
static size_t page_size() {
static size_t pagesize = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.