{"action":"closed","issue":{"url":"https://api.github.com/repos/HarryR/logpipe/issues/12","labels_url":"https://api.github.com/repos/HarryR/logpipe/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/HarryR/logpipe/issues/12/comments","events_url":"https://api.github.com/repos/HarryR/logpipe/issues/12/events","html_url":"https://github.com/HarryR/logpipe/issues/12","id":129223627,"number":12,"title":"Build cleanly on Windows (via AppVeyor)","user":{"login":"HarryR","id":303926,"avatar_url":"https://avatars.githubusercontent.com/u/303926?v=3","gravatar_id":"","url":"https://api.github.com/users/HarryR","html_url":"https://github.com/HarryR","followers_url":"https://api.github.com/users/HarryR/followers","following_url":"https://api.github.com/users/HarryR/following{/other_user}","gists_url":"https://api.github.com/users/HarryR/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryR/subscriptions","organizations_url":"https://api.github.com/users/HarryR/orgs","repos_url":"https://api.github.com/users/HarryR/repos","events_url":"https://api.github.com/users/HarryR/events{/privacy}","received_events_url":"https://api.github.com/users/HarryR/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"HarryR","id":303926,"avatar_url":"https://avatars.githubusercontent.com/u/303926?v=3","gravatar_id":"","url":"https://api.github.com/users/HarryR","html_url":"https://github.com/HarryR","followers_url":"https://api.github.com/users/HarryR/followers","following_url":"https://api.github.com/users/HarryR/following{/other_user}","gists_url":"https://api.github.com/users/HarryR/gists{/gist_id}","starred_url":"https://api.github.com/users/HarryR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HarryR/subscriptions","organizations_url":"https://api.github.com/users/HarryR/orgs","repos_url":"https://api.github.com/users/HarryR/repos","events_url":"https://api.github.com/users/HarryR/events{/privacy}","received_events_url":"https://api.github.com/users/HarryR/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-27T18:04:51Z","updated_at":"2016-01-27T20:16:35Z","closed_at":"2016-01-27T20:16:35Z","body":"I have AppVeyor setup at: https://ci.appveyor.com/project/harryr/logpipe/build/messages\r\n\r\nAfter enabling -Weverything and fixing the build warnings that Clang produces I've reduced the list of problems significantly.\r\n\r\nHowever the following portability problems remain:\r\n\r\n * strptime doesn't exist on Windows\r\n * 'tm_gmtoff': is not a member of 'tm'\r\n * 'strncasecmp' undefined; assuming extern returning int\r\n * 'strndup' undefined; assuming extern returning int\r\n * 'gmtime_r' undefined; assuming extern returning int\r\n\r\nAdditionally I noticed both `gmtime` and `gmtime_r` are being used, if possible we should use `gmtime_r` to avoid race conditions across multiple threads.\r\n\r\nstrptime and gmtime_r seem to be the biggest blockers.\r\n\r\nstrptime can be found at:\r\n\r\n * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD (BSD license)\r\n * http://plibc.sourceforge.net/doxygen/strptime_8c-source.html (LGPL license)\r\n\r\nUnfortunately I don't have a local Windows machine and Visual Studio available to me, and AppVeyor doesn't allow interactive sessions which could make porting more difficult and a series of trials and errors.\r\n\r\ngmtime_r is the second problem, https://social.msdn.microsoft.com/Forums/en-US/692c1969-b4b0-41d8-83ff-3fdc4e5e2317/porting-gmtimer-to-windows-visual-2010?forum=vcgeneral suggests `gmtime_s` is the solution on Windows. It should be easy to create a test in `config.h` \r\n\r\nThe remaining functions are straightforward to port."}}