From: Debian Science Maintainers Date: Fri, 6 May 2011 13:52:41 +0000 (+0100) Subject: hurd-fixes X-Git-Tag: archive/raspbian/7.3.0+dfsg1-4+rpi1~1^2^2~20 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2d0c270fa86071bb80ea266a0ec6884232b66b23;p=opencascade.git hurd-fixes 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 --- diff --git a/ros/inc/HLRBRep_Data.hxx b/ros/inc/HLRBRep_Data.hxx index 123b08a55..dff5c96af 100644 --- a/ros/inc/HLRBRep_Data.hxx +++ b/ros/inc/HLRBRep_Data.hxx @@ -172,22 +172,22 @@ public: //! between the current edge and the current face at the
//! and parameters.
Standard_EXPORT void EdgeState(const Standard_Real p1,const Standard_Real p2,TopAbs_State& stbef,TopAbs_State& staf) ; - //! Returns the true if the Edge belongs to the
+ //! Returns the true if the Edge belongs to the
//! Hiding Face.
- 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
-//! the first point of the edge . The
+//! the first point of the edge . The
//! InterferenceList is given to compute far away of
//! the Interferences and then come back.
- Standard_EXPORT Standard_Integer HidingStartLevel(const Standard_Integer E,const HLRBRep_EdgeData& ED,const HLRAlgo_InterferenceList& IL) ; - //! Returns the state of the Edge after
+ Standard_EXPORT Standard_Integer HidingStartLevel(const Standard_Integer E,const HLRBRep_EdgeData& EData,const HLRAlgo_InterferenceList& IL) ; + //! Returns the state of the Edge after
//! classification.
- 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]
//! returns OUT if at least 1 of Nbp points of edge is out
//! othewise returns IN
//! It is used to check "suspision" hided part of edge.
- 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.
Standard_EXPORT void OrientOthEdge(const Standard_Integer I,HLRBRep_FaceData& FD) ; //! Classification of an edge.
- 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.
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
diff --git a/ros/inc/HLRBRep_Data.lxx b/ros/inc/HLRBRep_Data.lxx index efdd20874..aac7a6c5f 100644 --- a/ros/inc/HLRBRep_Data.lxx +++ b/ros/inc/HLRBRep_Data.lxx @@ -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; } diff --git a/ros/inc/OSD_Process.hxx b/ros/inc/OSD_Process.hxx index d3d0fa175..0b3f4b387 100644 --- a/ros/inc/OSD_Process.hxx +++ b/ros/inc/OSD_Process.hxx @@ -62,8 +62,10 @@ public: Standard_EXPORT Standard_Boolean IsSuperUser() ; //! Returns the 'Process Id'
Standard_EXPORT Standard_Integer ProcessId() ; +#ifdef WNT //! Returns the current path where the process is.
Standard_EXPORT OSD_Path CurrentDirectory() ; +#endif //! Changes the current process directory.
Standard_EXPORT void SetCurrentDirectory(const OSD_Path& where) ; //! Returns TRUE if an error occurs
diff --git a/ros/src/HLRBRep/HLRBRep_Data.cdl b/ros/src/HLRBRep/HLRBRep_Data.cdl index 9c8f151ba..8c42b2bbc 100644 --- a/ros/src/HLRBRep/HLRBRep_Data.cdl +++ b/ros/src/HLRBRep/HLRBRep_Data.cdl @@ -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 belongs to the + ---Purpose: Returns the true if the Edge 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 . The + -- the first point of the edge . 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 after + ---Purpose: Returns the state of the Edge 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) diff --git a/ros/src/HLRBRep/HLRBRep_Data.cxx b/ros/src/HLRBRep/HLRBRep_Data.cxx index d59aee3d7..b906fafcf 100644 --- a/ros/src/HLRBRep/HLRBRep_Data.cxx +++ b/ros/src/HLRBRep/HLRBRep_Data.cxx @@ -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); diff --git a/ros/src/HLRBRep/HLRBRep_Data.lxx b/ros/src/HLRBRep/HLRBRep_Data.lxx index efdd20874..aac7a6c5f 100644 --- a/ros/src/HLRBRep/HLRBRep_Data.lxx +++ b/ros/src/HLRBRep/HLRBRep_Data.lxx @@ -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; } diff --git a/ros/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx b/ros/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx index 2d3cd9d43..1f3369413 100644 --- a/ros/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx +++ b/ros/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx @@ -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); diff --git a/ros/src/OSD/OSD_Process.cxx b/ros/src/OSD/OSD_Process.cxx index 8b01231c4..fe7a0551d 100644 --- a/ros/src/OSD/OSD_Process.cxx +++ b/ros/src/OSD/OSD_Process.cxx @@ -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;