Synchronize with trunk's revision r57629.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 28 Oct 2012 10:05:08 +0000 (10:05 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 28 Oct 2012 10:05:08 +0000 (10:05 +0000)
svn path=/branches/ros-csrss/; revision=57630

228 files changed:
boot/freeldr/freeldr/CMakeLists.txt
configure.sh
dll/3rdparty/libjpeg/CMakeLists.txt
dll/3rdparty/libpng/CMakeLists.txt
dll/3rdparty/libtiff/CMakeLists.txt
dll/3rdparty/libxslt/CMakeLists.txt
dll/opengl/CMakeLists.txt
dll/opengl/glu32/.gitignore [new file with mode: 0644]
dll/opengl/glu32/CMakeLists.txt [new file with mode: 0644]
dll/opengl/glu32/glu32.spec [moved from dll/opengl/mesa/src/glu/sgi/glu32.spec with 100% similarity]
dll/opengl/glu32/include/GL/glu.h [new file with mode: 0644]
dll/opengl/glu32/include/GL/glu_mangle.h [new file with mode: 0644]
dll/opengl/glu32/src/include/gluos.h [moved from dll/opengl/mesa/src/glu/sgi/include/gluos.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/bezierEval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/bezierEval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/bezierEval.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/bezierEval.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/bezierPatch.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/bezierPatch.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/bezierPatch.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/bezierPatch.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/bezierPatchMesh.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/bezierPatchMesh.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glcurveval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glcurveval.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glcurveval.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glimports.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glimports.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glinterface.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glinterface.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glrenderer.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glrenderer.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glrenderer.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glrenderer.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glsurfeval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glsurfeval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/glsurfeval.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/glsurfeval.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/incurveeval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/incurveeval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/insurfeval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/mystdio.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/mystdio.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/interface/mystdlib.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/interface/mystdlib.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/arc.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/arc.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/arc.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/arc.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/arcsorter.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/arcsorter.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/arcsorter.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/arcsorter.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/arctess.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/arctess.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/arctess.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/arctess.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/backend.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/backend.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/backend.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/backend.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/basiccrveval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/basiccrveval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/basiccrveval.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/basiccrveval.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/basicsurfeval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/basicsurfeval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/basicsurfeval.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/basicsurfeval.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/bezierarc.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/bezierarc.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/bin.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/bin.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/bin.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/bin.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/bufpool.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/bufpool.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/bufpool.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/bufpool.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/cachingeval.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/cachingeval.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/cachingeval.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/cachingeval.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/ccw.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/ccw.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/coveandtiler.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/coveandtiler.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/coveandtiler.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/coveandtiler.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/curve.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/curve.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/curve.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/curve.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/curvelist.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/curvelist.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/curvelist.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/curvelist.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/curvesub.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/curvesub.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/dataTransform.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/dataTransform.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/dataTransform.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/defines.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/defines.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/displaylist.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/displaylist.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/displaylist.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/displaylist.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/displaymode.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/displaymode.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/flist.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/flist.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/flist.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/flist.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/flistsorter.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/flistsorter.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/flistsorter.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/flistsorter.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/gridline.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/gridline.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/gridtrimvertex.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/gridtrimvertex.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/gridvertex.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/gridvertex.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/hull.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/hull.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/hull.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/hull.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/intersect.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/intersect.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/jarcloc.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/jarcloc.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/knotvector.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/knotvector.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/knotvector.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/knotvector.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mapdesc.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mapdesc.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mapdesc.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mapdesc.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mapdescv.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/maplist.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/maplist.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/maplist.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/maplist.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mesher.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mesher.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mesher.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mesher.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/monoTriangulationBackend.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/monotonizer.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/monotonizer.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/monotonizer.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/monotonizer.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/myassert.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/myassert.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mycode.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mycode.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mymath.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mymath.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mysetjmp.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mysetjmp.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/mystring.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/mystring.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/nurbsconsts.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/nurbsconsts.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/nurbsinterfac.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/nurbstess.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/nurbstess.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/nurbstess.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/nurbstess.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/patch.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/patch.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/patch.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/patch.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/patchlist.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/patchlist.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/patchlist.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/patchlist.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/pwlarc.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/pwlarc.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/quilt.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/quilt.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/quilt.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/quilt.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/reader.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/reader.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/reader.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/reader.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/renderhints.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/renderhints.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/renderhints.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/renderhints.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/simplemath.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/simplemath.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/slicer.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/slicer.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/slicer.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/slicer.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/sorter.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/sorter.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/sorter.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/sorter.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/splitarcs.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/splitarcs.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/subdivider.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/subdivider.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/subdivider.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/subdivider.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/tobezier.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/tobezier.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimline.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimline.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimline.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimline.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimregion.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimregion.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimregion.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimregion.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimvertex.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimvertex.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimvertpool.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimvertpool.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/trimvertpool.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/trimvertpool.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/types.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/types.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/uarray.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/uarray.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/uarray.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/uarray.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/varray.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/varray.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/internals/varray.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/internals/varray.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/definitions.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/definitions.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/directedLine.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/directedLine.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/directedLine.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/directedLine.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/glimports.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/glimports.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/gridWrap.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/gridWrap.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/gridWrap.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/monoChain.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/monoChain.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/monoPolyPart.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/monoPolyPart.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/monoTriangulation.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/monoTriangulation.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/mystdio.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/mystdio.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/mystdlib.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/mystdlib.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/partitionX.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/partitionX.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/partitionX.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/partitionX.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/partitionY.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/partitionY.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/polyDBG.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/polyDBG.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/polyDBG.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/polyDBG.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/polyUtil.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/polyUtil.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/primitiveStream.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/primitiveStream.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/primitiveStream.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/quicksort.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/quicksort.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/quicksort.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/quicksort.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/rectBlock.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/rectBlock.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/rectBlock.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleComp.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleComp.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleCompBot.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleCompBot.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleCompRight.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleCompRight.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleCompTop.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleCompTop.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleMonoPoly.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampleMonoPoly.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampledLine.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/sampledLine.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/searchTree.cc [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/searchTree.cc with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/searchTree.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/searchTree.h with 100% similarity]
dll/opengl/glu32/src/libnurbs/nurbtess/zlassert.h [moved from dll/opengl/mesa/src/glu/sgi/libnurbs/nurbtess/zlassert.h with 100% similarity]
dll/opengl/glu32/src/libtess/README [moved from dll/opengl/mesa/src/glu/sgi/libtess/README with 100% similarity]
dll/opengl/glu32/src/libtess/alg-outline [moved from dll/opengl/mesa/src/glu/sgi/libtess/alg-outline with 100% similarity]
dll/opengl/glu32/src/libtess/dict-list.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/dict-list.h with 100% similarity]
dll/opengl/glu32/src/libtess/dict.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/dict.c with 100% similarity]
dll/opengl/glu32/src/libtess/dict.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/dict.h with 100% similarity]
dll/opengl/glu32/src/libtess/geom.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/geom.c with 100% similarity]
dll/opengl/glu32/src/libtess/geom.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/geom.h with 100% similarity]
dll/opengl/glu32/src/libtess/memalloc.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/memalloc.c with 100% similarity]
dll/opengl/glu32/src/libtess/memalloc.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/memalloc.h with 100% similarity]
dll/opengl/glu32/src/libtess/mesh.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/mesh.c with 100% similarity]
dll/opengl/glu32/src/libtess/mesh.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/mesh.h with 100% similarity]
dll/opengl/glu32/src/libtess/normal.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/normal.c with 100% similarity]
dll/opengl/glu32/src/libtess/normal.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/normal.h with 100% similarity]
dll/opengl/glu32/src/libtess/priorityq-heap.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/priorityq-heap.c with 100% similarity]
dll/opengl/glu32/src/libtess/priorityq-heap.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/priorityq-heap.h with 100% similarity]
dll/opengl/glu32/src/libtess/priorityq-sort.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/priorityq-sort.h with 100% similarity]
dll/opengl/glu32/src/libtess/priorityq.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/priorityq.c with 100% similarity]
dll/opengl/glu32/src/libtess/priorityq.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/priorityq.h with 100% similarity]
dll/opengl/glu32/src/libtess/render.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/render.c with 100% similarity]
dll/opengl/glu32/src/libtess/render.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/render.h with 100% similarity]
dll/opengl/glu32/src/libtess/sweep.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/sweep.c with 100% similarity]
dll/opengl/glu32/src/libtess/sweep.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/sweep.h with 100% similarity]
dll/opengl/glu32/src/libtess/tess.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/tess.c with 100% similarity]
dll/opengl/glu32/src/libtess/tess.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/tess.h with 100% similarity]
dll/opengl/glu32/src/libtess/tessmono.c [moved from dll/opengl/mesa/src/glu/sgi/libtess/tessmono.c with 100% similarity]
dll/opengl/glu32/src/libtess/tessmono.h [moved from dll/opengl/mesa/src/glu/sgi/libtess/tessmono.h with 100% similarity]
dll/opengl/glu32/src/libutil/error.c [moved from dll/opengl/mesa/src/glu/sgi/libutil/error.c with 100% similarity]
dll/opengl/glu32/src/libutil/glue.c [moved from dll/opengl/mesa/src/glu/sgi/libutil/glue.c with 100% similarity]
dll/opengl/glu32/src/libutil/gluint.h [moved from dll/opengl/mesa/src/glu/sgi/libutil/gluint.h with 100% similarity]
dll/opengl/glu32/src/libutil/mipmap.c [moved from dll/opengl/mesa/src/glu/sgi/libutil/mipmap.c with 99% similarity]
dll/opengl/glu32/src/libutil/project.c [moved from dll/opengl/mesa/src/glu/sgi/libutil/project.c with 100% similarity]
dll/opengl/glu32/src/libutil/quad.c [moved from dll/opengl/mesa/src/glu/sgi/libutil/quad.c with 100% similarity]
dll/opengl/glu32/src/libutil/registry.c [moved from dll/opengl/mesa/src/glu/sgi/libutil/registry.c with 100% similarity]
dll/opengl/mesa/src/CMakeLists.txt
dll/opengl/mesa/src/glu/sgi/CMakeLists.txt [deleted file]
dll/opengl/mesa/src/glu/sgi/SConscript [deleted file]
dll/opengl/mesa/src/glu/sgi/dummy.cc [deleted file]
dll/opengl/mesa/src/glu/sgi/glu.def [deleted file]
dll/win32/advapi32/misc/logon.c
dll/win32/samsrv/database.c
dll/win32/samsrv/samrpc.c
dll/win32/samsrv/setup.c
dll/win32/shell32/iconcache.cpp
drivers/hid/mouhid/mouhid.c
drivers/usb/usbhub/fdo.c
drivers/usb/usbhub/usbhub.c
drivers/usb/usbhub/usbhub.h
drivers/usb/usbstor/disk.c
lib/drivers/hidparser/api.c
ntoskrnl/po/power.c
win32ss/include/ntuser.h
win32ss/user/ntuser/main.c
win32ss/user/ntuser/ntuser.h
win32ss/user/ntuser/object.c
win32ss/user/ntuser/object.h
win32ss/user/ntuser/win32.h
win32ss/user/ntuser/win32kdebug.h

index 7f92a77..8f48a34 100644 (file)
@@ -1,7 +1,8 @@
 
 if(SEPARATE_DBG)
     # FIXME: http://sourceware.org/bugzilla/show_bug.cgi?id=11822
-    set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+    set(CMAKE_LDR_PE_HELPER_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+    set(CMAKE_LDR_PE_HELPER_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")
 endif()
 
 spec2def(freeldr.sys freeldr.spec)
@@ -171,6 +172,10 @@ endif()
 if((NOT MSVC) AND (CMAKE_VERSION VERSION_GREATER 2.8.7))
     add_library(freeldr_pe SHARED $<TARGET_OBJECTS:freeldr_common> ${FREELDR_BASE_SOURCE})
     add_library(freeldr_pe_dbg SHARED EXCLUDE_FROM_ALL $<TARGET_OBJECTS:freeldr_common> ${FREELDR_BASE_SOURCE})
+    if(SEPARATE_DBG)
+        set_target_properties(freeldr_pe PROPERTIES LINKER_LANGUAGE LDR_PE_HELPER)
+        set_target_properties(freeldr_pe_dbg PROPERTIES LINKER_LANGUAGE LDR_PE_HELPER)
+    endif()
 else()
     add_library(freeldr_pe SHARED ${FREELDR_BASE_SOURCE})
     add_library(freeldr_pe_dbg SHARED EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE})
@@ -231,6 +236,10 @@ endif()
 if((NOT MSVC) AND (CMAKE_VERSION VERSION_GREATER 2.8.7))
     add_library(setupldr_pe SHARED $<TARGET_OBJECTS:freeldr_common> ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE})
     add_library(setupldr_pe_dbg SHARED EXCLUDE_FROM_ALL $<TARGET_OBJECTS:freeldr_common> ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE})
+    if(SEPARATE_DBG)
+        set_target_properties(setupldr_pe PROPERTIES LINKER_LANGUAGE LDR_PE_HELPER)
+        set_target_properties(setupldr_pe_dbg PROPERTIES LINKER_LANGUAGE LDR_PE_HELPER)
+    endif()
 else()
     add_library(setupldr_pe SHARED ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE})
     add_library(setupldr_pe_dbg SHARED EXCLUDE_FROM_ALL ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE})
index 039591c..f5d289c 100755 (executable)
@@ -9,6 +9,11 @@ BUILD_ENVIRONMENT=MinGW
 ARCH=$ROS_ARCH
 REACTOS_SOURCE_DIR=$(cd `dirname $0` && pwd)
 REACTOS_OUTPUT_PATH=output-$BUILD_ENVIRONMENT-$ARCH
+if [ "$1" = "ninja" ]; then
+CMAKE_GENERATOR="Ninja"
+else
+CMAKE_GENERATOR="Unix Makefiles"
+fi
 
 if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then
   echo Creating directories in $REACTOS_OUTPUT_PATH
@@ -23,12 +28,12 @@ cd host-tools
 rm -f CMakeCache.txt
 
 REACTOS_BUILD_TOOLS_DIR="$PWD"
-cmake -G "Unix Makefiles" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
+cmake -G "$CMAKE_GENERATOR" -DARCH=$ARCH "$REACTOS_SOURCE_DIR"
 
 echo Preparing reactos...
 cd ../reactos
 rm -f CMakeCache.txt
 
-cmake -G "Unix Makefiles" -DENABLE_CCACHE=0 -DPCH=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
+cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE=0 -DPCH=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" "$REACTOS_SOURCE_DIR"
 
 echo Configure script complete! Enter directories and execute appropriate build commands\(ex: make, makex, etc...\).
index 1356e31..bd04baf 100644 (file)
@@ -58,7 +58,7 @@ add_library(libjpeg SHARED
     jmemmgr.c
     jmemnobs.c)
 
-set_entrypoint(libjpeg 0)
+set_module_type(libjpeg win32dll)
 add_importlibs(libjpeg msvcrt kernel32)
 add_dependencies(libjpeg psdk)
 add_cd_file(TARGET libjpeg DESTINATION reactos/system32 FOR all)
index d88ea48..fb27d36 100644 (file)
@@ -26,7 +26,7 @@ add_library(libpng SHARED
     pngwtran.c
     pngwutil.c)
 
-set_entrypoint(libpng 0)
+set_module_type(libpng win32dll)
 target_link_libraries(libpng zlib)
 add_importlibs(libpng msvcrt kernel32 ntdll)
 add_dependencies(libpng psdk)
index 553ace5..e2ba360 100644 (file)
@@ -50,7 +50,7 @@ add_library(libtiff SHARED
     tif_write.c
     tif_zip.c)
 
-set_module_type(libtiff win32dll ENTRYPOINT 0)
+set_module_type(libtiff win32dll)
 target_link_libraries(libtiff zlib getopt)
 add_importlibs(libtiff user32 msvcrt kernel32 ntdll)
 add_dependencies(libtiff psdk)
index 6e0282a..2ddadd2 100644 (file)
@@ -33,7 +33,7 @@ add_library(libxslt SHARED
     xsltlocale.c
     xsltutils.c)
 
-set_module_type(libxslt win32dll ENTRYPOINT 0)
+set_module_type(libxslt win32dll)
 target_link_libraries(libxslt libxml2)
 add_importlibs(libxslt msvcrt ws2_32 kernel32)
 
index 1ebaea6..fe19743 100644 (file)
@@ -1,2 +1,3 @@
+add_subdirectory(glu32)
 add_subdirectory(mesa)
-add_subdirectory(opengl32)
\ No newline at end of file
+add_subdirectory(opengl32)
diff --git a/dll/opengl/glu32/.gitignore b/dll/opengl/glu32/.gitignore
new file mode 100644 (file)
index 0000000..cfcd43c
--- /dev/null
@@ -0,0 +1,48 @@
+*.a
+*.dll
+*.exe
+*.ilk
+*.la
+*.lo
+*.o
+*.obj
+*.os
+*.pc
+*.pdb
+*.pyc
+*.pyo
+*.so
+*.so.*
+*.sw[a-z]
+*.tar
+*.tar.bz2
+*.tar.gz
+*.zip
+*~
+depend
+depend.bak
+bin/ltmain.sh
+lib
+lib64
+configure
+configure.lineno
+autom4te.cache
+aclocal.m4
+config.log
+config.status
+cscope*
+build
+libtool
+manifest.txt
+Makefile.in
+.dir-locals.el
+.deps/
+.libs/
+Makefile
+.dirstamp
+missing
+config.guess
+config.sub
+depcomp
+install-sh
+ltmain.sh
diff --git a/dll/opengl/glu32/CMakeLists.txt b/dll/opengl/glu32/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6892dc0
--- /dev/null
@@ -0,0 +1,132 @@
+
+include_directories(BEFORE
+    include
+    src/include
+    src/libnurbs/internals
+    src/libnurbs/interface
+    src/libnurbs/nurbtess
+)
+
+add_definitions(
+    -DBUILD_GLU32
+    -DNDEBUG
+    -DLIBRARYBUILD
+    -DRESOLVE_3D_TEXTURE_SUPPORT
+)
+
+#this library uses C++
+# set_cpp()
+
+# we must use our own spec file
+spec2def(glu32.dll glu32.spec ADD_IMPORTLIB)
+
+list(APPEND SOURCE
+    src/libutil/error.c
+    src/libutil/glue.c
+    src/libutil/mipmap.c
+    src/libutil/project.c
+    src/libutil/quad.c
+    src/libutil/registry.c
+    src/libtess/dict.c
+    src/libtess/geom.c
+    src/libtess/memalloc.c
+    src/libtess/mesh.c
+    src/libtess/normal.c
+    src/libtess/priorityq.c
+    src/libtess/render.c
+    src/libtess/sweep.c
+    src/libtess/tess.c
+    src/libtess/tessmono.c
+    src/libnurbs/interface/bezierEval.cc
+    src/libnurbs/interface/bezierPatch.cc
+    src/libnurbs/interface/bezierPatchMesh.cc
+    src/libnurbs/interface/glcurveval.cc
+    src/libnurbs/interface/glinterface.cc
+    src/libnurbs/interface/glrenderer.cc
+    src/libnurbs/interface/glsurfeval.cc
+    src/libnurbs/interface/incurveeval.cc
+    src/libnurbs/interface/insurfeval.cc
+    src/libnurbs/internals/arc.cc
+    src/libnurbs/internals/arcsorter.cc
+    src/libnurbs/internals/arctess.cc
+    src/libnurbs/internals/backend.cc
+    src/libnurbs/internals/basiccrveval.cc
+    src/libnurbs/internals/basicsurfeval.cc
+    src/libnurbs/internals/bin.cc
+    src/libnurbs/internals/bufpool.cc
+    src/libnurbs/internals/cachingeval.cc
+    src/libnurbs/internals/ccw.cc
+    src/libnurbs/internals/coveandtiler.cc
+    src/libnurbs/internals/curve.cc
+    src/libnurbs/internals/curvelist.cc
+    src/libnurbs/internals/curvesub.cc
+    src/libnurbs/internals/dataTransform.cc
+    src/libnurbs/internals/displaylist.cc
+    src/libnurbs/internals/flist.cc
+    src/libnurbs/internals/flistsorter.cc
+    src/libnurbs/internals/hull.cc
+    src/libnurbs/internals/intersect.cc
+    src/libnurbs/internals/knotvector.cc
+    src/libnurbs/internals/mapdesc.cc
+    src/libnurbs/internals/mapdescv.cc
+    src/libnurbs/internals/maplist.cc
+    src/libnurbs/internals/mesher.cc
+    src/libnurbs/internals/monoTriangulationBackend.cc
+    src/libnurbs/internals/monotonizer.cc
+    src/libnurbs/internals/mycode.cc
+    src/libnurbs/internals/nurbsinterfac.cc
+    src/libnurbs/internals/nurbstess.cc
+    src/libnurbs/internals/patch.cc
+    src/libnurbs/internals/patchlist.cc
+    src/libnurbs/internals/quilt.cc
+    src/libnurbs/internals/reader.cc
+    src/libnurbs/internals/renderhints.cc
+    src/libnurbs/internals/slicer.cc
+    src/libnurbs/internals/sorter.cc
+    src/libnurbs/internals/splitarcs.cc
+    src/libnurbs/internals/subdivider.cc
+    src/libnurbs/internals/tobezier.cc
+    src/libnurbs/internals/trimline.cc
+    src/libnurbs/internals/trimregion.cc
+    src/libnurbs/internals/trimvertpool.cc
+    src/libnurbs/internals/uarray.cc
+    src/libnurbs/internals/varray.cc
+    src/libnurbs/nurbtess/directedLine.cc
+    src/libnurbs/nurbtess/gridWrap.cc
+    src/libnurbs/nurbtess/monoChain.cc
+    src/libnurbs/nurbtess/monoPolyPart.cc
+    src/libnurbs/nurbtess/monoTriangulation.cc
+    src/libnurbs/nurbtess/partitionX.cc
+    src/libnurbs/nurbtess/partitionY.cc
+    src/libnurbs/nurbtess/polyDBG.cc
+    src/libnurbs/nurbtess/polyUtil.cc
+    src/libnurbs/nurbtess/primitiveStream.cc
+    src/libnurbs/nurbtess/quicksort.cc
+    src/libnurbs/nurbtess/rectBlock.cc
+    src/libnurbs/nurbtess/sampleComp.cc
+    src/libnurbs/nurbtess/sampleCompBot.cc
+    src/libnurbs/nurbtess/sampleCompRight.cc
+    src/libnurbs/nurbtess/sampleCompTop.cc
+    src/libnurbs/nurbtess/sampleMonoPoly.cc
+    src/libnurbs/nurbtess/sampledLine.cc
+    src/libnurbs/nurbtess/searchTree.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/glu32.def
+)
+
+add_library(glu32 SHARED ${SOURCE})
+set_module_type(glu32 win32dll)
+
+if(NOT MSVC)
+#FIXME: we really need a standard C++ library
+    target_link_libraries(glu32 -lsupc++ -lgcc)
+    add_compile_flags("-Wno-error=write-strings")
+endif()
+
+add_importlibs(glu32
+    opengl32
+    gdi32
+    msvcrt
+    kernel32
+    ntdll)
+
+add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)
diff --git a/dll/opengl/glu32/include/GL/glu.h b/dll/opengl/glu32/include/GL/glu.h
new file mode 100644 (file)
index 0000000..ba2228d
--- /dev/null
@@ -0,0 +1,353 @@
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifndef __glu_h__
+#define __glu_h__
+
+#if defined(USE_MGL_NAMESPACE)
+#include "glu_mangle.h"
+#endif
+
+#include <GL/gl.h>
+
+#ifndef GLAPIENTRY
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#define GLAPIENTRY __stdcall
+#else
+#define GLAPIENTRY
+#endif
+#endif
+
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
+# undef GLAPI
+# define GLAPI __declspec(dllexport)
+#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
+/* tag specifying we're building for DLL runtime support */
+# undef GLAPI
+# define GLAPI __declspec(dllimport)
+#elif !defined(GLAPI)
+/* for use with static link lib build of Win32 edition only */
+# define GLAPI extern
+#endif /* _STATIC_MESA support */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*************************************************************/
+
+/* Extensions */
+#define GLU_EXT_object_space_tess          1
+#define GLU_EXT_nurbs_tessellator          1
+
+/* Boolean */
+#define GLU_FALSE                          0
+#define GLU_TRUE                           1
+
+/* Version */
+#define GLU_VERSION_1_1                    1
+#define GLU_VERSION_1_2                    1
+#define GLU_VERSION_1_3                    1
+
+/* StringName */
+#define GLU_VERSION                        100800
+#define GLU_EXTENSIONS                     100801
+
+/* ErrorCode */
+#define GLU_INVALID_ENUM                   100900
+#define GLU_INVALID_VALUE                  100901
+#define GLU_OUT_OF_MEMORY                  100902
+#define GLU_INCOMPATIBLE_GL_VERSION        100903
+#define GLU_INVALID_OPERATION              100904
+
+/* NurbsDisplay */
+/*      GLU_FILL */
+#define GLU_OUTLINE_POLYGON                100240
+#define GLU_OUTLINE_PATCH                  100241
+
+/* NurbsCallback */
+#define GLU_NURBS_ERROR                    100103
+#define GLU_ERROR                          100103
+#define GLU_NURBS_BEGIN                    100164
+#define GLU_NURBS_BEGIN_EXT                100164
+#define GLU_NURBS_VERTEX                   100165
+#define GLU_NURBS_VERTEX_EXT               100165
+#define GLU_NURBS_NORMAL                   100166
+#define GLU_NURBS_NORMAL_EXT               100166
+#define GLU_NURBS_COLOR                    100167
+#define GLU_NURBS_COLOR_EXT                100167
+#define GLU_NURBS_TEXTURE_COORD            100168
+#define GLU_NURBS_TEX_COORD_EXT            100168
+#define GLU_NURBS_END                      100169
+#define GLU_NURBS_END_EXT                  100169
+#define GLU_NURBS_BEGIN_DATA               100170
+#define GLU_NURBS_BEGIN_DATA_EXT           100170
+#define GLU_NURBS_VERTEX_DATA              100171
+#define GLU_NURBS_VERTEX_DATA_EXT          100171
+#define GLU_NURBS_NORMAL_DATA              100172
+#define GLU_NURBS_NORMAL_DATA_EXT          100172
+#define GLU_NURBS_COLOR_DATA               100173
+#define GLU_NURBS_COLOR_DATA_EXT           100173
+#define GLU_NURBS_TEXTURE_COORD_DATA       100174
+#define GLU_NURBS_TEX_COORD_DATA_EXT       100174
+#define GLU_NURBS_END_DATA                 100175
+#define GLU_NURBS_END_DATA_EXT             100175
+
+/* NurbsError */
+#define GLU_NURBS_ERROR1                   100251
+#define GLU_NURBS_ERROR2                   100252
+#define GLU_NURBS_ERROR3                   100253
+#define GLU_NURBS_ERROR4                   100254
+#define GLU_NURBS_ERROR5                   100255
+#define GLU_NURBS_ERROR6                   100256
+#define GLU_NURBS_ERROR7                   100257
+#define GLU_NURBS_ERROR8                   100258
+#define GLU_NURBS_ERROR9                   100259
+#define GLU_NURBS_ERROR10                  100260
+#define GLU_NURBS_ERROR11                  100261
+#define GLU_NURBS_ERROR12                  100262
+#define GLU_NURBS_ERROR13                  100263
+#define GLU_NURBS_ERROR14                  100264
+#define GLU_NURBS_ERROR15                  100265
+#define GLU_NURBS_ERROR16                  100266
+#define GLU_NURBS_ERROR17                  100267
+#define GLU_NURBS_ERROR18                  100268
+#define GLU_NURBS_ERROR19                  100269
+#define GLU_NURBS_ERROR20                  100270
+#define GLU_NURBS_ERROR21                  100271
+#define GLU_NURBS_ERROR22                  100272
+#define GLU_NURBS_ERROR23                  100273
+#define GLU_NURBS_ERROR24                  100274
+#define GLU_NURBS_ERROR25                  100275
+#define GLU_NURBS_ERROR26                  100276
+#define GLU_NURBS_ERROR27                  100277
+#define GLU_NURBS_ERROR28                  100278
+#define GLU_NURBS_ERROR29                  100279
+#define GLU_NURBS_ERROR30                  100280
+#define GLU_NURBS_ERROR31                  100281
+#define GLU_NURBS_ERROR32                  100282
+#define GLU_NURBS_ERROR33                  100283
+#define GLU_NURBS_ERROR34                  100284
+#define GLU_NURBS_ERROR35                  100285
+#define GLU_NURBS_ERROR36                  100286
+#define GLU_NURBS_ERROR37                  100287
+
+/* NurbsProperty */
+#define GLU_AUTO_LOAD_MATRIX               100200
+#define GLU_CULLING                        100201
+#define GLU_SAMPLING_TOLERANCE             100203
+#define GLU_DISPLAY_MODE                   100204
+#define GLU_PARAMETRIC_TOLERANCE           100202
+#define GLU_SAMPLING_METHOD                100205
+#define GLU_U_STEP                         100206
+#define GLU_V_STEP                         100207
+#define GLU_NURBS_MODE                     100160
+#define GLU_NURBS_MODE_EXT                 100160
+#define GLU_NURBS_TESSELLATOR              100161
+#define GLU_NURBS_TESSELLATOR_EXT          100161
+#define GLU_NURBS_RENDERER                 100162
+#define GLU_NURBS_RENDERER_EXT             100162
+
+/* NurbsSampling */
+#define GLU_OBJECT_PARAMETRIC_ERROR        100208
+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT    100208
+#define GLU_OBJECT_PATH_LENGTH             100209
+#define GLU_OBJECT_PATH_LENGTH_EXT         100209
+#define GLU_PATH_LENGTH                    100215
+#define GLU_PARAMETRIC_ERROR               100216
+#define GLU_DOMAIN_DISTANCE                100217
+
+/* NurbsTrim */
+#define GLU_MAP1_TRIM_2                    100210
+#define GLU_MAP1_TRIM_3                    100211
+
+/* QuadricDrawStyle */
+#define GLU_POINT                          100010
+#define GLU_LINE                           100011
+#define GLU_FILL                           100012
+#define GLU_SILHOUETTE                     100013
+
+/* QuadricCallback */
+/*      GLU_ERROR */
+
+/* QuadricNormal */
+#define GLU_SMOOTH                         100000
+#define GLU_FLAT                           100001
+#define GLU_NONE                           100002
+
+/* QuadricOrientation */
+#define GLU_OUTSIDE                        100020
+#define GLU_INSIDE                         100021
+
+/* TessCallback */
+#define GLU_TESS_BEGIN                     100100
+#define GLU_BEGIN                          100100
+#define GLU_TESS_VERTEX                    100101
+#define GLU_VERTEX                         100101
+#define GLU_TESS_END                       100102
+#define GLU_END                            100102
+#define GLU_TESS_ERROR                     100103
+#define GLU_TESS_EDGE_FLAG                 100104
+#define GLU_EDGE_FLAG                      100104
+#define GLU_TESS_COMBINE                   100105
+#define GLU_TESS_BEGIN_DATA                100106
+#define GLU_TESS_VERTEX_DATA               100107
+#define GLU_TESS_END_DATA                  100108
+#define GLU_TESS_ERROR_DATA                100109
+#define GLU_TESS_EDGE_FLAG_DATA            100110
+#define GLU_TESS_COMBINE_DATA              100111
+
+/* TessContour */
+#define GLU_CW                             100120
+#define GLU_CCW                            100121
+#define GLU_INTERIOR                       100122
+#define GLU_EXTERIOR                       100123
+#define GLU_UNKNOWN                        100124
+
+/* TessProperty */
+#define GLU_TESS_WINDING_RULE              100140
+#define GLU_TESS_BOUNDARY_ONLY             100141
+#define GLU_TESS_TOLERANCE                 100142
+
+/* TessError */
+#define GLU_TESS_ERROR1                    100151
+#define GLU_TESS_ERROR2                    100152
+#define GLU_TESS_ERROR3                    100153
+#define GLU_TESS_ERROR4                    100154
+#define GLU_TESS_ERROR5                    100155
+#define GLU_TESS_ERROR6                    100156
+#define GLU_TESS_ERROR7                    100157
+#define GLU_TESS_ERROR8                    100158
+#define GLU_TESS_MISSING_BEGIN_POLYGON     100151
+#define GLU_TESS_MISSING_BEGIN_CONTOUR     100152
+#define GLU_TESS_MISSING_END_POLYGON       100153
+#define GLU_TESS_MISSING_END_CONTOUR       100154
+#define GLU_TESS_COORD_TOO_LARGE           100155
+#define GLU_TESS_NEED_COMBINE_CALLBACK     100156
+
+/* TessWinding */
+#define GLU_TESS_WINDING_ODD               100130
+#define GLU_TESS_WINDING_NONZERO           100131
+#define GLU_TESS_WINDING_POSITIVE          100132
+#define GLU_TESS_WINDING_NEGATIVE          100133
+#define GLU_TESS_WINDING_ABS_GEQ_TWO       100134
+
+/*************************************************************/
+
+
+#ifdef __cplusplus
+class GLUnurbs;
+class GLUquadric;
+class GLUtesselator;
+#else
+typedef struct GLUnurbs GLUnurbs;
+typedef struct GLUquadric GLUquadric;
+typedef struct GLUtesselator GLUtesselator;
+#endif
+
+typedef GLUnurbs GLUnurbsObj;
+typedef GLUquadric GLUquadricObj;
+typedef GLUtesselator GLUtesselatorObj;
+typedef GLUtesselator GLUtriangulatorObj;
+
+#define GLU_TESS_MAX_COORD 1.0e150
+
+/* Internal convenience typedefs */
+typedef void (GLAPIENTRYP _GLUfuncptr)(void);
+
+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
+GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
+GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
+GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
+GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __glu_h__ */
diff --git a/dll/opengl/glu32/include/GL/glu_mangle.h b/dll/opengl/glu32/include/GL/glu_mangle.h
new file mode 100644 (file)
index 0000000..9c25aa8
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Mesa 3-D graphics library
+ * Version:  3.0
+ * Copyright (C) 1995-1998  Brian Paul
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef GLU_MANGLE_H
+#define GLU_MANGLE_H
+
+
+#define gluLookAt mgluLookAt
+#define gluOrtho2D mgluOrtho2D
+#define gluPerspective mgluPerspective
+#define gluPickMatrix mgluPickMatrix
+#define gluProject mgluProject
+#define gluUnProject mgluUnProject
+#define gluErrorString mgluErrorString
+#define gluScaleImage mgluScaleImage
+#define gluBuild1DMipmaps mgluBuild1DMipmaps
+#define gluBuild2DMipmaps mgluBuild2DMipmaps
+#define gluNewQuadric mgluNewQuadric
+#define gluDeleteQuadric mgluDeleteQuadric
+#define gluQuadricDrawStyle mgluQuadricDrawStyle
+#define gluQuadricOrientation mgluQuadricOrientation
+#define gluQuadricNormals mgluQuadricNormals
+#define gluQuadricTexture mgluQuadricTexture
+#define gluQuadricCallback mgluQuadricCallback
+#define gluCylinder mgluCylinder
+#define gluSphere mgluSphere
+#define gluDisk mgluDisk
+#define gluPartialDisk mgluPartialDisk
+#define gluNewNurbsRenderer mgluNewNurbsRenderer
+#define gluDeleteNurbsRenderer mgluDeleteNurbsRenderer
+#define gluLoadSamplingMatrices mgluLoadSamplingMatrices
+#define gluNurbsProperty mgluNurbsProperty
+#define gluGetNurbsProperty mgluGetNurbsProperty
+#define gluBeginCurve mgluBeginCurve
+#define gluEndCurve mgluEndCurve
+#define gluNurbsCurve mgluNurbsCurve
+#define gluBeginSurface mgluBeginSurface
+#define gluEndSurface mgluEndSurface
+#define gluNurbsSurface mgluNurbsSurface
+#define gluBeginTrim mgluBeginTrim
+#define gluEndTrim mgluEndTrim
+#define gluPwlCurve mgluPwlCurve
+#define gluNurbsCallback mgluNurbsCallback
+#define gluNewTess mgluNewTess
+#define gluDeleteTess mgluDeleteTess
+#define gluTessBeginPolygon mgluTessBeginPolygon
+#define gluTessBeginContour mgluTessBeginContour
+#define gluTessVertex mgluTessVertex
+#define gluTessEndPolygon mgluTessEndPolygon
+#define gluTessEndContour mgluTessEndContour
+#define gluTessProperty mgluTessProperty
+#define gluTessNormal mgluTessNormal
+#define gluTessCallback mgluTessCallback
+#define gluGetTessProperty mgluGetTessProperty
+#define gluBeginPolygon mgluBeginPolygon
+#define gluNextContour mgluNextContour
+#define gluEndPolygon mgluEndPolygon
+#define gluGetString mgluGetString
+#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels
+#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels
+#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels
+#define gluBuild3DMipmaps mgluBuild3DMipmaps
+#define gluCheckExtension mgluCheckExtension
+#define gluUnProject4 mgluUnProject4
+#define gluNurbsCallbackData mgluNurbsCallbackData
+#define gluNurbsCallbackDataEXT mgluNurbsCallbackDataEXT
+
+#endif
similarity index 99%
rename from dll/opengl/mesa/src/glu/sgi/libutil/mipmap.c
rename to dll/opengl/glu32/src/libutil/mipmap.c
index c475c96..8a45e39 100644 (file)
@@ -3494,7 +3494,7 @@ noProxyTextures:
    }
 } /* closestFit() */
 
-GLint GLAPIENTRY
+GLAPI GLint GLAPIENTRY
 gluScaleImage(GLenum format, GLsizei widthin, GLsizei heightin,
                    GLenum typein, const void *datain,
                    GLsizei widthout, GLsizei heightout, GLenum typeout,
index a6290f7..758d7a7 100644 (file)
@@ -1,6 +1,5 @@
 
 add_subdirectory(gallium)
 add_subdirectory(glsl)
-add_subdirectory(glu/sgi)
 add_subdirectory(mapi/glapi)
-add_subdirectory(mesa)
\ No newline at end of file
+add_subdirectory(mesa)
diff --git a/dll/opengl/mesa/src/glu/sgi/CMakeLists.txt b/dll/opengl/mesa/src/glu/sgi/CMakeLists.txt
deleted file mode 100644 (file)
index d001455..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-
-include_directories(#BEFORE
-    include
-    libnurbs/internals
-    libnurbs/interface
-    libnurbs/nurbtess
-)
-
-add_definitions(
-    -DBUILD_GLU32
-    -DNDEBUG
-    -DLIBRARYBUILD
-    -DRESOLVE_3D_TEXTURE_SUPPORT
-)
-
-#this library uses C++
-set_cpp()
-
-# we must ue our own spec file
-spec2def(glu32.dll glu32.spec ADD_IMPORTLIB)
-
-list(APPEND SOURCE
-    libutil/error.c
-    libutil/glue.c
-    libutil/mipmap.c
-    libutil/project.c
-    libutil/quad.c
-    libutil/registry.c
-    libtess/dict.c
-    libtess/geom.c
-    libtess/memalloc.c
-    libtess/mesh.c
-    libtess/normal.c
-    libtess/priorityq.c
-    libtess/render.c
-    libtess/sweep.c
-    libtess/tess.c
-    libtess/tessmono.c
-    libnurbs/interface/bezierEval.cc
-    libnurbs/interface/bezierPatch.cc
-    libnurbs/interface/bezierPatchMesh.cc
-    libnurbs/interface/glcurveval.cc
-    libnurbs/interface/glinterface.cc
-    libnurbs/interface/glrenderer.cc
-    libnurbs/interface/glsurfeval.cc
-    libnurbs/interface/incurveeval.cc
-    libnurbs/interface/insurfeval.cc
-    libnurbs/internals/arc.cc
-    libnurbs/internals/arcsorter.cc
-    libnurbs/internals/arctess.cc
-    libnurbs/internals/backend.cc
-    libnurbs/internals/basiccrveval.cc
-    libnurbs/internals/basicsurfeval.cc
-    libnurbs/internals/bin.cc
-    libnurbs/internals/bufpool.cc
-    libnurbs/internals/cachingeval.cc
-    libnurbs/internals/ccw.cc
-    libnurbs/internals/coveandtiler.cc
-    libnurbs/internals/curve.cc
-    libnurbs/internals/curvelist.cc
-    libnurbs/internals/curvesub.cc
-    libnurbs/internals/dataTransform.cc
-    libnurbs/internals/displaylist.cc
-    libnurbs/internals/flist.cc
-    libnurbs/internals/flistsorter.cc
-    libnurbs/internals/hull.cc
-    libnurbs/internals/intersect.cc
-    libnurbs/internals/knotvector.cc
-    libnurbs/internals/mapdesc.cc
-    libnurbs/internals/mapdescv.cc
-    libnurbs/internals/maplist.cc
-    libnurbs/internals/mesher.cc
-    libnurbs/internals/monoTriangulationBackend.cc
-    libnurbs/internals/monotonizer.cc
-    libnurbs/internals/mycode.cc
-    libnurbs/internals/nurbsinterfac.cc
-    libnurbs/internals/nurbstess.cc
-    libnurbs/internals/patch.cc
-    libnurbs/internals/patchlist.cc
-    libnurbs/internals/quilt.cc
-    libnurbs/internals/reader.cc
-    libnurbs/internals/renderhints.cc
-    libnurbs/internals/slicer.cc
-    libnurbs/internals/sorter.cc
-    libnurbs/internals/splitarcs.cc
-    libnurbs/internals/subdivider.cc
-    libnurbs/internals/tobezier.cc
-    libnurbs/internals/trimline.cc
-    libnurbs/internals/trimregion.cc
-    libnurbs/internals/trimvertpool.cc
-    libnurbs/internals/uarray.cc
-    libnurbs/internals/varray.cc
-    libnurbs/nurbtess/directedLine.cc
-    libnurbs/nurbtess/gridWrap.cc
-    libnurbs/nurbtess/monoChain.cc
-    libnurbs/nurbtess/monoPolyPart.cc
-    libnurbs/nurbtess/monoTriangulation.cc
-    libnurbs/nurbtess/partitionX.cc
-    libnurbs/nurbtess/partitionY.cc
-    libnurbs/nurbtess/polyDBG.cc
-    libnurbs/nurbtess/polyUtil.cc
-    libnurbs/nurbtess/primitiveStream.cc
-    libnurbs/nurbtess/quicksort.cc
-    libnurbs/nurbtess/rectBlock.cc
-    libnurbs/nurbtess/sampleComp.cc
-    libnurbs/nurbtess/sampleCompBot.cc
-    libnurbs/nurbtess/sampleCompRight.cc
-    libnurbs/nurbtess/sampleCompTop.cc
-    libnurbs/nurbtess/sampleMonoPoly.cc
-    libnurbs/nurbtess/sampledLine.cc
-    libnurbs/nurbtess/searchTree.cc
-    ${CMAKE_CURRENT_BINARY_DIR}/glu32.def
-)
-
-add_library(glu32 SHARED ${SOURCE})
-set_module_type(glu32 win32dll ENTRYPOINT 0)
-
-add_importlibs(glu32
-    opengl32
-    gdi32
-    msvcrt
-    kernel32
-    ntdll)
-
-add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)
\ No newline at end of file
diff --git a/dll/opengl/mesa/src/glu/sgi/SConscript b/dll/opengl/mesa/src/glu/sgi/SConscript
deleted file mode 100644 (file)
index 94c7426..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-Import('*')
-
-env = env.Clone()
-
-env.Prepend(CPPPATH = [
-    'include',
-    'internals',
-    'libnurbs/internals',
-    'libnurbs/interface',
-    'libnurbs/nurbtess',
-])
-
-env.Prepend(CPPDEFINES = [
-    'LIBRARYBUILD',
-    'RESOLVE_3D_TEXTURE_SUPPORT',
-])
-
-sources = [
-    'libutil/error.c',
-    'libutil/glue.c',
-    'libutil/mipmap.c',
-    'libutil/project.c',
-    'libutil/quad.c',
-    'libutil/registry.c',
-    'libtess/dict.c',
-    'libtess/geom.c',
-    'libtess/memalloc.c',
-    'libtess/mesh.c',
-    'libtess/normal.c',
-    'libtess/priorityq.c',
-    'libtess/render.c',
-    'libtess/sweep.c',
-    'libtess/tess.c',
-    'libtess/tessmono.c',
-    'libnurbs/interface/bezierEval.cc',
-    'libnurbs/interface/bezierPatch.cc',
-    'libnurbs/interface/bezierPatchMesh.cc',
-    'libnurbs/interface/glcurveval.cc',
-    'libnurbs/interface/glinterface.cc',
-    'libnurbs/interface/glrenderer.cc',
-    'libnurbs/interface/glsurfeval.cc',
-    'libnurbs/interface/incurveeval.cc',
-    'libnurbs/interface/insurfeval.cc',
-    'libnurbs/internals/arc.cc',
-    'libnurbs/internals/arcsorter.cc',
-    'libnurbs/internals/arctess.cc',
-    'libnurbs/internals/backend.cc',
-    'libnurbs/internals/basiccrveval.cc',
-    'libnurbs/internals/basicsurfeval.cc',
-    'libnurbs/internals/bin.cc',
-    'libnurbs/internals/bufpool.cc',
-    'libnurbs/internals/cachingeval.cc',
-    'libnurbs/internals/ccw.cc',
-    'libnurbs/internals/coveandtiler.cc',
-    'libnurbs/internals/curve.cc',
-    'libnurbs/internals/curvelist.cc',
-    'libnurbs/internals/curvesub.cc',
-    'libnurbs/internals/dataTransform.cc',
-    'libnurbs/internals/displaylist.cc',
-    'libnurbs/internals/flist.cc',
-    'libnurbs/internals/flistsorter.cc',
-    'libnurbs/internals/hull.cc',
-    'libnurbs/internals/intersect.cc',
-    'libnurbs/internals/knotvector.cc',
-    'libnurbs/internals/mapdesc.cc',
-    'libnurbs/internals/mapdescv.cc',
-    'libnurbs/internals/maplist.cc',
-    'libnurbs/internals/mesher.cc',
-    'libnurbs/internals/monoTriangulationBackend.cc',
-    'libnurbs/internals/monotonizer.cc',
-    'libnurbs/internals/mycode.cc',
-    'libnurbs/internals/nurbsinterfac.cc',
-    'libnurbs/internals/nurbstess.cc',
-    'libnurbs/internals/patch.cc',
-    'libnurbs/internals/patchlist.cc',
-    'libnurbs/internals/quilt.cc',
-    'libnurbs/internals/reader.cc',
-    'libnurbs/internals/renderhints.cc',
-    'libnurbs/internals/slicer.cc',
-    'libnurbs/internals/sorter.cc',
-    'libnurbs/internals/splitarcs.cc',
-    'libnurbs/internals/subdivider.cc',
-    'libnurbs/internals/tobezier.cc',
-    'libnurbs/internals/trimline.cc',
-    'libnurbs/internals/trimregion.cc',
-    'libnurbs/internals/trimvertpool.cc',
-    'libnurbs/internals/uarray.cc',
-    'libnurbs/internals/varray.cc',
-    'libnurbs/nurbtess/directedLine.cc',
-    'libnurbs/nurbtess/gridWrap.cc',
-    'libnurbs/nurbtess/monoChain.cc',
-    'libnurbs/nurbtess/monoPolyPart.cc',
-    'libnurbs/nurbtess/monoTriangulation.cc',
-    'libnurbs/nurbtess/partitionX.cc',
-    'libnurbs/nurbtess/partitionY.cc',
-    'libnurbs/nurbtess/polyDBG.cc',
-    'libnurbs/nurbtess/polyUtil.cc',
-    'libnurbs/nurbtess/primitiveStream.cc',
-    'libnurbs/nurbtess/quicksort.cc',
-    'libnurbs/nurbtess/rectBlock.cc',
-    'libnurbs/nurbtess/sampleComp.cc',
-    'libnurbs/nurbtess/sampleCompBot.cc',
-    'libnurbs/nurbtess/sampleCompRight.cc',
-    'libnurbs/nurbtess/sampleCompTop.cc',
-    'libnurbs/nurbtess/sampleMonoPoly.cc',
-    'libnurbs/nurbtess/sampledLine.cc',
-    'libnurbs/nurbtess/searchTree.cc',
-]
-
-if env['platform'] == 'windows':
-    # -D_OPENGL32_ -Iinclude -DBUILD_GL32
-    env.PrependUnique(LIBS = [
-        'gdi32', 
-        'user32', 
-        'opengl32', 
-    ])
-    target = 'glu32'
-    sources += ['glu.def']
-else:
-    env.PrependUnique(LIBS = [
-        'GL',
-    ])
-    target = 'glu'
-
-glu = env.SharedLibrary(
-    target = target,
-    source = sources
-)
-
-env.Alias('glu', env.InstallSharedLibrary(glu, version=(1, 3, 0)))
-
-if env['platform'] == 'windows':
-    glu = env.FindIxes(glu, 'LIBPREFIX', 'LIBSUFFIX')
-else:
-    glu = env.FindIxes(glu, 'SHLIBPREFIX', 'SHLIBSUFFIX')
-
-Export('glu')
diff --git a/dll/opengl/mesa/src/glu/sgi/dummy.cc b/dll/opengl/mesa/src/glu/sgi/dummy.cc
deleted file mode 100644 (file)
index bd905a2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- * This file contains nothing. It's just there so there's at least a single
- * source file for libGLU.la in this directory.
- */
diff --git a/dll/opengl/mesa/src/glu/sgi/glu.def b/dll/opengl/mesa/src/glu/sgi/glu.def
deleted file mode 100644 (file)
index 0c8b021..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-;DESCRIPTION 'Mesa GLU (OpenGL work-alike) for Win32'
-VERSION 5.1
-;
-; Module definition file for GLU (GLU32.DLL)
-;
-; Note: The GLU functions use the STDCALL
-; function calling convention.  Microsoft's
-; GLU32 uses this convention and so must the
-; Mesa GLU32 so that the Mesa DLL can be used
-; as a drop-in replacement.
-;
-; The linker exports STDCALL entry points with
-; 'decorated' names; e.g., _glBegin@0, where the
-; trailing number is the number of bytes of 
-; parameter data pushed onto the stack.  The
-; callee is responsible for popping this data
-; off the stack, usually via a RETF n instruction.
-;
-; However, the Microsoft GLU32.DLL does not export
-; the decorated names, even though the calling convention
-; is STDCALL.  So, this module definition file is
-; needed to force the Mesa GLU32.DLL to export the
-; symbols in the same manner as the Microsoft DLL.
-; Were it not for this problem, this file would not
-; be needed (for the glu* functions) since the entry
-; points are compiled with dllexport declspec.
-;
-
-EXPORTS
-       gluBeginCurve
-       gluBeginPolygon
-       gluBeginSurface
-       gluBeginTrim
-       gluBuild1DMipmapLevels
-       gluBuild1DMipmaps
-       gluBuild2DMipmapLevels
-       gluBuild2DMipmaps
-       gluBuild3DMipmapLevels
-       gluBuild3DMipmaps
-       gluCheckExtension
-       gluCylinder
-       gluDeleteNurbsRenderer
-       gluDeleteQuadric
-       gluDeleteTess
-       gluDisk
-       gluEndCurve
-       gluEndPolygon
-       gluEndSurface
-       gluEndTrim
-       gluErrorString
-       gluGetNurbsProperty
-       gluGetString
-       gluGetTessProperty
-       gluLoadSamplingMatrices
-       gluLookAt
-       gluNewNurbsRenderer
-       gluNewQuadric
-       gluNewTess
-       gluNextContour
-       gluNurbsCallback
-       gluNurbsCallbackData
-       gluNurbsCallbackDataEXT
-       gluNurbsCurve
-       gluNurbsProperty
-       gluNurbsSurface
-       gluOrtho2D
-       gluPartialDisk
-       gluPerspective
-       gluPickMatrix
-       gluProject
-       gluPwlCurve
-       gluQuadricCallback
-       gluQuadricDrawStyle
-       gluQuadricNormals
-       gluQuadricOrientation
-       gluQuadricTexture
-       gluScaleImage
-       gluSphere
-       gluTessBeginContour
-       gluTessBeginPolygon
-       gluTessCallback
-       gluTessEndContour
-       gluTessEndPolygon
-       gluTessNormal
-       gluTessProperty
-       gluTessVertex
-       gluUnProject
-       gluUnProject4
index 161cbd4..8dce3bf 100644 (file)
@@ -310,53 +310,72 @@ static BOOL WINAPI
 GetUserSid(LPCWSTR UserName,
            PSID *Sid)
 {
-    PSID AccountDomainSid = NULL;
-    ULONG ulUserRid;
-    DWORD dwLength;
-    HKEY hNamesKey = NULL;
-    BOOL bResult = TRUE;
+    PSID SidBuffer = NULL;
+    PWSTR DomainBuffer = NULL;
+    DWORD cbSidSize = 0;
+    DWORD cchDomSize = 0;
+    SID_NAME_USE Use;
+    BOOL res = TRUE;
 
-    if (!GetAccountDomainSid(&AccountDomainSid))
-    {
+    *Sid = NULL;
+
+    LookupAccountNameW(NULL,
+                       UserName,
+                       NULL,
+                       &cbSidSize,
+                       NULL,
+                       &cchDomSize,
+                       &Use);
+
+    if (cbSidSize == 0 || cchDomSize == 0)
+        return FALSE;
+
+    SidBuffer = RtlAllocateHeap(RtlGetProcessHeap(),
+                                HEAP_ZERO_MEMORY,
+                                cbSidSize);
+    if (SidBuffer == NULL)
         return FALSE;
+
+    DomainBuffer = RtlAllocateHeap(RtlGetProcessHeap(),
+                                   HEAP_ZERO_MEMORY,
+                                   cchDomSize * sizeof(WCHAR));
+    if (DomainBuffer == NULL)
+    {
+        res = FALSE;
+        goto done;
     }
 
-    /* Open the Users\Names key */
-    if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
-                      L"SAM\\SAM\\Domains\\Account\\Users\\Names",
-                      0,
-                      KEY_READ,
-                      &hNamesKey))
+    if (!LookupAccountNameW(NULL,
+                            UserName,
+                            SidBuffer,
+                            &cbSidSize,
+                            DomainBuffer,
+                            &cchDomSize,
+                            &Use))
     {
-        ERR("Failed to open Users\\Names key! (Error %lu)\n", GetLastError());
-        bResult = FALSE;
+        res = FALSE;
         goto done;
     }
 
-    /* Read the user RID */
-    dwLength = sizeof(ULONG);
-    if (RegQueryValueExW(hNamesKey,
-                         UserName,
-                         NULL,
-                         NULL,
-                        (LPBYTE)&ulUserRid,
-                        &dwLength))
+    if (Use != SidTypeUser)
     {
-        ERR("Failed to read the SID! (Error %ld)\n", GetLastError());
-        bResult = FALSE;
+        res = FALSE;
         goto done;
     }
 
-    *Sid = AppendRidToSid(AccountDomainSid, ulUserRid);
+    *Sid = SidBuffer;
 
 done:
-    if (hNamesKey != NULL)
-        RegCloseKey(hNamesKey);
+    if (DomainBuffer != NULL)
+        RtlFreeHeap(RtlGetProcessHeap(), 0, DomainBuffer);
 
-    if (AccountDomainSid != NULL)
-        RtlFreeHeap(RtlGetProcessHeap(), 0, AccountDomainSid);
+    if (res == FALSE)
+    {
+        if (SidBuffer != NULL)
+            RtlFreeHeap(RtlGetProcessHeap(), 0, SidBuffer);
+    }
 
-    return bResult;
+    return res;
 }
 
 
@@ -593,8 +612,8 @@ LogonUserW(LPWSTR lpszUsername,
     TOKEN_USER TokenUser;
     TOKEN_OWNER TokenOwner;
     TOKEN_PRIMARY_GROUP TokenPrimaryGroup;
-    PTOKEN_GROUPS TokenGroups;
-    PTOKEN_PRIVILEGES TokenPrivileges;
+    PTOKEN_GROUPS TokenGroups = NULL;
+    PTOKEN_PRIVILEGES TokenPrivileges = NULL;
     TOKEN_DEFAULT_DACL TokenDefaultDacl;
     LARGE_INTEGER ExpirationTime;
     LUID AuthenticationId;
@@ -603,10 +622,10 @@ LogonUserW(LPWSTR lpszUsername,
     PSID PrimaryGroupSid = NULL;
     PSID OwnerSid = NULL;
     PSID LocalSystemSid;
-    PACL Dacl;
-    NTSTATUS Status;
+    PACL Dacl = NULL;
     SID_IDENTIFIER_AUTHORITY SystemAuthority = {SECURITY_NT_AUTHORITY};
     unsigned i;
+    NTSTATUS Status = STATUS_SUCCESS;
 
     Qos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE);
     Qos.ImpersonationLevel = SecurityAnonymous;
@@ -641,11 +660,10 @@ LogonUserW(LPWSTR lpszUsername,
     /* Allocate and initialize token groups */
     TokenGroups = AllocateGroupSids(&PrimaryGroupSid,
                                     &OwnerSid);
-    if (NULL == TokenGroups)
+    if (TokenGroups == NULL)
     {
-        RtlFreeSid(UserSid);
-        SetLastError(ERROR_OUTOFMEMORY);
-        return FALSE;
+        Status = STATUS_INSUFFICIENT_RESOURCES;
+        goto done;
     }
 
     /* Allocate and initialize token privileges */
@@ -653,12 +671,10 @@ LogonUserW(LPWSTR lpszUsername,
                                       sizeof(TOKEN_PRIVILEGES)
                                     + sizeof(DefaultPrivs) / sizeof(DefaultPrivs[0])
                                       * sizeof(LUID_AND_ATTRIBUTES));
-    if (NULL == TokenPrivileges)
+    if (TokenPrivileges == NULL)
     {
-        FreeGroupSids(TokenGroups);
-        RtlFreeSid(UserSid);
-        SetLastError(ERROR_OUTOFMEMORY);
-        return FALSE;
+        Status = STATUS_INSUFFICIENT_RESOURCES;
+        goto done;
     }
 
     TokenPrivileges->PrivilegeCount = 0;
@@ -683,21 +699,13 @@ LogonUserW(LPWSTR lpszUsername,
     Dacl = RtlAllocateHeap(GetProcessHeap(), 0, 1024);
     if (Dacl == NULL)
     {
-        FreeGroupSids(TokenGroups);
-        RtlFreeSid(UserSid);
-        SetLastError(ERROR_OUTOFMEMORY);
-        return FALSE;
+        Status = STATUS_INSUFFICIENT_RESOURCES;
+        goto done;
     }
 
     Status = RtlCreateAcl(Dacl, 1024, ACL_REVISION);
     if (!NT_SUCCESS(Status))
-    {
-        RtlFreeHeap(GetProcessHeap(), 0, Dacl);
-        FreeGroupSids(TokenGroups);
-        RtlFreeHeap(GetProcessHeap(), 0, TokenPrivileges);
-        RtlFreeSid(UserSid);
-        return FALSE;
-    }
+        goto done;
 
     RtlAddAccessAllowedAce(Dacl,
                            ACL_REVISION,
@@ -754,10 +762,18 @@ LogonUserW(LPWSTR lpszUsername,
                            &TokenDefaultDacl,
                            &TokenSource);
 
-    RtlFreeHeap(GetProcessHeap(), 0, Dacl);
-    FreeGroupSids(TokenGroups);
-    RtlFreeHeap(GetProcessHeap(), 0, TokenPrivileges);
-    RtlFreeSid(UserSid);
+done:
+    if (Dacl != NULL)
+        RtlFreeHeap(GetProcessHeap(), 0, Dacl);
+
+    if (TokenGroups != NULL)
+        FreeGroupSids(TokenGroups);
+
+    if (TokenPrivileges != NULL)
+        RtlFreeHeap(GetProcessHeap(), 0, TokenPrivileges);
+
+    if (UserSid != NULL)
+        RtlFreeHeap(GetProcessHeap(), 0, UserSid);
 
     return NT_SUCCESS(Status);
 }
index 199b549..95811fb 100644 (file)
@@ -764,8 +764,8 @@ SampGetObjectAttributeString(PSAM_DB_OBJECT DbObject,
         goto done;
     }
 
-    String->Length = Length - sizeof(WCHAR);
-    String->MaximumLength = Length;
+    String->Length = (USHORT)(Length - sizeof(WCHAR));
+    String->MaximumLength = (USHORT)Length;
     String->Buffer = midl_user_allocate(Length);
     if (String->Buffer == NULL)
     {
index bcaba9c..826bdc7 100644 (file)
@@ -17,6 +17,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(samsrv);
 
 static SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
 
+
 /* FUNCTIONS ***************************************************************/
 
 VOID
@@ -3051,6 +3052,8 @@ done:
         Use->Count = 0;
     }
 
+    TRACE("Returned Status %lx\n", Status);
+
     return Status;
 }
 
@@ -3145,8 +3148,8 @@ SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle,
 
                     if (NT_SUCCESS(Status))
                     {
-                        Names->Element[i].MaximumLength = DataLength;
-                        Names->Element[i].Length = DataLength - sizeof(WCHAR);
+                        Names->Element[i].MaximumLength = (USHORT)DataLength;
+                        Names->Element[i].Length = (USHORT)(DataLength - sizeof(WCHAR));
 
                         Status = SampRegQueryValue(AccountKeyHandle,
                                                    L"Name",
@@ -3201,8 +3204,8 @@ SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle,
 
                     if (NT_SUCCESS(Status))
                     {
-                        Names->Element[i].MaximumLength = DataLength;
-                        Names->Element[i].Length = DataLength - sizeof(WCHAR);
+                        Names->Element[i].MaximumLength = (USHORT)DataLength;
+                        Names->Element[i].Length = (USHORT)(DataLength - sizeof(WCHAR));
 
                         Status = SampRegQueryValue(AccountKeyHandle,
                                                    L"Name",
@@ -3259,8 +3262,8 @@ SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle,
 
                     if (NT_SUCCESS(Status))
                     {
-                        Names->Element[i].MaximumLength = DataLength;
-                        Names->Element[i].Length = DataLength - sizeof(WCHAR);
+                        Names->Element[i].MaximumLength = (USHORT)DataLength;
+                        Names->Element[i].Length = (USHORT)(DataLength - sizeof(WCHAR));
 
                         Status = SampRegQueryValue(AccountKeyHandle,
                                                    L"Name",
@@ -4319,6 +4322,7 @@ done:
     return Status;
 }
 
+
 /* Function 34 */
 NTSTATUS
 NTAPI
@@ -4367,6 +4371,7 @@ SamrOpenUser(IN SAMPR_HANDLE DomainHandle,
     return STATUS_SUCCESS;
 }
 
+
 /* Function 35 */
 NTSTATUS
 NTAPI
@@ -4678,8 +4683,6 @@ done:
 }
 
 
-
-
 static
 NTSTATUS
 SampQueryUserAccount(PSAM_DB_OBJECT UserObject,
@@ -6283,6 +6286,7 @@ SamrCreateUser2InDomain(IN SAMPR_HANDLE DomainHandle,
     return Status;
 }
 
+
 /* Function 51 */
 NTSTATUS
 NTAPI
@@ -6299,16 +6303,35 @@ SamrQueryDisplayInformation3(IN SAMPR_HANDLE DomainHandle,
     return STATUS_NOT_IMPLEMENTED;
 }
 
+
 /* Function 52 */
 NTSTATUS
 NTAPI
 SamrAddMultipleMembersToAlias(IN SAMPR_HANDLE AliasHandle,
                               IN PSAMPR_PSID_ARRAY MembersBuffer)
 {
-    UNIMPLEMENTED;
-    return STATUS_NOT_IMPLEMENTED;
+    ULONG i;
+    NTSTATUS Status = STATUS_SUCCESS;
+
+    TRACE("SamrAddMultipleMembersToAlias(%p %p)\n",
+          AliasHandle, MembersBuffer);
+
+    for (i = 0; i < MembersBuffer->Count; i++)
+    {
+        Status = SamrAddMemberToAlias(AliasHandle,
+                                      ((PSID *)MembersBuffer->Sids)[i]);
+
+        if (Status == STATUS_MEMBER_IN_ALIAS)
+            Status = STATUS_SUCCESS;
+
+        if (!NT_SUCCESS(Status))
+            break;
+    }
+
+    return Status;
 }
 
+
 /* Function 53 */
 NTSTATUS
 NTAPI
index fed2772..28a1d4b 100644 (file)
@@ -224,6 +224,7 @@ SampCreateUserAccount(HKEY hDomainKey,
                       ULONG ulRelativeId)
 {
     SAM_USER_FIXED_DATA FixedUserData;
+    LPWSTR lpEmptyString = L"";
     DWORD dwDisposition;
     WCHAR szAccountKeyName[32];
     HKEY hAccountKey = NULL;
@@ -261,6 +262,62 @@ SampCreateUserAccount(HKEY hDomainKey,
                       (LPVOID)lpAccountName,
                       (wcslen(lpAccountName) + 1) * sizeof(WCHAR));
 
+        RegSetValueEx(hAccountKey,
+                      L"FullName",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"HomeDirectory",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"HomeDirectoryDrive",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"ScriptPath",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"ProfilePath",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"AdminComment",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"UserComment",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
+        RegSetValueEx(hAccountKey,
+                      L"WorkStations",
+                      0,
+                      REG_SZ,
+                      (LPVOID)lpEmptyString,
+                      sizeof(WCHAR));
+
         RegCloseKey(hAccountKey);
     }
 
index 242b591..1b8594f 100644 (file)
@@ -323,7 +323,7 @@ fail:
 static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon, DWORD dwFlags)
 {
     LPSIC_ENTRY lpsice;
-    INT ret, index, index1;
+    INT ret, index, index1, indexDPA;
     WCHAR path[MAX_PATH];
     TRACE("%s %i %p %p\n", debugstr_w(sSourceFile), dwSourceIndex, hSmallIcon ,hBigIcon);
 
@@ -338,8 +338,8 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI
 
     EnterCriticalSection(&SHELL32_SicCS);
 
-    index = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice);
-    if ( INVALID_INDEX == index )
+    indexDPA = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice);
+    if ( -1 == indexDPA )
     {
         ret = INVALID_INDEX;
         goto leave;
@@ -370,6 +370,7 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI
 leave:
     if(ret == INVALID_INDEX)
     {
+        if(indexDPA != -1) DPA_DeletePtr(sic_hdpa, indexDPA);
         HeapFree(GetProcessHeap(), 0, lpsice->sSourceFile);
         SHFree(lpsice);
     }
index 6ba3007..3163b87 100644 (file)
@@ -92,7 +92,8 @@ MouHid_GetButtonMove(
 VOID
 MouHid_GetButtonFlags(
     IN PMOUHID_DEVICE_EXTENSION DeviceExtension,
-    OUT PUSHORT ButtonFlags)
+    OUT PUSHORT ButtonFlags,
+    OUT PUSHORT Flags)
 {
     NTSTATUS Status;
     USAGE Usage;
@@ -102,6 +103,7 @@ MouHid_GetButtonFlags(
 
     /* init flags */
     *ButtonFlags = 0;
+    *Flags = 0;
 
     /* get usages */
     CurrentUsageListLength = DeviceExtension->UsageListLength;
@@ -170,7 +172,7 @@ MouHid_GetButtonFlags(
     if (DeviceExtension->MouseAbsolute)
     {
         // mouse operates absolute
-        *ButtonFlags |= MOUSE_MOVE_ABSOLUTE;
+        *Flags |= MOUSE_MOVE_ABSOLUTE;
     }
 }
 
@@ -212,6 +214,7 @@ MouHid_ReadCompletion(
     NTSTATUS Status;
     LONG LastX, LastY;
     MOUSE_INPUT_DATA MouseInputData;
+    USHORT Flags;
 
     /* get device extension */
     DeviceExtension = (PMOUHID_DEVICE_EXTENSION)Context;
@@ -239,13 +242,14 @@ MouHid_ReadCompletion(
     MouHid_GetButtonMove(DeviceExtension, &LastX, &LastY);
 
     /* get mouse change flags */
-    MouHid_GetButtonFlags(DeviceExtension, &ButtonFlags);
+    MouHid_GetButtonFlags(DeviceExtension, &ButtonFlags, &Flags);
 
     /* init input data */
     RtlZeroMemory(&MouseInputData, sizeof(MOUSE_INPUT_DATA));
 
     /* init input data */
     MouseInputData.ButtonFlags = ButtonFlags;
+    MouseInputData.Flags = Flags;
     MouseInputData.LastX = LastX;
     MouseInputData.LastY = LastY;
 
index 65c529c..ff56169 100644 (file)
@@ -1133,7 +1133,7 @@ CreateUsbChildDeviceObject(
     ULONG ChildDeviceCount, UsbDeviceNumber = 0;
     WCHAR CharDeviceName[64];
     UNICODE_STRING DeviceName;
-    ULONG ConfigDescSize, DeviceDescSize;
+    ULONG ConfigDescSize, DeviceDescSize, DeviceInfoSize;
     PVOID HubInterfaceBusContext;
     USB_CONFIGURATION_DESCRIPTOR ConfigDesc;
 
@@ -1313,6 +1313,14 @@ CreateUsbChildDeviceObject(
         goto Cleanup;
     }
 
+    // query device details
+    Status = HubInterface->QueryDeviceInformation(HubInterfaceBusContext, 
+                                         UsbChildExtension->UsbDeviceHandle,
+                                         &UsbChildExtension->DeviceInformation,
+                                         sizeof(USB_DEVICE_INFORMATION_0),
+                                         &DeviceInfoSize);
+
+
     //DumpFullConfigurationDescriptor(UsbChildExtension->FullConfigDesc);
 
     //
@@ -2047,8 +2055,183 @@ USBHUB_FdoHandleDeviceControl(
     IN PDEVICE_OBJECT DeviceObject,
     IN PIRP Irp)
 {
-    DPRINT1("FdoHandleDeviceControl\n");
-    UNIMPLEMENTED
-    return STATUS_NOT_IMPLEMENTED;
+    PIO_STACK_LOCATION IoStack;
+    NTSTATUS Status = STATUS_NOT_IMPLEMENTED;
+    PUSB_NODE_INFORMATION NodeInformation;
+    PHUB_DEVICE_EXTENSION HubDeviceExtension;
+    PUSB_NODE_CONNECTION_INFORMATION NodeConnectionInfo;
+    PHUB_CHILDDEVICE_EXTENSION ChildDeviceExtension;
+    PUSB_NODE_CONNECTION_DRIVERKEY_NAME NodeKey;
+    PUSB_NODE_CONNECTION_NAME ConnectionName;
+    ULONG Index, Length;
+
+    // get stack location
+    IoStack = IoGetCurrentIrpStackLocation(Irp);
+
+    // get device extension
+    HubDeviceExtension = (PHUB_DEVICE_EXTENSION) DeviceObject->DeviceExtension;
+
+    if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_USB_GET_NODE_INFORMATION)
+    {
+        // is the buffer big enough
+        if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(USB_NODE_INFORMATION))
+        {
+            // buffer too small
+            Status = STATUS_BUFFER_TOO_SMALL;
+        }
+        else
+        {
+            // get buffer
+            NodeInformation = (PUSB_NODE_INFORMATION)Irp->AssociatedIrp.SystemBuffer;
+
+            // sanity check
+            ASSERT(NodeInformation);
+
+            // init buffer
+            NodeInformation->NodeType = UsbHub;
+            RtlCopyMemory(&NodeInformation->u.HubInformation.HubDescriptor, &HubDeviceExtension->HubDescriptor, sizeof(USB_HUB_DESCRIPTOR));
+
+            // FIXME is hub powered
+            NodeInformation->u.HubInformation.HubIsBusPowered = TRUE;
+
+            // done
+            Irp->IoStatus.Information = sizeof(USB_NODE_INFORMATION);
+            Status = STATUS_SUCCESS;
+        }
+
+
+    }
+    else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_USB_GET_NODE_CONNECTION_INFORMATION)
+    {
+        if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(USB_NODE_CONNECTION_INFORMATION))
+        {
+            // buffer too small
+            Status = STATUS_BUFFER_TOO_SMALL;
+        }
+        else
+        {
+            // get node connection info
+            NodeConnectionInfo = (PUSB_NODE_CONNECTION_INFORMATION)Irp->AssociatedIrp.SystemBuffer;
+
+            // sanity checks
+            ASSERT(NodeConnectionInfo);
+
+            for(Index = 0; Index < USB_MAXCHILDREN; Index++)
+            {
+                if (HubDeviceExtension->ChildDeviceObject[Index] == NULL)
+                    continue;
+
+                // get child device extension
+                ChildDeviceExtension = (PHUB_CHILDDEVICE_EXTENSION)HubDeviceExtension->ChildDeviceObject[Index]->DeviceExtension;
+
+                if (ChildDeviceExtension->PortNumber != NodeConnectionInfo->ConnectionIndex)
+                   continue;
+
+                // init node connection info
+                RtlCopyMemory(&NodeConnectionInfo->DeviceDescriptor, &ChildDeviceExtension->DeviceDesc, sizeof(USB_DEVICE_DESCRIPTOR));
+                NodeConnectionInfo->CurrentConfigurationValue = ChildDeviceExtension->FullConfigDesc->bConfigurationValue;
+                NodeConnectionInfo->DeviceIsHub = FALSE; //FIXME support hubs
+                NodeConnectionInfo->LowSpeed = ChildDeviceExtension->DeviceInformation.DeviceSpeed == UsbLowSpeed;
+                NodeConnectionInfo->DeviceAddress = ChildDeviceExtension->DeviceInformation.DeviceAddress;
+                NodeConnectionInfo->NumberOfOpenPipes = ChildDeviceExtension->DeviceInformation.NumberOfOpenPipes;
+                NodeConnectionInfo->ConnectionStatus = DeviceConnected; //FIXME
+
+                if (NodeConnectionInfo->NumberOfOpenPipes)
+                {
+                    DPRINT1("Need to copy pipe information\n");
+                }
+                break;
+            }
+            // done
+            Irp->IoStatus.Information = sizeof(USB_NODE_INFORMATION);
+            Status = STATUS_SUCCESS;
+        }
+    }
+    else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME)
+    {
+        if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(USB_NODE_CONNECTION_INFORMATION))
+        {
+            // buffer too small
+            Status = STATUS_BUFFER_TOO_SMALL;
+        }
+        else
+        {
+            // get node connection info
+            NodeKey = (PUSB_NODE_CONNECTION_DRIVERKEY_NAME)Irp->AssociatedIrp.SystemBuffer;
+
+            // sanity checks
+            ASSERT(NodeKey);
+
+            for(Index = 0; Index < USB_MAXCHILDREN; Index++)
+            {
+                if (HubDeviceExtension->ChildDeviceObject[Index] == NULL)
+                    continue;
+
+                // get child device extension
+                ChildDeviceExtension = (PHUB_CHILDDEVICE_EXTENSION)HubDeviceExtension->ChildDeviceObject[Index]->DeviceExtension;
+
+                if (ChildDeviceExtension->PortNumber != NodeKey->ConnectionIndex)
+                   continue;
+
+                // get driver key
+                Status = IoGetDeviceProperty(HubDeviceExtension->ChildDeviceObject[Index], DevicePropertyDriverKeyName,
+                                             IoStack->Parameters.DeviceIoControl.OutputBufferLength - sizeof(USB_NODE_CONNECTION_DRIVERKEY_NAME),
+                                             NodeKey->DriverKeyName,
+                                             &Length);
+
+                if (Status == STATUS_BUFFER_TOO_SMALL)
+                {
+                    // normalize status
+                    Status = STATUS_SUCCESS;
+                }
+
+                if (Length + sizeof(USB_NODE_CONNECTION_DRIVERKEY_NAME) > IoStack->Parameters.DeviceIoControl.OutputBufferLength)
+                {
+                    // terminate node key name
+                    NodeKey->DriverKeyName[0] = UNICODE_NULL;
+                    Irp->IoStatus.Information = sizeof(USB_NODE_CONNECTION_DRIVERKEY_NAME);
+                }
+                else
+                {
+                    // result size
+                    Irp->IoStatus.Information = Length + sizeof(USB_NODE_CONNECTION_DRIVERKEY_NAME);
+                }
+
+                // length of driver name
+                NodeKey->ActualLength = Length + sizeof(USB_NODE_CONNECTION_DRIVERKEY_NAME);
+                break;
+            }
+        }
+    }
+    else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_USB_GET_NODE_CONNECTION_NAME)
+    {
+        if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(USB_NODE_CONNECTION_NAME))
+        {
+            // buffer too small
+            Status = STATUS_BUFFER_TOO_SMALL;
+        }
+        else
+        {
+            // FIXME support hubs
+            ConnectionName = (PUSB_NODE_CONNECTION_NAME)Irp->AssociatedIrp.SystemBuffer;
+            ConnectionName->ActualLength = 0;
+            ConnectionName->NodeName[0] = UNICODE_NULL;
+
+            // done
+            Irp->IoStatus.Information = sizeof(USB_NODE_CONNECTION_NAME);
+            Status = STATUS_SUCCESS;
+        }
+    }
+    else
+    {
+        DPRINT1("UNIMPLEMENTED FdoHandleDeviceControl IoCtl %x InputBufferLength %x OutputBufferLength %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, 
+           IoStack->Parameters.DeviceIoControl.InputBufferLength, IoStack->Parameters.DeviceIoControl.OutputBufferLength);
+    }
+
+    // finish irp
+    Irp->IoStatus.Status = Status;
+    IoCompleteRequest(Irp, IO_NO_INCREMENT);
+
+    return Status;
 }
 
index 5e14a97..f34c4e4 100644 (file)
@@ -184,8 +184,39 @@ USBHUB_DispatchPower(
     PDEVICE_OBJECT DeviceObject,
     PIRP Irp)
 {
+    PIO_STACK_LOCATION IoStack;
+
+    IoStack = IoGetCurrentIrpStackLocation(Irp);
+    DPRINT1("Power Function %x\n", IoStack->MinorFunction);
+
+    if (IoStack->MinorFunction == IRP_MN_SET_POWER)
+    {
+        PoStartNextPowerIrp(Irp);
+        Irp->IoStatus.Status = STATUS_SUCCESS;
+        IoCompleteRequest(Irp, IO_NO_INCREMENT);
+        return STATUS_SUCCESS;
+
+    }
+    else if (IoStack->MinorFunction == IRP_MN_QUERY_POWER)
+    {
+        PoStartNextPowerIrp(Irp);
+        Irp->IoStatus.Status = STATUS_SUCCESS;
+        IoCompleteRequest(Irp, IO_NO_INCREMENT);
+        return STATUS_SUCCESS;
+
+    }
+    else if (IoStack->MinorFunction == IRP_MN_WAIT_WAKE)
+    {
+        PoStartNextPowerIrp(Irp);
+        Irp->IoStatus.Status = STATUS_SUCCESS;
+        IoCompleteRequest(Irp, IO_NO_INCREMENT);
+        return STATUS_SUCCESS;
+    }
+
+    PoStartNextPowerIrp(Irp);
+    Irp->IoStatus.Status = STATUS_SUCCESS;
     IoCompleteRequest(Irp, IO_NO_INCREMENT);
-    return STATUS_NOT_SUPPORTED;
+    return STATUS_SUCCESS;
 }
 
 VOID
index 52d62e2..ab49ced 100644 (file)
@@ -68,6 +68,7 @@ typedef struct _HUB_CHILDDEVICE_EXTENSION
     PUSB_CONFIGURATION_DESCRIPTOR FullConfigDesc;
     UNICODE_STRING SymbolicLinkName;
     USB_BUS_INTERFACE_USBDI_V2 DeviceInterface;
+    USB_DEVICE_INFORMATION_0 DeviceInformation;
 } HUB_CHILDDEVICE_EXTENSION, *PHUB_CHILDDEVICE_EXTENSION;
 
 typedef struct _HUB_DEVICE_EXTENSION
index 8a11d82..8883591 100644 (file)
@@ -174,11 +174,13 @@ USBSTOR_HandleInternalDeviceControl(
         {
             DPRINT1("SRB_FUNCTION_FLUSH / SRB_FUNCTION_FLUSH_QUEUE / SRB_FUNCTION_SHUTDOWN\n");
 
+            // HACK: don't flush pending requests
+#if 0       // we really need a proper storage stack
             //
             // wait for pending requests to finish
             //
             USBSTOR_QueueWaitForPendingRequests(PDODeviceExtension->LowerDeviceObject);
-
+#endif
             //
             // set status success
             //
index ee77899..c02ee04 100644 (file)
@@ -630,11 +630,10 @@ HidParser_GetUsageValueWithReport(
         ASSERT(ReportItem->ByteOffset < ReportDescriptorLength);
 
         //
-        // one extra shift for skipping the prepended report id
+        // FIXME: support items with variable bitlength
         //
-        Data = 0;
-        Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset +1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
-        //Data = ReportDescriptor[ReportItem->ByteOffset + 1];
+        ASSERT(ReportItem->BitCount == 16);
+        Data = (ReportDescriptor[ReportItem->ByteOffset +1] & 0xFF) | (ReportDescriptor[ReportItem->ByteOffset +2] & 0xFF) << 8;
 
         //
         // shift data
index 3ccb9ba..b174e20 100644 (file)
@@ -21,6 +21,7 @@ typedef struct _REQUEST_POWER_ITEM
     PREQUEST_POWER_COMPLETE CompletionRoutine;
     POWER_STATE PowerState;
     PVOID Context;
+    PDEVICE_OBJECT TopDeviceObject;
 } REQUEST_POWER_ITEM, *PREQUEST_POWER_ITEM;
 
 typedef struct _POWER_STATE_TRAVERSE_CONTEXT
@@ -56,10 +57,10 @@ PopRequestPowerIrpCompletion(IN PDEVICE_OBJECT DeviceObject,
                                         RequestPowerItem->Context,
                                         &Irp->IoStatus);
 
-    ExFreePool(Context);
-
     IoFreeIrp(Irp);
-    ObDereferenceObject(DeviceObject);
+
+    ObDereferenceObject(RequestPowerItem->TopDeviceObject);
+    ExFreePool(Context);
 
     return STATUS_MORE_PROCESSING_REQUIRED;
 }
@@ -573,6 +574,7 @@ PoRequestPowerIrp(IN PDEVICE_OBJECT DeviceObject,
     RequestPowerItem->CompletionRoutine = CompletionFunction;
     RequestPowerItem->PowerState = PowerState;
     RequestPowerItem->Context = Context;
+    RequestPowerItem->TopDeviceObject = TopDeviceObject;
   
     if (pIrp != NULL)
         *pIrp = Irp;
index b0f8732..3a0e963 100644 (file)
@@ -56,7 +56,8 @@ typedef enum _USER_OBJECT_TYPE
   otHidData,
   otDeviceInfo,
   otTouchInput,
-  otGestureInfo
+  otGestureInfo,
+  USER_HANDLE_TYPE_COUNT
 } USER_OBJECT_TYPE;
 
 typedef enum _USERTHREADINFOCLASS
index 6b9a5ed..92217d6 100644 (file)
@@ -26,6 +26,7 @@ PSERVERINFO gpsi = NULL; // Global User Server Information.
 
 SHORT gusLanguageID;
 PPROCESSINFO ppiScrnSaver;
+PPROCESSINFO gppiList = NULL;
 
 extern ULONG_PTR Win32kSSDT[];
 extern UCHAR Win32kSSPT[];
@@ -55,7 +56,7 @@ APIENTRY
 Win32kProcessCallback(struct _EPROCESS *Process,
                       BOOLEAN Create)
 {
-    PPROCESSINFO ppiCurrent;
+    PPROCESSINFO ppiCurrent, *pppi;
     DECLARE_RETURN(NTSTATUS);
 
     ASSERT(Process->Peb);
@@ -160,6 +161,10 @@ Win32kProcessCallback(struct _EPROCESS *Process,
         ASSERT(ppiCurrent->pPoolDcAttr);
         ASSERT(ppiCurrent->pPoolBrushAttr);
         ASSERT(ppiCurrent->pPoolRgnAttr);
+
+        /* Add the process to the global list */
+        ppiCurrent->ppiNext = gppiList;
+        gppiList = ppiCurrent;
     }
     else
     {
@@ -212,11 +217,25 @@ Win32kProcessCallback(struct _EPROCESS *Process,
 
         if (gppiInputProvider == ppiCurrent) gppiInputProvider = NULL;
 
+        pppi = &gppiList;
+        while (*pppi != NULL && *pppi != ppiCurrent)
+            pppi = &(*pppi)->ppiNext;
+
+        ASSERT(*pppi == ppiCurrent);
+
+        *pppi = ppiCurrent->ppiNext;
+
         TRACE_CH(UserProcess,"Freeing ppi 0x%p\n", ppiCurrent);
 
         /* Ftee the PROCESSINFO */
         PsSetProcessWin32Process(Process, NULL);
         ExFreePoolWithTag(ppiCurrent, USERTAG_PROCESSINFO);
+#if DBG
+        if (DBG_IS_CHANNEL_ENABLED(ppiCurrent, DbgChUserObj, WARN_LEVEL))
+        {
+            DbgUserDumpHandleTable();
+        }
+#endif
     }
 
     RETURN( STATUS_SUCCESS);
index b45a2d0..aab3ba3 100644 (file)
@@ -12,6 +12,7 @@
 extern BOOL gbInitialized;
 extern PSERVERINFO gpsi;
 extern PTHREADINFO gptiCurrent;
+extern PPROCESSINFO gppiList;
 extern PPROCESSINFO ppiScrnSaver;
 extern PPROCESSINFO gppiInputProvider;
 
index fdb318d..375e3bf 100644 (file)
@@ -12,6 +12,66 @@ DBG_DEFAULT_CHANNEL(UserObj);
 //int usedHandles=0;
 PUSER_HANDLE_TABLE gHandleTable = NULL;
 
+#if DBG
+
+void DbgUserDumpHandleTable()
+{
+    int HandleCounts[USER_HANDLE_TYPE_COUNT];
+    PPROCESSINFO ppiList;
+    int i;
+    PWCHAR TypeNames[] = {L"Free",L"Window",L"Menu", L"CursorIcon", L"SMWP", L"Hook", L"ClipBoardData", L"CallProc",
+                          L"Accel", L"DDEaccess", L"DDEconv", L"DDExact", L"Monitor", L"KBDlayout", L"KBDfile",
+                          L"Event", L"Timer", L"InputContext", L"HidData", L"DeviceInfo", L"TouchInput",L"GestureInfo"};
+
+    ERR("Total handles count: %d\n", gpsi->cHandleEntries);
+
+    memset(HandleCounts, 0, sizeof(HandleCounts));
+
+    /* First of all count the number of handles per tpe */
+    ppiList = gppiList;
+    while (ppiList)
+    {
+        ERR("Process %s (%d) handles count: %d\n\t", ppiList->peProcess->ImageFileName, ppiList->peProcess->UniqueProcessId, ppiList->UserHandleCount);
+
+        for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++)
+        {
+            HandleCounts[i] += ppiList->DbgHandleCount[i];
+
+            DbgPrint("%S: %d, ", TypeNames[i], ppiList->DbgHandleCount[i]);
+            if (i % 6 == 0)
+                DbgPrint("\n\t");
+        }
+        DbgPrint("\n");
+
+        ppiList = ppiList->ppiNext;
+    }
+
+    /* Print total type counts */
+    ERR("Total handles of the running processes: \n\t");
+    for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++)
+    {
+        DbgPrint("%S: %d, ", TypeNames[i], HandleCounts[i]);
+        if (i % 6 == 0)
+            DbgPrint("\n\t");
+    }
+    DbgPrint("\n");
+
+    /* Now count the handle counts that are allocated from the handle table */
+    memset(HandleCounts, 0, sizeof(HandleCounts));
+    for (i = 0; i < gHandleTable->nb_handles; i++)
+         HandleCounts[gHandleTable->handles[i].type]++;
+
+    ERR("Total handles count allocated: \n\t");
+    for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++)
+    {
+        DbgPrint("%S: %d, ", TypeNames[i], HandleCounts[i]);
+        if (i % 6 == 0)
+            DbgPrint("\n\t");
+    }
+    DbgPrint("\n");
+}
+
+#endif
 
 PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle )
 {
@@ -51,55 +111,12 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
 
    if (ht->nb_handles >= ht->allocated_handles)  /* Need to grow the array */
    {
-/**/
-      int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0,
-          iHook = 0, iCallProc = 0, iAccel = 0, iMonitor = 0, iTimer = 0, iEvent = 0, iSMWP = 0;
- /**/
-      ERR("Out of user handles! Used -> %i, NM_Handle -> %d\n", gpsi->cHandleEntries, ht->nb_handles);
-//#if 0
-      for(i = 0; i < ht->nb_handles; i++)
-      {
-         switch (ht->handles[i].type)
-         {
-           case otFree: // Should be zero.
-            iFree++;
-            break;
-           case otWindow:
-            iWindow++;
-            break;
-           case otMenu:
-            iMenu++;
-            break;
-           case otCursorIcon:
-            iCursorIcon++;
-            break;
-           case otHook:
-            iHook++;
-            break;
-           case otCallProc:
-            iCallProc++;
-            break;
-           case otAccel:
-            iAccel++;
-            break;
-           case otMonitor:
-            iMonitor++;
-            break;
-           case otTimer:
-            iTimer++;
-            break;
-           case otEvent:
-            iEvent++;
-            break;
-           case otSMWP:
-            iSMWP++;
-           default:
-            break;
-         }
-      }
-      ERR("Handle Count by Type:\n Free = %d Window = %d Menu = %d CursorIcon = %d Hook = %d\n CallProc = %d Accel = %d Monitor = %d Timer = %d Event = %d SMWP = %d\n",
-      iFree, iWindow, iMenu, iCursorIcon, iHook, iCallProc, iAccel, iMonitor, iTimer, iEvent, iSMWP );
-//#endif
+       ERR("Out of user handles! Used -> %i, NM_Handle -> %d\n", gpsi->cHandleEntries, ht->nb_handles);
+
+#if DBG
+       DbgUserDumpHandleTable();
+#endif
+
       return NULL;
 #if 0
       PUSER_HANDLE_ENTRY new_handles;
@@ -138,6 +155,11 @@ __inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY
 {
    PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
    void *ret;
+
+#if DBG
+   ppi->DbgHandleCount[entry->type]--;
+#endif
+
    ret = entry->ptr;
    entry->ptr  = ht->freelist;
    entry->type = 0;
@@ -261,11 +283,11 @@ void *get_user_object_handle(PUSER_HANDLE_TABLE ht,  HANDLE* handle, USER_OBJECT
 
 BOOL FASTCALL UserCreateHandleTable(VOID)
 {
-
    PVOID mem;
+   INT HandleCount = 1024 * 4;
 
    // FIXME: Don't alloc all at once! Must be mapped into umode also...
-   mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
+   mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * HandleCount);
    if (!mem)
    {
       ERR("Failed creating handle table\n");
@@ -281,7 +303,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
    }
 
    // FIXME: Make auto growable
-   UserInitHandleTable(gHandleTable, mem, sizeof(USER_HANDLE_ENTRY) * 1024*2);
+   UserInitHandleTable(gHandleTable, mem, sizeof(USER_HANDLE_ENTRY) * HandleCount);
 
    return TRUE;
 }
@@ -339,6 +361,10 @@ UserCreateObject( PUSER_HANDLE_TABLE ht,
       return NULL;
    }
 
+#if DBG
+   ppi->DbgHandleCount[type]++;
+#endif
+
    RtlZeroMemory(Object, size);
 
    switch (type)
index eabc655..cad7ce2 100644 (file)
@@ -39,6 +39,7 @@ PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type
 PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, USER_OBJECT_TYPE);
 BOOL FASTCALL UserCreateHandleTable(VOID);
 BOOL FASTCALL UserObjectInDestroy(HANDLE);
+void DbgUserDumpHandleTable();
 
 static __inline VOID
 UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
index a6290e6..4bec70a 100644 (file)
@@ -195,6 +195,7 @@ typedef struct _PROCESSINFO
   PTHREADINFO ptiList;
   PTHREADINFO ptiMainThread;
   struct _DESKTOP* rpdeskStartup;
+  PPROCESSINFO ppiNext;
   PCLS pclsPrivateList;
   PCLS pclsPublicList;
   INT cThreads;
@@ -224,6 +225,7 @@ typedef struct _PROCESSINFO
 
 #if DBG
   BYTE DbgChannelLevel[DbgChCount];
+  DWORD DbgHandleCount[USER_HANDLE_TYPE_COUNT];
 #endif
 } PROCESSINFO;
 
index 83de71a..d26c4c1 100644 (file)
 
     #define DBG_ENABLE_CHANNEL(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] |= level)
     #define DBG_DISABLE_CHANNEL(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] &= ~level)
-    #define DBG_IS_CHANNEL_ENABLED(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] & level)
+    #define DBG_IS_CHANNEL_ENABLED(ppi,ch,level) (((ppi)->DbgChannelLevel[ch] & level) == level)
 
     #define DBG_PRINT(ppi,ch,level,fmt, ...)  do {                            \
     if((level == ERR_LEVEL) || (ppi && DBG_IS_CHANNEL_ENABLED(ppi,ch,level))) \