{"action":"created","comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/25449569","id":25449569,"diff_hunk":"@@ -204,3 +203,58 @@ qioerr chpl_fs_remove(const char* name) {\n     err = qio_mkerror_errno();\n   return err;\n }\n+\n+qioerr chpl_fs_samefile(int* ret, qio_file_t* file1, qio_file_t* file2) {\n+  qioerr err = 0;\n+  struct stat f1;\n+  struct stat f2;\n+\n+  int exitStatus = fstat(file1->fd, &f1);\n+  if (exitStatus) {\n+    // An error occurred.  Return it.\n+    err = qio_mkerror_errno();\n+    return err;\n+  }\n+  exitStatus = fstat(file2->fd, &f2);\n+  if (exitStatus) {\n+    // An error occurred.  Return it.\n+    err = qio_mkerror_errno();\n+  } else {\n+    if (f1.st_dev == f2.st_dev && f1.st_ino == f2.st_ino) {","path":"runtime/src/chpl-file-utils.c","position":29,"original_position":29,"commit_id":"1083522c138faaefb2672c86aaf3820e53d4f8c0","original_commit_id":"1083522c138faaefb2672c86aaf3820e53d4f8c0","user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"body":"Yes, but device number and i-node seem too nitty-gritty as compared to our current file implementation.  I believe we'd have to bleed more of qio_file_ptr_t into Chapel, which is an internal concept that mostly gets mucked with in the runtime code.","created_at":"2015-02-26T18:11:37Z","updated_at":"2015-02-26T18:11:37Z","html_url":"https://github.com/chapel-lang/chapel/pull/1393#discussion_r25449569","pull_request_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393","_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/25449569"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/1393#discussion_r25449569"},"pull_request":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393"}}},"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393","id":30099550,"html_url":"https://github.com/chapel-lang/chapel/pull/1393","diff_url":"https://github.com/chapel-lang/chapel/pull/1393.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/1393.patch","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1393","number":1393,"state":"open","locked":false,"title":"Implement sameFile for both file records and strings.","user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"body":"I have tested that this feature works to my satisfaction, but in the interest of\r\ntime and maximizing the number of file functions that are in the coming release,\r\nI will add the tests after the release.","created_at":"2015-02-26T17:46:37Z","updated_at":"2015-02-26T18:11:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a574b7471058d67a2e49053775a1890c41cb8ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393/commits","review_comments_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393/comments","review_comment_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1393/comments","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/1083522c138faaefb2672c86aaf3820e53d4f8c0","head":{"label":"lydia-duncan:sameFile","ref":"sameFile","sha":"1083522c138faaefb2672c86aaf3820e53d4f8c0","user":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"repo":{"id":21914939,"name":"chapel","full_name":"lydia-duncan/chapel","owner":{"login":"lydia-duncan","id":2454710,"avatar_url":"https://avatars.githubusercontent.com/u/2454710?v=3","gravatar_id":"","url":"https://api.github.com/users/lydia-duncan","html_url":"https://github.com/lydia-duncan","followers_url":"https://api.github.com/users/lydia-duncan/followers","following_url":"https://api.github.com/users/lydia-duncan/following{/other_user}","gists_url":"https://api.github.com/users/lydia-duncan/gists{/gist_id}","starred_url":"https://api.github.com/users/lydia-duncan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydia-duncan/subscriptions","organizations_url":"https://api.github.com/users/lydia-duncan/orgs","repos_url":"https://api.github.com/users/lydia-duncan/repos","events_url":"https://api.github.com/users/lydia-duncan/events{/privacy}","received_events_url":"https://api.github.com/users/lydia-duncan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lydia-duncan/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/lydia-duncan/chapel","forks_url":"https://api.github.com/repos/lydia-duncan/chapel/forks","keys_url":"https://api.github.com/repos/lydia-duncan/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lydia-duncan/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lydia-duncan/chapel/teams","hooks_url":"https://api.github.com/repos/lydia-duncan/chapel/hooks","issue_events_url":"https://api.github.com/repos/lydia-duncan/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/lydia-duncan/chapel/events","assignees_url":"https://api.github.com/repos/lydia-duncan/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/lydia-duncan/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/lydia-duncan/chapel/tags","blobs_url":"https://api.github.com/repos/lydia-duncan/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lydia-duncan/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lydia-duncan/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/lydia-duncan/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lydia-duncan/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/lydia-duncan/chapel/languages","stargazers_url":"https://api.github.com/repos/lydia-duncan/chapel/stargazers","contributors_url":"https://api.github.com/repos/lydia-duncan/chapel/contributors","subscribers_url":"https://api.github.com/repos/lydia-duncan/chapel/subscribers","subscription_url":"https://api.github.com/repos/lydia-duncan/chapel/subscription","commits_url":"https://api.github.com/repos/lydia-duncan/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/lydia-duncan/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/lydia-duncan/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/lydia-duncan/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/lydia-duncan/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/lydia-duncan/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lydia-duncan/chapel/merges","archive_url":"https://api.github.com/repos/lydia-duncan/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lydia-duncan/chapel/downloads","issues_url":"https://api.github.com/repos/lydia-duncan/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/lydia-duncan/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/lydia-duncan/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/lydia-duncan/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lydia-duncan/chapel/labels{/name}","releases_url":"https://api.github.com/repos/lydia-duncan/chapel/releases{/id}","created_at":"2014-07-16T19:55:13Z","updated_at":"2015-02-26T17:51:36Z","pushed_at":"2015-02-26T17:51:36Z","git_url":"git://github.com/lydia-duncan/chapel.git","ssh_url":"git@github.com:lydia-duncan/chapel.git","clone_url":"https://github.com/lydia-duncan/chapel.git","svn_url":"https://github.com/lydia-duncan/chapel","homepage":"http://chapel.cray.com/","size":251382,"stargazers_count":1,"watchers_count":1,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"chapel-lang:master","ref":"master","sha":"e9a18221a2458d88f6acdbcfa0a9bb9a5148faed","user":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=3","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":21663285,"name":"chapel","full_name":"chapel-lang/chapel","owner":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=3","gravatar_id":"","url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chapel-lang/chapel","description":"a Productive Parallel Programming Language","fork":false,"url":"https://api.github.com/repos/chapel-lang/chapel","forks_url":"https://api.github.com/repos/chapel-lang/chapel/forks","keys_url":"https://api.github.com/repos/chapel-lang/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chapel-lang/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chapel-lang/chapel/teams","hooks_url":"https://api.github.com/repos/chapel-lang/chapel/hooks","issue_events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/chapel-lang/chapel/events","assignees_url":"https://api.github.com/repos/chapel-lang/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/chapel-lang/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/chapel-lang/chapel/tags","blobs_url":"https://api.github.com/repos/chapel-lang/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chapel-lang/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chapel-lang/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/chapel-lang/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/chapel-lang/chapel/languages","stargazers_url":"https://api.github.com/repos/chapel-lang/chapel/stargazers","contributors_url":"https://api.github.com/repos/chapel-lang/chapel/contributors","subscribers_url":"https://api.github.com/repos/chapel-lang/chapel/subscribers","subscription_url":"https://api.github.com/repos/chapel-lang/chapel/subscription","commits_url":"https://api.github.com/repos/chapel-lang/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/chapel-lang/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments{/number}","contents_url":"https://api.github.com/repos/chapel-lang/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/chapel-lang/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chapel-lang/chapel/merges","archive_url":"https://api.github.com/repos/chapel-lang/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chapel-lang/chapel/downloads","issues_url":"https://api.github.com/repos/chapel-lang/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/chapel-lang/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/chapel-lang/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/chapel-lang/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chapel-lang/chapel/labels{/name}","releases_url":"https://api.github.com/repos/chapel-lang/chapel/releases{/id}","created_at":"2014-07-09T18:15:54Z","updated_at":"2015-02-26T16:19:53Z","pushed_at":"2015-02-26T16:19:52Z","git_url":"git://github.com/chapel-lang/chapel.git","ssh_url":"git@github.com:chapel-lang/chapel.git","clone_url":"https://github.com/chapel-lang/chapel.git","svn_url":"https://github.com/chapel-lang/chapel","homepage":"http://chapel.cray.com/","size":334435,"stargazers_count":69,"watchers_count":69,"language":"Chapel","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":11,"forks":37,"open_issues":11,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/1393"},"issue":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/1393"},"comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/1393/comments"},"review_comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393/comments"},"review_comment":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/1393/commits"},"statuses":{"href":"https://api.github.com/repos/chapel-lang/chapel/statuses/1083522c138faaefb2672c86aaf3820e53d4f8c0"}}}}