Closed iserikov closed 9 years ago
If you can make up a test case, I'm ready to fix this.
Hi Shevek,
Run JCPP against the attached test.c on a Linux machine. GCC handles it OK. JCPP does not.
Thank you for integrating the patch as I prefer to stick to the mainline source.
Igor
On Tue, 30 Dec 2014 22:10:27 -0800 Shevek notifications@github.com wrote:
If you can make up a test case, I'm ready to fix this.
Reply to this email directly or view it on GitHub: https://github.com/shevek/jcpp/issues/21#issuecomment-68425622
I think github discarded email attachments in the issue reply, but I'll see if I can construct some.
int main (int argc, char * argv []) { printf ("Hello world!\n"); return 0; }
On Wed, 31 Dec 2014 15:24:27 -0800 Shevek notifications@github.com wrote:
I think github discarded email attachments in the issue reply, but I'll see if I can construct some.
Reply to this email directly or view it on GitHub: https://github.com/shevek/jcpp/issues/21#issuecomment-68474750
I suspect the "correct" answer to this is to throw out jcpp's VFS implementation and use the new java.nio.file code.
Just to confirm, you are on at least Java 1.7?
There's an absolute path patch in #7 too
@ochafik I'm looking at checking whether path is absolute at the top of include(String parent, int line, String name, boolean quoted, boolean next)
as if it's absolute, it doesn't matter whether it's quoted or anglebracketed.
Hi Shevek,
Yes, I am on Java 1.7.
Please do not abandon the VFS interface. I really need it. And, yes, you can place a check for absolute path to the top of your 1st level "include" routine. This should go through VFS as well. You may add something like isAbsolute().
Thanks, Igor
On Wed, 31 Dec 2014 21:42:42 -0800 Shevek notifications@github.com wrote:
I suspect the "correct" answer to this is to throw out jcpp's VFS implementation and use the new java.nio.file code.
Reply to this email directly or view it on GitHub: https://github.com/shevek/jcpp/issues/21#issuecomment-68480823
Will the java.nio.file code (which is a standard VFS interface in the JDK) suffice? Is it possible for you to implement your virtual filesystem using that? Then we can both use things like https://github.com/google/jimfs which is a set of filesystems based on that API.
Hi Shevek,
That would work. The only requirement is that I should be able to set the file system (as a FileSystem object) explicitly, similar to how it is done now. Going through the schema based FS provider guessing, as JVM normally does, would not work for me.
Thanks, Igor
On Wed, 07 Jan 2015 00:06:16 -0800 Shevek notifications@github.com wrote:
Will the java.nio.file code (which is a standard VFS interface in the JDK) suffice? Is it possible for you to implement your virtual filesystem using that? Then we can both use things like https://github.com/google/jimfs which is a set of filesystems based on that API.
Reply to this email directly or view it on GitHub: https://github.com/shevek/jcpp/issues/21#issuecomment-68990090
JCPP cannot handle absolute paths in include directives. They are treated as relative. For example,
include "/home/me/test.h"
will not work. On the other hand
include "/test.h"
will work looking for the file in the current directory.