Missing <stdint.h> prevents JDK 1.5.0p1 from building

Greg Lewis glewis at eyesbeyond.com
Wed Feb 2 14:35:51 PST 2005


On Wed, Jan 26, 2005 at 03:51:57PM -0500, Brian Clapper wrote:
> Thought this might be worth mentioning: I'm attempting to build the 1.5.0
> port on 4.10-RELEASE. The build routinely fails during compilation. The
> first file affected is
> "[...]/work/jdk15/j2se/src/share/native/sun/awt/medialib/mlib_ImageAffline.c",
> but other files also fail to compile.
> 
> The reason: Those source files indirectly attempt to include <stdint.h>,
> but 4.10-RELEASE doesn't have that file.
> 
> To get around this problem, I either have to modify the patchset or install
> a stub version of <stdint.h>. I elected to use a stub <stdint.h>, which
> looks like this:
> 
> ----------
> #ifndef _STDINT_H
> #define _STDINT_H       1
> 
> #include <sys/types.h>
> #include <wchar.h>
> 
> #endif /* stdint.h */
> ----------
> 
> With that file installed in /usr/include, the build completes fine.
> 
> I did not have this problem when using the experimental patchset that came
> out just prior to patchset 1. Diff'ing the two patchsets, it looks as
> though the dependence on <stdint.h> was introduced in patchset 1.

Thanks.  I fixed this in the repo and it will be in patchset 2.  See the
attached patch in the mean time (you probably need to change the paths
to the files to use it with the jdk15 port).

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org
-------------- next part --------------
Index: j2se/src/share/native/sun/awt/medialib/mlib_types.h
===================================================================
RCS file: /var/jcvs/javasrc_1_5_scsl/j2se/src/share/native/sun/awt/medialib/mlib_types.h,v
retrieving revision 1.3
diff -u -r1.3 mlib_types.h
--- j2se/src/share/native/sun/awt/medialib/mlib_types.h	19 Jan 2005 10:40:55 -0000	1.3
+++ j2se/src/share/native/sun/awt/medialib/mlib_types.h	2 Feb 2005 20:31:24 -0000
@@ -47,7 +47,11 @@
 
 #if defined(_ALLBSD_SOURCE)
 #include <stddef.h>                     /* for ptrdiff_t */
+#if defined(__FreeBSD__) && __FreeBSD__ < 5
+#include <inttypes.h>                   /* for uintptr_t */
+#else
 #include <stdint.h>                     /* for uintptr_t */
+#endif
 #elif defined(__linux__)
 #include <stdint.h>                     /* for uintptr_t */
 #include <malloc.h>                     /* for ptrdiff_t */
Index: j2se/src/solaris/native/common/gdefs_md.h
===================================================================
RCS file: /var/jcvs/javasrc_1_5_scsl/j2se/src/solaris/native/common/gdefs_md.h,v
retrieving revision 1.2
diff -u -r1.2 gdefs_md.h
--- j2se/src/solaris/native/common/gdefs_md.h	14 Jan 2005 20:10:02 -0000	1.2
+++ j2se/src/solaris/native/common/gdefs_md.h	2 Feb 2005 20:40:40 -0000
@@ -18,6 +18,8 @@
 #include <stdint.h>
 #include <malloc.h>
 #endif /* __linux__ */
-#ifdef _ALLBSD_SOURCE
+#if defined(__FreeBSD__) && __FreeBSD__ < 5
+#include <inttypes.h>
+#elif _ALLBSD_SOURCE
 #include <stdint.h>
 #endif /* _ALLBSD_SOURCE */
Index: j2se/src/solaris/native/sun/java2d/j2d_md.h
===================================================================
RCS file: /var/jcvs/javasrc_1_5_scsl/j2se/src/solaris/native/sun/java2d/j2d_md.h,v
retrieving revision 1.2
diff -u -r1.2 j2d_md.h
--- j2se/src/solaris/native/sun/java2d/j2d_md.h	14 Jan 2005 20:10:45 -0000	1.2
+++ j2se/src/solaris/native/sun/java2d/j2d_md.h	2 Feb 2005 20:44:59 -0000
@@ -13,7 +13,9 @@
  * Linux version of <sys/types.h> does not define intptr_t
  * NetBSD's doesn't either, so let's do it for everyone.
  */
-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+#if defined(__FreeBSD__) && __FreeBSD__ < 5
+#include <inttypes.h>
+#elif defined(__linux__) || defined(_ALLBSD_SOURCE)
 #include <stdint.h>
 #endif /* __linux__ || _ALLBSD_SOURCE */
 


More information about the freebsd-java mailing list