{"action":"created","issue":{"url":"https://api.github.com/repos/sass/libsass/issues/1144","labels_url":"https://api.github.com/repos/sass/libsass/issues/1144/labels{/name}","comments_url":"https://api.github.com/repos/sass/libsass/issues/1144/comments","events_url":"https://api.github.com/repos/sass/libsass/issues/1144/events","html_url":"https://github.com/sass/libsass/issues/1144","id":71850698,"number":1144,"title":"Missing #include in util.cpp","user":{"login":"anderstn","id":1122508,"avatar_url":"https://avatars.githubusercontent.com/u/1122508?v=3","gravatar_id":"","url":"https://api.github.com/users/anderstn","html_url":"https://github.com/anderstn","followers_url":"https://api.github.com/users/anderstn/followers","following_url":"https://api.github.com/users/anderstn/following{/other_user}","gists_url":"https://api.github.com/users/anderstn/gists{/gist_id}","starred_url":"https://api.github.com/users/anderstn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderstn/subscriptions","organizations_url":"https://api.github.com/users/anderstn/orgs","repos_url":"https://api.github.com/users/anderstn/repos","events_url":"https://api.github.com/users/anderstn/events{/privacy}","received_events_url":"https://api.github.com/users/anderstn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sass/libsass/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sass/libsass/milestones/7","html_url":"https://github.com/sass/libsass/milestones/3.2.1","labels_url":"https://api.github.com/repos/sass/libsass/milestones/7/labels","id":1090130,"number":7,"title":"3.2.1","description":"This milestone tracks a 3.2.1 hotfix release.","creator":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":13,"state":"open","created_at":"2015-04-30T00:03:52Z","updated_at":"2015-04-30T03:22:02Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-04-29T11:31:01Z","updated_at":"2015-04-30T04:49:50Z","closed_at":"2015-04-30T00:16:00Z","body":"In commit 7e1b94b94eb60833dcd96f572f1357b924b62183 a macro using stderr was added in util.cpp however stdio.h was not included. As a result the file won't compile on Windows.\r\n\r\nBroken code:\r\n```c++\r\n#include<stdint.h>\r\n#include \"ast.hpp\"\r\n#include \"util.hpp\"\r\n#include \"prelexer.hpp\"\r\n#include \"utf8/checked.h\"\r\n\r\nnamespace Sass {\r\n\r\n  #define out_of_memory() do {                    \\\r\n      fprintf(stderr, \"Out of memory.\\n\");    \\\r\n      exit(EXIT_FAILURE);                     \\\r\n    } while (0)\r\n\r\n  /* Sadly, sass_strdup is not portable. */\r\n  char *sass_strdup(const char *str)\r\n  {\r\n    char *ret = (char*) malloc(strlen(str) + 1);\r\n    if (ret == NULL)\r\n      out_of_memory();\r\n    strcpy(ret, str);\r\n    return ret;\r\n  }\r\n  \r\n  ...\r\n}\r\n```\r\n\r\nCode that compiles:\r\n```c++\r\n#include<stdint.h>\r\n#include<stdio.h>\r\n#include \"ast.hpp\"\r\n#include \"util.hpp\"\r\n#include \"prelexer.hpp\"\r\n#include \"utf8/checked.h\"\r\n\r\nnamespace Sass {\r\n\r\n  #define out_of_memory() do {                    \\\r\n      fprintf(stderr, \"Out of memory.\\n\");    \\\r\n      exit(EXIT_FAILURE);                     \\\r\n    } while (0)\r\n\r\n  /* Sadly, sass_strdup is not portable. */\r\n  char *sass_strdup(const char *str)\r\n  {\r\n    char *ret = (char*) malloc(strlen(str) + 1);\r\n    if (ret == NULL)\r\n      out_of_memory();\r\n    strcpy(ret, str);\r\n    return ret;\r\n  }\r\n  \r\n  ...\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/sass/libsass/issues/comments/97661189","html_url":"https://github.com/sass/libsass/issues/1144#issuecomment-97661189","issue_url":"https://api.github.com/repos/sass/libsass/issues/1144","id":97661189,"user":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T04:49:50Z","updated_at":"2015-04-30T04:49:50Z","body":"Fixed in [3.2.1](https://github.com/sass/libsass/releases/tag/3.2.1)"}}