hurd-fixes
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Fri, 6 May 2011 13:52:41 +0000 (14:52 +0100)
committerAdam C. Powell, IV <hazelsct@debian.org>
Fri, 6 May 2011 13:52:41 +0000 (14:52 +0100)
New patch: debian/patches/hurd-fixes.patch

This patch will gather fixes needed to build on GNU/Hurd.

Remove OSD_Process::CurrentDirectory() method on non-Windows hosts.
This method is unused, and prevents compilation on GNU/Hurd.

The Hurd defines ED as a macro in errno.h, rename ED variables
into EData.

Gbp-Pq: Name hurd-fixes.patch

ros/inc/HLRBRep_Data.hxx
ros/inc/HLRBRep_Data.lxx
ros/inc/OSD_Process.hxx
ros/src/HLRBRep/HLRBRep_Data.cdl
ros/src/HLRBRep/HLRBRep_Data.cxx
ros/src/HLRBRep/HLRBRep_Data.lxx
ros/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx
ros/src/OSD/OSD_Process.cxx

index 123b08a5588dd2378692e692a8760fec05b7f3e4..dff5c96afc928091ea04d3632f300b5ff30af36a 100644 (file)
@@ -172,22 +172,22 @@ public:
 //!          between the current edge and the current face at the <br>
 //!          <p1> and <p2> parameters. <br>
   Standard_EXPORT     void EdgeState(const Standard_Real p1,const Standard_Real p2,TopAbs_State& stbef,TopAbs_State& staf) ;
-  //! Returns the  true if the  Edge <ED> belongs to the <br>
+  //! Returns the  true if the  Edge <EData> belongs to the <br>
 //!          Hiding Face. <br>
-        Standard_Boolean EdgeOfTheHidingFace(const Standard_Integer E,const HLRBRep_EdgeData& ED) const;
+        Standard_Boolean EdgeOfTheHidingFace(const Standard_Integer E,const HLRBRep_EdgeData& EData) const;
   //! Returns the number of  levels of hiding face above <br>
-//!          the   first  point  of   the    edge <ED>.     The <br>
+//!          the   first  point  of   the    edge <EData>.     The <br>
 //!          InterferenceList is  given to  compute far away of <br>
 //!          the Interferences and then come back. <br>
-  Standard_EXPORT     Standard_Integer HidingStartLevel(const Standard_Integer E,const HLRBRep_EdgeData& ED,const HLRAlgo_InterferenceList& IL) ;
-  //! Returns   the  state   of  the   Edge  <ED>  after <br>
+  Standard_EXPORT     Standard_Integer HidingStartLevel(const Standard_Integer E,const HLRBRep_EdgeData& EData,const HLRAlgo_InterferenceList& IL) ;
+  //! Returns   the  state   of  the   Edge  <EData>  after <br>
 //!          classification. <br>
-  Standard_EXPORT     TopAbs_State Compare(const Standard_Integer E,const HLRBRep_EdgeData& ED) ;
+  Standard_EXPORT     TopAbs_State Compare(const Standard_Integer E,const HLRBRep_EdgeData& EData) ;
   //! Simple classification of part of edge  [p1,  p2] <br>
 //!  returns  OUT  if  at  least  1 of  Nbp  points  of  edge  is  out <br>
 //!  othewise  returns  IN <br>
 //!  It  is  used  to  check  "suspision"  hided  part  of  edge. <br>
-  Standard_EXPORT     TopAbs_State SimplClassify(const Standard_Integer E,const HLRBRep_EdgeData& ED,const Standard_Integer Nbp,const Standard_Real p1,const Standard_Real p2) ;
+  Standard_EXPORT     TopAbs_State SimplClassify(const Standard_Integer E,const HLRBRep_EdgeData& EData,const Standard_Integer Nbp,const Standard_Real p1,const Standard_Real p2) ;
   
   Standard_EXPORT     void Destroy() ;
 ~HLRBRep_Data()
@@ -214,7 +214,7 @@ private:
 //!          not Double and not IsoLine. <br>
   Standard_EXPORT     void OrientOthEdge(const Standard_Integer I,HLRBRep_FaceData& FD) ;
   //! Classification of an edge. <br>
-  Standard_EXPORT     TopAbs_State Classify(const Standard_Integer E,const HLRBRep_EdgeData& ED,const Standard_Boolean LevelFlag,Standard_Integer& Level,const Standard_Real param) ;
+  Standard_EXPORT     TopAbs_State Classify(const Standard_Integer E,const HLRBRep_EdgeData& EData,const Standard_Boolean LevelFlag,Standard_Integer& Level,const Standard_Real param) ;
   //! Returns  True  if the  intersection is  rejected. <br>
   Standard_EXPORT     Standard_Boolean RejectedPoint(const IntRes2d_IntersectionPoint& PInter,const TopAbs_Orientation BoundOri,const Standard_Integer NumSeg) ;
   //! returns True  if there is a common  vertex between <br>
index efdd20874ae565323cbe6b200b5c0cd58de89d40..aac7a6c5f4b0075e3d70cb789034034c53db79cd 100644 (file)
@@ -122,6 +122,6 @@ inline HLRAlgo_Interference & HLRBRep_Data::Interference ()
 
 inline Standard_Boolean 
 HLRBRep_Data::EdgeOfTheHidingFace (const Standard_Integer E,
-                                  const HLRBRep_EdgeData& ED) const
-{ return ED.HideCount() == myHideCount-1; }
+                                  const HLRBRep_EdgeData& EData) const
+{ return EData.HideCount() == myHideCount-1; }
 
index d3d0fa17551c74b6050d731bbfa78c1d6aacdaf8..0b3f4b38711d46e1aca48ace6ebda038d5940cc3 100644 (file)
@@ -62,8 +62,10 @@ public:
   Standard_EXPORT     Standard_Boolean IsSuperUser() ;
   //! Returns the 'Process Id' <br>
   Standard_EXPORT     Standard_Integer ProcessId() ;
+#ifdef WNT
   //! Returns the current path where the process is. <br>
   Standard_EXPORT     OSD_Path CurrentDirectory() ;
+#endif
   //! Changes the current process directory. <br>
   Standard_EXPORT     void SetCurrentDirectory(const OSD_Path& where) ;
   //! Returns TRUE if an error occurs <br>
index 9c8f151badaf4c9ff8bf37bdbc6dfcbaf04a64b1..8c42b2bbcbfa6ee6bfa52baa47539e2e29a60c22 100644 (file)
@@ -215,32 +215,32 @@ is
     is static;
     
     EdgeOfTheHidingFace(me; E  : Integer  from Standard;
-                            ED : EdgeData from HLRBRep)
+                            EData : EdgeData from HLRBRep)
     returns Boolean from Standard
-       ---Purpose: Returns the  true if the  Edge <ED> belongs to the
+       ---Purpose: Returns the  true if the  Edge <EData> belongs to the
        --          Hiding Face.
        ---C++: inline
    is static;
 
     HidingStartLevel(me : mutable; E  : Integer          from Standard;
-                                   ED : EdgeData         from HLRBRep;
+                                   EData : EdgeData         from HLRBRep;
                                    IL : InterferenceList from HLRAlgo)
     returns Integer from Standard
        ---Purpose: Returns the number of  levels of hiding face above
-       --          the   first  point  of   the    edge <ED>.     The
+       --          the   first  point  of   the    edge <EData>.     The
        --          InterferenceList is  given to  compute far away of
        --          the Interferences and then come back.
     is static;
 
     Compare(me : mutable; E  : Integer  from Standard;
-                          ED : EdgeData from HLRBRep)
+                          EData : EdgeData from HLRBRep)
     returns State from TopAbs
-       ---Purpose: Returns   the  state   of  the   Edge  <ED>  after
+       ---Purpose: Returns   the  state   of  the   Edge  <EData>  after
        --          classification.
     is static;
 
     SimplClassify(me : mutable; E         :     Integer  from Standard;
-                               ED        :     EdgeData from HLRBRep;
+                               EData     :     EdgeData from HLRBRep;
                                Nbp       :     Integer  from Standard;
                                p1,  p2   :     Real     from Standard)
     returns State from TopAbs; 
@@ -266,7 +266,7 @@ is
     is static private;
 
     Classify(me : mutable; E         :     Integer  from Standard;
-                           ED        :     EdgeData from HLRBRep;
+                           EData     :     EdgeData from HLRBRep;
                            LevelFlag :     Boolean  from Standard;
                            Level     : out Integer  from Standard;
                            param     :     Real     from Standard)
index d59aee3d75b9c13b08dd146b0966785ed0d23732..b906fafcf52b1ba3858ce8af7990dc58080c2531 100644 (file)
@@ -1544,12 +1544,12 @@ void HLRBRep_Data::EdgeState (const Standard_Real p1,
 
 Standard_Integer 
 HLRBRep_Data::HidingStartLevel (const Standard_Integer E,
-                               const HLRBRep_EdgeData& ED,
+                               const HLRBRep_EdgeData& EData,
                                const HLRAlgo_InterferenceList& IL)
 {
   Standard_Boolean Loop;
   HLRAlgo_ListIteratorOfInterferenceList It;
-  const HLRBRep_Curve& EC = ED.Geometry();
+  const HLRBRep_Curve& EC = EData.Geometry();
   Standard_Real sta = EC.Parameter3d(EC.FirstParameter());
   Standard_Real end = EC.Parameter3d(EC.LastParameter());
   Standard_Real tolpar = (end - sta) * 0.01;
@@ -1578,7 +1578,7 @@ HLRBRep_Data::HidingStartLevel (const Standard_Integer E,
 #ifdef DEB
   TopAbs_State st = 
 #endif
-    Classify(E,ED,Standard_True,level,param);
+    Classify(E,EData,Standard_True,level,param);
   Loop = Standard_True;
   It.Initialize(IL);
 
@@ -1619,11 +1619,11 @@ HLRBRep_Data::HidingStartLevel (const Standard_Integer E,
 //=======================================================================
 
 TopAbs_State HLRBRep_Data::Compare (const Standard_Integer E,
-                                   const HLRBRep_EdgeData& ED)
+                                   const HLRBRep_EdgeData& EData)
 {
   Standard_Integer level;
   Standard_Real parbid = 0;
-  return Classify(E,ED,Standard_False,level,parbid);
+  return Classify(E,EData,Standard_False,level,parbid);
 }
 
 //=======================================================================
@@ -1832,7 +1832,7 @@ void HLRBRep_Data::OrientOthEdge (const Standard_Integer I,
 
 TopAbs_State 
 HLRBRep_Data::Classify (const Standard_Integer E,
-                       const HLRBRep_EdgeData& ED,
+                       const HLRBRep_EdgeData& EData,
                        const Standard_Boolean LevelFlag,
                        Standard_Integer& Level,
                        const Standard_Real param)
@@ -1845,9 +1845,9 @@ HLRBRep_Data::Classify (const Standard_Integer E,
   Level = 0;
   TopAbs_State state = TopAbs_OUT;
 //  Standard_Boolean rej = Standard_False;
-  const HLRBRep_Curve& EC = ED.Geometry();
+  const HLRBRep_Curve& EC = EData.Geometry();
   Standard_Real sta,xsta,ysta,zsta,end,xend,yend,zend;
-  Standard_Real tol = (Standard_Real)(ED.Tolerance());
+  Standard_Real tol = (Standard_Real)(EData.Tolerance());
   
   if (LevelFlag) {
     sta = param;
@@ -2134,7 +2134,7 @@ HLRBRep_Data::Classify (const Standard_Integer E,
 //=======================================================================
 
 TopAbs_State HLRBRep_Data::SimplClassify (const Standard_Integer E,
-                                         const HLRBRep_EdgeData& ED,
+                                         const HLRBRep_EdgeData& EData,
                                          const Standard_Integer Nbp,
                                          const Standard_Real p1,
                                          const Standard_Real p2)
@@ -2146,9 +2146,9 @@ TopAbs_State HLRBRep_Data::SimplClassify (const Standard_Integer E,
   Standard_Integer i;
   TopAbs_State state = TopAbs_IN;
 //  Standard_Boolean rej = Standard_False;
-  const HLRBRep_Curve& EC = ED.Geometry();
+  const HLRBRep_Curve& EC = EData.Geometry();
   Standard_Real sta,xsta,ysta,zsta, dp;
-  Standard_Real tol = (Standard_Real)(ED.Tolerance());
+  Standard_Real tol = (Standard_Real)(EData.Tolerance());
 
   dp = (p2 - p1)/(Nbp+1);
 
index efdd20874ae565323cbe6b200b5c0cd58de89d40..aac7a6c5f4b0075e3d70cb789034034c53db79cd 100644 (file)
@@ -122,6 +122,6 @@ inline HLRAlgo_Interference & HLRBRep_Data::Interference ()
 
 inline Standard_Boolean 
 HLRBRep_Data::EdgeOfTheHidingFace (const Standard_Integer E,
-                                  const HLRBRep_EdgeData& ED) const
-{ return ED.HideCount() == myHideCount-1; }
+                                  const HLRBRep_EdgeData& EData) const
+{ return EData.HideCount() == myHideCount-1; }
 
index 2d3cd9d43cdc82503eae7d255bf97996cc22575b..1f3369413ee67c105c8a07bc149ae094be95730d 100644 (file)
@@ -26,8 +26,8 @@ void HLRBRep_EdgeInterferenceTool::LoadEdge()
 {
   Standard_Real p1,p2;
   Standard_ShortReal t1,t2;
-  HLRBRep_Array1OfEData& ED = myDS->EDataArray();
-  HLRBRep_EdgeData& ed = ED(myDS->Edge());
+  HLRBRep_Array1OfEData& EData = myDS->EDataArray();
+  HLRBRep_EdgeData& ed = EData(myDS->Edge());
   ed.Status().Bounds(p1,t1,p2,t2);
   inter[0].Parameter(p1);
   inter[0].Tolerance(t1);
index 8b01231c4a9f8b50137277f0d17b7a83744127b9..fe7a0551dea8f61c8a382631a2815057d1f47d24 100644 (file)
@@ -112,45 +112,6 @@ Standard_Boolean OSD_Process::IsSuperUser (){
 }
 
 
-OSD_Path OSD_Process::CurrentDirectory(){
-char cwd[MAXPATHLEN+1] ;
-OSD_Path result;
-TCollection_AsciiString Name;
-
- if (!getcwd(cwd,MAXPATHLEN+1))
-   myError.SetValue (errno, Iam, "Where");
- else {
-   Name = cwd;
-
-//   JPT : August,20 1993. This code has been replaced by #ifdef ... #endif
-//   position = Name.SearchFromEnd(".");
-//   if (position != -1){
-//     Ext = Name;
-//     Ext.Remove(1,position);
-//     Name.Remove( position,Ext.Length()+1);
-//   }
-//   result.SetValues("","","","","",Name,Ext);
-//   End
-
-#if defined(vax) || defined(__vms)
-   Standard_Integer iDisk = Name.Search(":");
-   if (iDisk){
-     TCollection_AsciiString Disk;
-     TCollection_AsciiString Directory;
-     Disk = Name.SubString(1,iDisk-1);
-     Directory = Name.SubString(iDisk+1,Name.Length());
-     result.SetValues("","","",Disk,Directory,"","");
-   }
-#else
-   Name += TCollection_AsciiString("/");
-   result = OSD_Path(Name);
-   //      result.SetValues("","","","",Name,"","");
-#endif
-
- }
-return (result);
-}
-
 
 void OSD_Process::SetCurrentDirectory(const OSD_Path& where){
 TCollection_AsciiString Name;