javah generates the i64 suffix on Windows platforms and the LL suffix for
non-Windows platforms, which seems like a deliberate design choice (see
bugs 4239819, 4451616).
Unfortunately, it is at the same time also limiting -- at least to us -- in
that it complicates cross-platform product development. We would therefore
like to propose changes to javah that will enable it to generate code for
any platform, independent of the platform that javah is being executed on;
hence cross-compilation capability basically. The target of the generated
code would be controlled by appropriate command-line options.
Please note that the current C standard (C99) actually specifies LL for
64-bit constants. In trying to develop cross-platform products, one would
think the various Java tools would at least conform to the standard. In
this light it would seem a bit presumptious to use the i64 suffix instead
of the LL suffix as the default for the Windows platform, though perhaps an
exception could/should be made in this case?
--
It came as a surprise to us when we recently discovered that tools.jar and
rt.jar come in multiple flavors. We had assumed that all classes would be
included, regardless of the platform. I don't think this aspect of jar
contents is well documented, and it does have an impact on cross-platform
development, since we cannot guarantee that Java compilations will have the
same class suite available on all platforms.
--
Please provide cross-compilation capability for javah, as well as for any
other relevant code generating Java tools.
non-Windows platforms, which seems like a deliberate design choice (see
bugs 4239819, 4451616).
Unfortunately, it is at the same time also limiting -- at least to us -- in
that it complicates cross-platform product development. We would therefore
like to propose changes to javah that will enable it to generate code for
any platform, independent of the platform that javah is being executed on;
hence cross-compilation capability basically. The target of the generated
code would be controlled by appropriate command-line options.
Please note that the current C standard (C99) actually specifies LL for
64-bit constants. In trying to develop cross-platform products, one would
think the various Java tools would at least conform to the standard. In
this light it would seem a bit presumptious to use the i64 suffix instead
of the LL suffix as the default for the Windows platform, though perhaps an
exception could/should be made in this case?
--
It came as a surprise to us when we recently discovered that tools.jar and
rt.jar come in multiple flavors. We had assumed that all classes would be
included, regardless of the platform. I don't think this aspect of jar
contents is well documented, and it does have an impact on cross-platform
development, since we cannot guarantee that Java compilations will have the
same class suite available on all platforms.
--
Please provide cross-compilation capability for javah, as well as for any
other relevant code generating Java tools.
- relates to
-
JDK-4239819 static final long constants generated in .h files don't compile on Windows.
-
- Resolved
-
-
JDK-4451616 for data type long javah generates extention i64 on windows OS
-
- Closed
-