{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/29623002","id":29623002,"diff_hunk":"@@ -1,10 +1,142 @@\n #ifndef NVIM_OS_OS_DEFS_H\n #define NVIM_OS_OS_DEFS_H\n \n+#include <ctype.h>\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <sys/stat.h>\n+#include <sys/types.h>\n+\n+// Note: Some systems need both string.h and strings.h (Savage). However,\n+// some systems can't handle both, only use string.h in that case.\n+#include <string.h>\n+#if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H)\n+#  include <strings.h>\n+#endif\n+\n+\n #ifdef WIN32\n-# include \"nvim/os/win_defs.h\"\n+#  include \"nvim/os/win_defs.h\"\n+#else\n+#  include \"nvim/os/unix_defs.h\"\n+#endif\n+\n+\n+// on some systems time.h should not be included together with sys/time.h\n+#if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME)\n+#  include <time.h>\n+#endif\n+\n+#ifdef HAVE_SYS_TIME_H\n+#  include <sys/time.h>\n+#endif\n+\n+// Valid on windows, but not recommended\n+#include <signal.h>\n+\n+// Note: if MAXNAMLEN has the wrong value, you will get error messages\n+// for not being able to open the swap file.\n+#ifndef MAXNAMLEN\n+#  ifdef NAME_MAX\n+#    define MAXNAMLEN NAME_MAX\n+#  else\n+     // Seems to be the most supported value.\n+#    define MAXNAMLEN 255\n+#  endif\n+#endif\n+\n+// Use the system path length if it makes sense.\n+#if defined(PATH_MAX) && (PATH_MAX > 1000)\n+#  define MAXPATHL       PATH_MAX\n #else\n-# include \"nvim/os/unix_defs.h\"\n+#  define MAXPATHL       1024\n+#endif\n+\n+#define BASENAMELEN     (MAXNAMLEN - 5)\n+\n+#ifndef SYS_VIMRC_FILE\n+#  define SYS_VIMRC_FILE \"$VIM/nvimrc\"\n+#endif\n+\n+#ifndef DFLT_HELPFILE\n+#  define DFLT_HELPFILE  \"$VIMRUNTIME/doc/help.txt\"\n+#endif\n+\n+#ifndef FILETYPE_FILE\n+#  define FILETYPE_FILE  \"filetype.vim\"\n+#endif\n+\n+#ifndef FTPLUGIN_FILE\n+#  define FTPLUGIN_FILE  \"ftplugin.vim\"\n+#endif\n+\n+#ifndef INDENT_FILE\n+#  define INDENT_FILE    \"indent.vim\"\n+#endif\n+\n+#ifndef FTOFF_FILE\n+#  define FTOFF_FILE     \"ftoff.vim\"\n #endif\n \n+#ifndef FTPLUGOF_FILE\n+#  define FTPLUGOF_FILE  \"ftplugof.vim\"\n+#endif\n+\n+#ifndef INDOFF_FILE\n+#  define INDOFF_FILE    \"indoff.vim\"\n+#endif\n+\n+#ifndef SYS_MENU_FILE\n+#  define SYS_MENU_FILE  \"$VIMRUNTIME/menu.vim\"\n+#endif\n+\n+#define DFLT_ERRORFILE          \"errors.err\"\n+\n+#ifndef SYNTAX_FNAME\n+#  define SYNTAX_FNAME   \"$VIMRUNTIME/syntax/%s.vim\"\n+#endif\n+\n+// Special wildcards that need to be handled by the shell\n+#define SPECIAL_WILDCHAR    \"`'{\"\n+\n+// size of the command processing buffer\n+#define CMDBUFFSIZE 1024\n+\n+// use up to 5 Mbyte for a buffer\n+#ifndef DFLT_MAXMEM\n+#  define DFLT_MAXMEM   (5*1024)\n+#endif\n+\n+// use up to 10 Mbyte for Vim\n+#ifndef DFLT_MAXMEMTOT\n+#  define DFLT_MAXMEMTOT        (10*1024)\n+#endif\n+\n+#if !defined(S_ISDIR) && defined(S_IFDIR)\n+#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n+#endif\n+\n+#if !defined(S_ISREG) && defined(S_IFREG)\n+#  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n+#endif\n+\n+#if !defined(S_ISBLK) && defined(S_IFBLK)\n+#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)\n+#endif","path":"src/nvim/os/os_defs.h","position":127,"original_position":127,"commit_id":"c6d392b99d76f26e05e23a90b4c49d315d166395","original_commit_id":"c6d392b99d76f26e05e23a90b4c49d315d166395","user":{"login":"equalsraf","id":715238,"avatar_url":"https://avatars.githubusercontent.com/u/715238?v=3","gravatar_id":"","url":"https://api.github.com/users/equalsraf","html_url":"https://github.com/equalsraf","followers_url":"https://api.github.com/users/equalsraf/followers","following_url":"https://api.github.com/users/equalsraf/following{/other_user}","gists_url":"https://api.github.com/users/equalsraf/gists{/gist_id}","starred_url":"https://api.github.com/users/equalsraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equalsraf/subscriptions","organizations_url":"https://api.github.com/users/equalsraf/orgs","repos_url":"https://api.github.com/users/equalsraf/repos","events_url":"https://api.github.com/users/equalsraf/events{/privacy}","received_events_url":"https://api.github.com/users/equalsraf/received_events","type":"User","site_admin":false},"body":"I think S_ISBLK only makes sense for Unix.","created_at":"2015-05-04T20:58:04Z","updated_at":"2015-05-04T20:58:04Z","html_url":"https://github.com/neovim/neovim/pull/2578#discussion_r29623002","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/2578","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/29623002"},"html":{"href":"https://github.com/neovim/neovim/pull/2578#discussion_r29623002"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2578"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/2578","id":34648380,"html_url":"https://github.com/neovim/neovim/pull/2578","diff_url":"https://github.com/neovim/neovim/pull/2578.diff","patch_url":"https://github.com/neovim/neovim/pull/2578.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/2578","number":2578,"state":"open","locked":false,"title":"[RFC] Refactor os_unix_defs.h to os/","user":{"login":"Yamakaky","id":1327378,"avatar_url":"https://avatars.githubusercontent.com/u/1327378?v=3","gravatar_id":"","url":"https://api.github.com/users/Yamakaky","html_url":"https://github.com/Yamakaky","followers_url":"https://api.github.com/users/Yamakaky/followers","following_url":"https://api.github.com/users/Yamakaky/following{/other_user}","gists_url":"https://api.github.com/users/Yamakaky/gists{/gist_id}","starred_url":"https://api.github.com/users/Yamakaky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yamakaky/subscriptions","organizations_url":"https://api.github.com/users/Yamakaky/orgs","repos_url":"https://api.github.com/users/Yamakaky/repos","events_url":"https://api.github.com/users/Yamakaky/events{/privacy}","received_events_url":"https://api.github.com/users/Yamakaky/received_events","type":"User","site_admin":false},"body":"I didn't fixed the values, so windows paths are not changed.","created_at":"2015-05-04T15:46:38Z","updated_at":"2015-05-04T20:58:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e41b7ac28e94fd990ee1244864fd0f54f0f70d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/2578/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/2578/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2578/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/c6d392b99d76f26e05e23a90b4c49d315d166395","head":{"label":"Yamakaky:feature/os_uni_defs-split","ref":"feature/os_uni_defs-split","sha":"c6d392b99d76f26e05e23a90b4c49d315d166395","user":{"login":"Yamakaky","id":1327378,"avatar_url":"https://avatars.githubusercontent.com/u/1327378?v=3","gravatar_id":"","url":"https://api.github.com/users/Yamakaky","html_url":"https://github.com/Yamakaky","followers_url":"https://api.github.com/users/Yamakaky/followers","following_url":"https://api.github.com/users/Yamakaky/following{/other_user}","gists_url":"https://api.github.com/users/Yamakaky/gists{/gist_id}","starred_url":"https://api.github.com/users/Yamakaky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yamakaky/subscriptions","organizations_url":"https://api.github.com/users/Yamakaky/orgs","repos_url":"https://api.github.com/users/Yamakaky/repos","events_url":"https://api.github.com/users/Yamakaky/events{/privacy}","received_events_url":"https://api.github.com/users/Yamakaky/received_events","type":"User","site_admin":false},"repo":{"id":34920784,"name":"neovim","full_name":"Yamakaky/neovim","owner":{"login":"Yamakaky","id":1327378,"avatar_url":"https://avatars.githubusercontent.com/u/1327378?v=3","gravatar_id":"","url":"https://api.github.com/users/Yamakaky","html_url":"https://github.com/Yamakaky","followers_url":"https://api.github.com/users/Yamakaky/followers","following_url":"https://api.github.com/users/Yamakaky/following{/other_user}","gists_url":"https://api.github.com/users/Yamakaky/gists{/gist_id}","starred_url":"https://api.github.com/users/Yamakaky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yamakaky/subscriptions","organizations_url":"https://api.github.com/users/Yamakaky/orgs","repos_url":"https://api.github.com/users/Yamakaky/repos","events_url":"https://api.github.com/users/Yamakaky/events{/privacy}","received_events_url":"https://api.github.com/users/Yamakaky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yamakaky/neovim","description":"ambitious Vim-fork focused on extensibility and agility. Please consider helping sustain Neovim development! https://salt.bountysource.com/teams/neovim","fork":true,"url":"https://api.github.com/repos/Yamakaky/neovim","forks_url":"https://api.github.com/repos/Yamakaky/neovim/forks","keys_url":"https://api.github.com/repos/Yamakaky/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yamakaky/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yamakaky/neovim/teams","hooks_url":"https://api.github.com/repos/Yamakaky/neovim/hooks","issue_events_url":"https://api.github.com/repos/Yamakaky/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/Yamakaky/neovim/events","assignees_url":"https://api.github.com/repos/Yamakaky/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/Yamakaky/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/Yamakaky/neovim/tags","blobs_url":"https://api.github.com/repos/Yamakaky/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yamakaky/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yamakaky/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yamakaky/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yamakaky/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/Yamakaky/neovim/languages","stargazers_url":"https://api.github.com/repos/Yamakaky/neovim/stargazers","contributors_url":"https://api.github.com/repos/Yamakaky/neovim/contributors","subscribers_url":"https://api.github.com/repos/Yamakaky/neovim/subscribers","subscription_url":"https://api.github.com/repos/Yamakaky/neovim/subscription","commits_url":"https://api.github.com/repos/Yamakaky/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yamakaky/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yamakaky/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yamakaky/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yamakaky/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/Yamakaky/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yamakaky/neovim/merges","archive_url":"https://api.github.com/repos/Yamakaky/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yamakaky/neovim/downloads","issues_url":"https://api.github.com/repos/Yamakaky/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/Yamakaky/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/Yamakaky/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/Yamakaky/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yamakaky/neovim/labels{/name}","releases_url":"https://api.github.com/repos/Yamakaky/neovim/releases{/id}","created_at":"2015-05-01T19:44:44Z","updated_at":"2015-05-01T20:05:58Z","pushed_at":"2015-05-04T18:44:52Z","git_url":"git://github.com/Yamakaky/neovim.git","ssh_url":"git@github.com:Yamakaky/neovim.git","clone_url":"https://github.com/Yamakaky/neovim.git","svn_url":"https://github.com/Yamakaky/neovim","homepage":"http://neovim.io","size":30131,"stargazers_count":0,"watchers_count":0,"language":"VimL","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neovim:master","ref":"master","sha":"115f137b124a8b26c92656cf190e340b2364a5a2","user":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"repo":{"id":16408992,"name":"neovim","full_name":"neovim/neovim","owner":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neovim/neovim","description":"ambitious Vim-fork focused on extensibility and agility. Please consider helping sustain Neovim development! https://salt.bountysource.com/teams/neovim","fork":false,"url":"https://api.github.com/repos/neovim/neovim","forks_url":"https://api.github.com/repos/neovim/neovim/forks","keys_url":"https://api.github.com/repos/neovim/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neovim/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neovim/neovim/teams","hooks_url":"https://api.github.com/repos/neovim/neovim/hooks","issue_events_url":"https://api.github.com/repos/neovim/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/neovim/neovim/events","assignees_url":"https://api.github.com/repos/neovim/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/neovim/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/neovim/neovim/tags","blobs_url":"https://api.github.com/repos/neovim/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neovim/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neovim/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/neovim/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/neovim/neovim/languages","stargazers_url":"https://api.github.com/repos/neovim/neovim/stargazers","contributors_url":"https://api.github.com/repos/neovim/neovim/contributors","subscribers_url":"https://api.github.com/repos/neovim/neovim/subscribers","subscription_url":"https://api.github.com/repos/neovim/neovim/subscription","commits_url":"https://api.github.com/repos/neovim/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/neovim/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/neovim/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/neovim/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/neovim/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/neovim/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neovim/neovim/merges","archive_url":"https://api.github.com/repos/neovim/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neovim/neovim/downloads","issues_url":"https://api.github.com/repos/neovim/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/neovim/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/neovim/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/neovim/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neovim/neovim/labels{/name}","releases_url":"https://api.github.com/repos/neovim/neovim/releases{/id}","created_at":"2014-01-31T13:39:22Z","updated_at":"2015-05-04T20:34:14Z","pushed_at":"2015-05-04T20:50:07Z","git_url":"git://github.com/neovim/neovim.git","ssh_url":"git@github.com:neovim/neovim.git","clone_url":"https://github.com/neovim/neovim.git","svn_url":"https://github.com/neovim/neovim","homepage":"http://neovim.io","size":76166,"stargazers_count":13218,"watchers_count":13218,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":896,"mirror_url":null,"open_issues_count":460,"forks":896,"open_issues":460,"watchers":13218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2578"},"html":{"href":"https://github.com/neovim/neovim/pull/2578"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/2578"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/2578/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2578/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2578/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/c6d392b99d76f26e05e23a90b4c49d315d166395"}}}}