It's a good idea to order include statements by system dependencies, jdk dependencies, implementation helpers, BUT order of include statements should never ever matter. If it does, then we have a bug that should be fixed. Every header file should be independently includable, and C files should only Include What They Use. It would be good for us to test some of that, e.g. can you compile each .h file as its own translation unit?
+#include <fcntl.h> +#include <limits.h> + #include "jni.h" #include "jni_util.h" #include "jlong.h" @@ -32,9 +35,6 @@ #include "java_io_FileInputStream.h" -#include <fcntl.h> -#include <limits.h> -