@needs_dlfcn
def test_dylink_stdlib(self):
    self.dylink_test(header='\n      #include <math.h>\n      #include <stdlib.h>\n      #include <string.h>\n      char *side(const char *data);\n      double pow_two(double x);\n    ', main='\n      #include <stdio.h>\n      #include "header.h"\n      int main() {\n        char *temp = side("hello through side\\n");\n        char *ret = (char*)malloc(strlen(temp)+1);\n        strcpy(ret, temp);\n        temp[1] = \'x\';\n        puts(ret);\n        printf("pow_two: %d.\\n", int(pow_two(5.9)));\n        return 0;\n      }\n    ', side='\n      #include "header.h"\n      char *side(const char *data) {\n        char *ret = (char*)malloc(strlen(data)+1);\n        strcpy(ret, data);\n        return ret;\n      }\n      double pow_two(double x) {\n        return pow(2, x);\n      }\n    ', expected=['hello through side\n\npow_two: 59.'])
@needs_dlfcn
def test_dylink_stdlib(self):
    self.dylink_test(header='\n      #include <math.h>\n      #include <stdlib.h>\n      #include <string.h>\n      char *side(const char *data);\n      double pow_two(double x);\n    ', main='\n      #include <stdio.h>\n      #include "header.h"\n      int main() {\n        char *temp = side("hello through side\\n");\n        char *ret = (char*)malloc(strlen(temp)+1);\n        strcpy(ret, temp);\n        temp[1] = \'x\';\n        puts(ret);\n        printf("pow_two: %d.\\n", int(pow_two(5.9)));\n        return 0;\n      }\n    ', side='\n      #include "header.h"\n      char *side(const char *data) {\n        char *ret = (char*)malloc(strlen(data)+1);\n        strcpy(ret, data);\n        return ret;\n      }\n      double pow_two(double x) {\n        return pow(2, x);\n      }\n    ', expected=['hello through side\n\npow_two: 59.'])