Skip to content
Snippets Groups Projects
Commit dea15377 authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

fix issue with return type of strerror_r being dependent on GNU or XSI...

fix issue with return type of strerror_r being dependent on GNU or XSI compliance: now we just ignore it (we only really want the errstring anyway)
parent c15b9d37
No related branches found
No related tags found
No related merge requests found
...@@ -24,17 +24,16 @@ ...@@ -24,17 +24,16 @@
if(errno) \ if(errno) \
{ \ { \
char errstring[100]; \ char errstring[100]; \
char * x = strerror_r(errnum,errstring,100); \ strerror_r(errnum,errstring,100); \
Exit_binary_c( \ Exit_binary_c( \
BINARY_C_UNDER_OR_OVERFLOW, \ BINARY_C_UNDER_OR_OVERFLOW, \
"Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s %s)\n", \ "Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s)\n", \
c, \ c, \
argv[c], \ argv[c], \
argv[c-1], \ argv[c-1], \
((test<0.0)?"under":"over"), \ ((test<0.0)?"under":"over"), \
errnum, \ errnum, \
errstring, \ errstring); \
x); \
} \ } \
*((double*) a->pointer) = a->modulate * test; \ *((double*) a->pointer) = a->modulate * test; \
__match=TRUE; \ __match=TRUE; \
...@@ -190,17 +189,16 @@ ...@@ -190,17 +189,16 @@
if(errno) \ if(errno) \
{ \ { \
char errstring[100]; \ char errstring[100]; \
char * x = strerror_r(errnum,errstring,100); \ strerror_r(errnum,errstring,100); \
Exit_binary_c( \ Exit_binary_c( \
BINARY_C_UNDER_OR_OVERFLOW, \ BINARY_C_UNDER_OR_OVERFLOW, \
"Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s %s)\n", \ "Argument %d (string %s after %s) has caused a floating point %sflow (errno = %d which is %s)\n", \
c, \ c, \
argv[c], \ argv[c], \
argv[c-1], \ argv[c-1], \
((test<0.0)?"under":"over"), \ ((test<0.0)?"under":"over"), \
errnum, \ errnum, \
errstring, \ errstring); \
x); \
} \ } \
*((double*)cmd_line_args[i].pointer + offset) = \ *((double*)cmd_line_args[i].pointer + offset) = \
(double)test; \ (double)test; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment