RFR 9: 8074818: Resolve disabled warnings for libjava (original) (raw)
Roger Riggs Roger.Riggs at Oracle.com
Wed May 27 02:52:07 UTC 2015
- Previous message: RFR 9: 8074818: Resolve disabled warnings for libjava
- Next message: RFR 9: 8074818: Resolve disabled warnings for libjava
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Sadly, but not entirely unexpectedly there is an anomaly in the include files: It seems that Windows does not define O_SYNC and O_DSYNC. To make up for the absence jdk/src/java.base/share/native/libjava/io_util.h conditionally defines them. There is no problem if the system include files appear first, but in the other order, fcntl.h tries to re-define it. In the recommended order, there is no issue.
Roger
On 5/22/15 1:47 PM, Martin Buchholz wrote:
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 "jniutil.h" #include "jlong.h" @@ -32,9 +35,6 @@ #include "javaioFileInputStream.h" -#include <fcntl.h> -#include <limits.h> -
- Previous message: RFR 9: 8074818: Resolve disabled warnings for libjava
- Next message: RFR 9: 8074818: Resolve disabled warnings for libjava
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]