<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I was trying 
to build VTK 4.2.2 on HP UX 11.0 with Java bindings. The build failed at the 
following code fragment in vtkJavaUtil.cxx</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=117171304-25052004>#define VTK_GET_MUTEX()&nbsp; 
vtk_get_mutex()<BR>#define VTK_RELEASE_MUTEX() vtk_release_mutex()<BR>#elif 
defined(__FreeBSD__) || defined(__linux__) || defined(sgi) || 
defined(__APPLE_CC__)<BR>#include &lt;pthread.h&gt;<BR>pthread_mutex_t 
vtkGlobalMutex;<BR>static void vtk_get_mutex() {<BR>&nbsp;&nbsp;&nbsp; static 
int inited = 0;<BR>&nbsp;&nbsp;&nbsp; if 
(!inited)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
inited = 1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pthread_mutex_init ( 
&amp;vtkGlobalMutex, NULL );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp; pthread_mutex_lock(&amp;vtkGlobalMutex);<BR>}<BR>// 
#define VTK_GET_MUTEX()&nbsp; pthread_mutex_lock(&amp;vtkGlobalMutex)<BR>#define 
VTK_GET_MUTEX()&nbsp; vtk_get_mutex()<BR>#define VTK_RELEASE_MUTEX() 
pthread_mutex_unlock(&amp;vtkGlobalMutex)<BR>#else<BR>// for solaris<BR>#include 
&lt;thread.h&gt;<BR>#include &lt;synch.h&gt;<BR>mutex_t 
vtkGlobalMutex;<BR>#define VTK_GET_MUTEX()&nbsp; 
mutex_lock(&amp;vtkGlobalMutex)<BR>#define VTK_RELEASE_MUTEX() 
mutex_unlock(&amp;vtkGlobalMutex)<BR>#endif</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=117171304-25052004>#endif</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=117171304-25052004>Now, when changed 
the code as follows it compiled OK</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=117171304-25052004>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=117171304-25052004>#define VTK_GET_MUTEX()&nbsp; 
vtk_get_mutex()<BR>#define VTK_RELEASE_MUTEX() vtk_release_mutex()<BR><FONT 
color=#008080>//#elif defined(__FreeBSD__) || defined(__linux__) || defined(sgi) 
|| defined(__APPLE_CC__)</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=117171304-25052004>#else<BR>#include &lt;pthread.h&gt;<BR>pthread_mutex_t 
vtkGlobalMutex;<BR>static void vtk_get_mutex() {<BR>&nbsp;&nbsp;&nbsp; static 
int inited = 0;<BR>&nbsp;&nbsp;&nbsp; if 
(!inited)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
inited = 1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pthread_mutex_init ( 
&amp;vtkGlobalMutex, NULL );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp; pthread_mutex_lock(&amp;vtkGlobalMutex);<BR>}<BR>// 
#define VTK_GET_MUTEX()&nbsp; pthread_mutex_lock(&amp;vtkGlobalMutex)<BR>#define 
VTK_GET_MUTEX()&nbsp; vtk_get_mutex()<BR>#define VTK_RELEASE_MUTEX() 
pthread_mutex_unlock(&amp;vtkGlobalMutex)<BR><FONT 
color=#008080>/*</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#008080 size=2><SPAN 
class=117171304-25052004>#else<BR>// for solaris<BR>#include 
&lt;thread.h&gt;<BR>#include &lt;synch.h&gt;<BR>mutex_t 
vtkGlobalMutex;<BR>#define VTK_GET_MUTEX()&nbsp; 
mutex_lock(&amp;vtkGlobalMutex)<BR>#define VTK_RELEASE_MUTEX() 
mutex_unlock(&amp;vtkGlobalMutex)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=117171304-25052004><FONT 
color=#008080>*/<BR></FONT>#endif</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=117171304-25052004>#endif</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=117171304-25052004>Is my approach 
right. If yes, can somebody make the changes (to identify HP UX as well along 
with linux and others) and commit to the CVS. By the way, how is HP-UX OS is 
defined?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=117171304-25052004>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=117171304-25052004></SPAN></FONT><FONT 
face=Arial size=2><SPAN class=117171304-25052004>Shyam</SPAN></FONT></DIV></DIV>
<DIV><BR></DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV align=left><FONT color=#333399 size=3>
<P><U>Disclaimer: </U></P>
<P><U>This electronic message and all attachments contain information from 
QuEST, which may be confidential or otherwise protected from disclosure. The 
information is intended for the addressee only. If you are not the addressee, 
any disclosure, copy, distribution or use of the contents of this message is 
prohibited. If you have received this electronic message in error, please notify 
the sender immediately and destroy the message.</U></P></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>