Skip to content

Commit

Permalink
Make sure pTHX is available for sterror
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Jul 17, 2012
1 parent a854e89 commit ac13e28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Revision history for File-Map


{{$NEXT}} {{$NEXT}}
It's called HAS_STRERROR_R and not HAVE_STRERROR_R 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 0.51 2012-06-13 21:06:41 Europe/Amsterdam
Remove threads.pm from dependencies Remove threads.pm from dependencies
Expand Down
3 changes: 2 additions & 1 deletion lib/File/Map.xs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static const struct {


#else #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 #ifdef HAS_STRERROR_R
# if STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW # if STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
const char* message = strerror_r(errno, buffer, buffer_size); const char* message = strerror_r(errno, buffer, buffer_size);
Expand All @@ -145,6 +145,7 @@ static void get_sys_error(char* buffer, size_t buffer_size) {
buffer[buffer_size - 1] = '\0'; buffer[buffer_size - 1] = '\0';
#endif #endif
} }
#define get_sys_error(buffer, buffer_size) S_get_sys_error(aTHX_ buffer, buffer_size)


static size_t page_size() { static size_t page_size() {
static size_t pagesize = 0; static size_t pagesize = 0;
Expand Down

0 comments on commit ac13e28

Please sign in to comment.