{"action":"created","issue":{"url":"https://api.github.com/repos/davidgiven/ack/issues/58","repository_url":"https://api.github.com/repos/davidgiven/ack","labels_url":"https://api.github.com/repos/davidgiven/ack/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/davidgiven/ack/issues/58/comments","events_url":"https://api.github.com/repos/davidgiven/ack/issues/58/events","html_url":"https://github.com/davidgiven/ack/issues/58","id":246475334,"number":58,"title":"Does not build on case insensitive filesystems","user":{"login":"davidgiven","id":100638,"avatar_url":"https://avatars0.githubusercontent.com/u/100638?v=4","gravatar_id":"","url":"https://api.github.com/users/davidgiven","html_url":"https://github.com/davidgiven","followers_url":"https://api.github.com/users/davidgiven/followers","following_url":"https://api.github.com/users/davidgiven/following{/other_user}","gists_url":"https://api.github.com/users/davidgiven/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgiven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgiven/subscriptions","organizations_url":"https://api.github.com/users/davidgiven/orgs","repos_url":"https://api.github.com/users/davidgiven/repos","events_url":"https://api.github.com/users/davidgiven/events{/privacy}","received_events_url":"https://api.github.com/users/davidgiven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-28T22:41:45Z","updated_at":"2017-08-01T04:51:43Z","closed_at":null,"body":"...such as Windows through Cygwin.\r\n\r\nThere are problems where files like scope.C are preprocessed and scope.c produced. Sample log attached.\r\n\r\n[ack-log-Cygwin-20170723.txt](https://github.com/davidgiven/ack/files/1184422/ack-log-Cygwin-20170723.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/davidgiven/ack/issues/comments/319267116","html_url":"https://github.com/davidgiven/ack/issues/58#issuecomment-319267116","issue_url":"https://api.github.com/repos/davidgiven/ack/issues/58","id":319267116,"user":{"login":"trijezdci","id":21986722,"avatar_url":"https://avatars3.githubusercontent.com/u/21986722?v=4","gravatar_id":"","url":"https://api.github.com/users/trijezdci","html_url":"https://github.com/trijezdci","followers_url":"https://api.github.com/users/trijezdci/followers","following_url":"https://api.github.com/users/trijezdci/following{/other_user}","gists_url":"https://api.github.com/users/trijezdci/gists{/gist_id}","starred_url":"https://api.github.com/users/trijezdci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trijezdci/subscriptions","organizations_url":"https://api.github.com/users/trijezdci/orgs","repos_url":"https://api.github.com/users/trijezdci/repos","events_url":"https://api.github.com/users/trijezdci/events{/privacy}","received_events_url":"https://api.github.com/users/trijezdci/received_events","type":"User","site_admin":false},"created_at":"2017-08-01T04:51:43Z","updated_at":"2017-08-01T04:51:43Z","body":"Ideally compilers/preprocessors should never overwrite any existing file.\r\n\r\nIn our Modula-2 preprocessor, if the parameters are such that an existing file is to be replaced by the preprocessor, I rename the file to be replaced to a backup name, for example, Foobar.mod would be renamed to Foobar.mod.BAK, and if there is already such a file, then Foobar.mod.BAK;1, again if there is already such a file, then Foobar.mod.BAK;2 etc etc. There is also a means to set the upper limit for the version number. If the limit is reached the preprocessor emits an error to the user who will need to purge the backup files then.\r\n\r\nhttps://github.com/m2sf/m2pp/blob/master/src/FNStr.def#L40\r\n\r\nThis way, the preprocessor never needs to delete nor overwrite any files.\r\n\r\nUsing this strategy, an input file scope.C would be renamed to scope.C.BAK and the preprocessor would create a new file scope.c which would not cause a problem in a case insensitive file system.\r\n\r\nThe code is in Modula-2, but could be easily transcribed to C. The license is LGPL2.1. Feel free to use it if you like.\r\n\r\nYou may also find the filename translation layer of our Modula-2 compiler of interest. In Modula-2 filenames should match the module identifiers for a compiler to find the module's definition and implementation files. However, this can be problematic on case insensitive file systems and even more so on older platforms where filenames are severely restricted in length such as MS-DOS and the PDP's RT-11/RSX-11 operating systems.\r\n\r\nIn each directory where the compiler looks for sources, it checks if there is a plain text file of a hardcoded short filename that contains key/value pairs of filename translations.\r\n\r\nIf such a translation file is found, it reads the file and translates filename accordingly before trying to read source files and it uses the same translated basename for output files such as symbol and object files.\r\n\r\nhttps://github.com/m2sf/m2bsk/blob/master/src/FilenameXlat.def#L9\r\n\r\nThis way one could move projects with long filenames to file systems with length restricted filenames and still compile them without modifying the sources to adjust for the shorter filenames.\r\n\r\nThis might be a worthwhile addition to ACK since it supports a number of older platforms that had length restricted filenames. Note I have not yet done the implementation of this module, it is on my to do list for this month though.\r\n\r\nI will also backport both facilities to M2C, which is written in C, so eventually I will have C transcriptions of those libraries."}}
{"actor":{"display_login":"trijezdci"}}