Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Feb 2005 15:35:35 -0700
From:      Greg Lewis <glewis@eyesbeyond.com>
To:        Brian Clapper <brian-freebsd-007@clapper.org>
Cc:        freebsd-java@freebsd.org
Subject:   Re: Missing <stdint.h> prevents JDK 1.5.0p1 from building
Message-ID:  <20050202223535.GA10370@misty.eyesbeyond.com>
In-Reply-To: <200501262051.j0QKputL045404@condor.inside.clapper.org>
References:  <200501262051.j0QKputL045404@condor.inside.clapper.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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@eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis@FreeBSD.org

--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="4.diff"

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 */
 

--7AUc2qLy4jB3hD7Z--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050202223535.GA10370>