code:
--- a/tests/fixtures/reftests/svg1.1/masking-intro-01-f.svg
+++ /dev/null
@@ -1,81 +0,0 @@
-<svg version="1.1" baseProfile="full" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="CL" author="BB" status="accepted"
-    version="$Revision: 1.6 $" testname="$RCSfile: masking-intro-01-f.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#Introduction">
-

-        The rules are different regarding the geometry of a shape when clipping and masking.
-        For example, a clip-path does not take into account the stroke of the shape used for clipping.
-        It is however, used when masking.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        The test is passed if there are two identical darkblue circles at the top of the illustration, and
-        below those two circles, two more circles should appear. They are of lighter appearance,
-        the one on the left has a darker and thick stroke.
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-intro-01-f.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <g shape-rendering="geometricPrecision">
-      <title id="test-title">masking-mask-04-f.svg</title>
-      <desc id="test-desc">Tests the impact of strokes within clipPath and mask</desc>
-      <text font-size="18" x="240" y="35" text-anchor="middle">Testing stroke inclusion for 'clip-path' and 'mask'</text>
-
-      <defs>
-        <clipPath id="one" clipPathUnits="objectBoundingBox">
-          <circle cx="0.3" cy="0.5" r="0.2" stroke-width="0.15" fill="none" stroke="red"/>
-          <circle cx="0.7" cy="0.5" r="0.2" stroke-width="0.15" fill="none" stroke="none"/>
-        </clipPath>
-      </defs>
-
-      <rect x="150" y="0" width="200" height="200" fill="darkblue" clip-path="url(#one)"/>
-      <text x="50" y="110">With a 'clip-path':</text>
-
-      <defs>
-        <mask id="two" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox" color-interpolation="linearRGB">
-          <circle cx="0.3" cy="0.5" r="0.2" stroke-width="0.15" fill="blue" stroke="red"/>
-          <circle cx="0.7" cy="0.5" r="0.2" stroke-width="0.15" fill="blue" stroke="none"/>
-        </mask>
-      </defs>
-
-      <rect x="150" y="150" width="200" height="200" fill="darkblue" mask="url(#two)"/>
-      <text x="50" y="260">With a 'mask':</text>
-    </g>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/masking-mask-01-b.svg
+++ /dev/null
@@ -1,131 +0,0 @@
-<svg version="1.1" baseProfile="basic" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
-    version="$Revision: 1.8 $" testname="$RCSfile: masking-mask-01-b.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#Masking">
-

-        Test to see if the masking features using the mask element and mask
-        property are available.
-

-

-        A red rectangle is displayed in the background to help view the result
-        of transparency and masking.
-

-

-        From top to bottom, the tests are as follows.
-

-

-        In the top test, a linear gradient is used inside the mask to change the opacity
-        of the rectangle from 1.0 (at the top) to 0.5 (at the bottom).
-

-

-        In the second test, a simple 50% opaque rectangle is used as a mask.
-

-

-        In the third test, no mask is used, but a rectangle is shown with 50% opacity.
-        The second and third test should look the same.
-

-

-        Lastly, a string of text has a mask applied to it. The mask only covers a partial
-        area of the text, so the text should only be half visible. Also the mask consists
-        of 4 rectangles with various levels of opacity.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        The rendered picture should match the reference image, except
-        variations are possible in the labelling text (per CSS2 rules).
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-mask-01-b.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-
-    <defs>
-
-
-
-        <missing-glyph horiz-adv-x="500" d="M63 0V700H438V0H63ZM125 63H375V638H125V63Z"/>
-        <glyph unicode="S" glyph-name="S" horiz-adv-x="385" d="M371 1H29V144H264Q264 151 264 166Q265 180 265 188Q265 212 249 212H132Q83 212 55 247Q29 279 29 329V566H335V422H136V375Q136 360 144 356Q148 355 168 355H279Q327 355 352 309Q371 273 371 221V1Z"/>
-        <glyph unicode="V" glyph-name="V" horiz-adv-x="351" d="M365 563L183 -33L0 563H101L183 296L270 563H365Z"/>
-        <glyph unicode="G" glyph-name="G" horiz-adv-x="367" d="M355 1H18V564H355V420H125V144H248V211H156V355H355V1Z"/>
-        <hkern g1="V" g2="G" k="-40"/>
-
-    </defs>
-    <g font-family="SVGFreeSansASCII,sans-serif">
-    <text font-size="14" x="10" y="20">Test for mask support</text>
-
-    <rect x="10" y="30" width="100" height="260" fill="red"/>
-
-    <mask id="mask1" maskUnits="userSpaceOnUse" x="60" y="50" width="100" height="60" color-interpolation="linearRGB">
-      <defs>
-        <linearGradient gradientUnits="userSpaceOnUse" id="Grad1" x1="60" y1="50" x2="60" y2="120">
-          <stop stop-color="white" stop-opacity="1" offset="0"/>
-          <stop stop-color="white" stop-opacity="0.5" offset="1"/>
-        </linearGradient>
-      </defs>
-      <rect x="60" y="50" width="100" height="60" fill="url(#Grad1)"/>
-    </mask>
-    <rect x="60" y="50" width="100" height="60" fill="lime" mask="url(#mask1)"/>
-    <text font-size="12" x="200" y="65">Mask with linear gradient from</text>
-    <text font-size="12" x="200" y="80">opacity=1 to opactity=0.5</text>
-
-    <mask id="mask2" maskUnits="userSpaceOnUse" x="60" y="120" width="100" height="30" color-interpolation="linearRGB">
-      <rect x="60" y="120" width="100" height="30" fill-opacity="0.5" fill="white"/>
-    </mask>
-    <rect x="60" y="120" width="100" height="30" fill="lime" mask="url(#mask2)"/>
-    <text font-size="12" x="200" y="135">Mask with uniform opacity of 0.5</text>
-
-    <rect x="60" y="160" width="100" height="30" fill="lime" fill-opacity="0.5"/>
-    <text font-size="12" x="200" y="175">Rectangle with uniform opacity of 0.5</text>
-
-    <mask id="mask3" maskUnits="userSpaceOnUse" x="60" y="200" width="200" height="100" color-interpolation="linearRGB">
-      <rect x="60" y="200" width="200" height="25" fill="white" fill-opacity="0.5"/>
-      <rect x="60" y="225" width="200" height="25" fill="white" fill-opacity="0.2"/>
-      <rect x="60" y="250" width="200" height="25" fill="white" fill-opacity="1"/>
-      <rect x="60" y="275" width="200" height="25" fill="white" fill-opacity="0.7"/>
-    </mask>
-    <text x="60" y="280" font-family="larabie-anglepoise" font-size="110" fill="lime" mask="url(#mask3)">SVG</text>
-    <text  font-size="12" x="200" y="225">Text with mask containing rectangles</text>
-    <text  font-size="12" x="200" y="240">of various opacities</text>
-    </g>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/masking-mask-02-f.svg
+++ /dev/null
@@ -1,50 +0,0 @@
-<svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4" reviewer="CL" author="Microsoft" status="accepted" version="$Revision: 1.3 $" testname="$RCSfile: masking-mask-02-f.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://dev.w3.org/SVG/profiles/1.1F2/publish/masking.html#Masking">
-

-        If the 'mask' property references a 'mask' element containing no children, the element referencing it is not rendered.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-
Run the test. No interaction required.

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        Test passes if there is a single green rectangle, with no red visible on the page.
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-mask-02-f.svg,v $</title>
-    <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <mask id="testMask" />
-    <rect x="100" y="100" width="250" height="150" fill="green" />
-    <rect x="100" y="100" width="250" height="150" fill="red" mask="url(#testMask)" />
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none"
-      fill="black">$Revision: 1.3 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
-
-</svg>
\ No newline at end of file
--- a/tests/fixtures/reftests/svg1.1/masking-opacity-01-b.svg
+++ /dev/null
@@ -1,125 +0,0 @@
-<svg version="1.1" baseProfile="basic" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
-    version="$Revision: 1.6 $" testname="$RCSfile: masking-opacity-01-b.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#ObjectAndGroupOpacityProperties">
-

-        Test to see the effect of applying an opacity property to a group.
-

-

-        A blue rectangle with a green rectangle on top are contained in a
-        group. This opacity of the group and the opacity of the rectangles are
-        changed in this test. A red rectangle is provided in the background so
-        that opacity changes are obvious visually.
-

-

-        From top to bottom, the tests are as follows.
-

-

-        In the top test, the opacities of the group and the individual rectangles are
-        all set to 1.
-

-

-        In the second test, the group is given an opacity of 0.5.
-

-

-        In the third test, the group maintains a group opacity of 1 whereas each individual
-        rectangle is given an opacity of 0.5 in the group.
-

-

-        Lastly, the group and individual rectangles are all given an opacity of 0.5.
-

-
-
-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        In the top test, the green rectangle should appear on top of the blue
-        rectangle.
-

-

-        In the second test, the blue
-        rectangle should not show through in the region where the green and blue overlap.
-

-

-        In the third test, the blue rectangle
-        should show through in the overlap region.
-

-

-        Lastly, the
-        result should be similar to the previous test only fainter (because the opacity) is
-        resulting in less contribution.
-

-

-        The rendered picture should match the reference image exactly, except for possible
-        variations in the labelling text (per CSS2 rules).
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-opacity-01-b.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <text font-size="24" x="50" y="27">Test for opacity property on a group.</text>
-    <rect x="10" y="30" width="100" height="260" fill="red"/>
-    <g opacity="1">
-      <rect x="60" y="50" width="80" height="40" fill="blue"/>
-      <rect x="70" y="60" width="80" height="40" fill="lime"/>
-    </g>
-    <text font-size="20" x="200" y="62">Group opacity: 1</text>
-    <text font-size="20" x="200" y="80">Blue rectangle opacity: 1</text>
-    <text font-size="20" x="200" y="98">Green rectangle opacity: 1</text>
-    <g opacity="0.5">
-      <rect x="60" y="110" width="80" height="40" fill="blue"/>
-      <rect x="70" y="120" width="80" height="40" fill="lime"/>
-    </g>
-    <text font-size="20" x="200" y="122">Group opacity: 0.5</text>
-    <text font-size="20" x="200" y="140">Blue rectangle opacity: 1</text>
-    <text font-size="20" x="200" y="158">Green rectangle opacity: 1</text>
-    <g opacity="1">
-      <rect x="60" y="170" width="80" height="40" fill="blue" opacity=".5"/>
-      <rect x="70" y="180" width="80" height="40" fill="lime" opacity=".5"/>
-    </g>
-    <text font-size="20" x="200" y="182">Group opacity: 1</text>
-    <text font-size="20" x="200" y="200">Blue rectangle opacity: 0.5</text>
-    <text font-size="20" x="200" y="218">Green rectangle opacity: 0.5</text>
-    <g opacity="0.5">
-      <rect x="60" y="230" width="80" height="40" fill="blue" opacity=".5"/>
-      <rect x="70" y="240" width="80" height="40" fill="lime" opacity=".5"/>
-    </g>
-    <text font-size="20" x="200" y="242">Group opacity: 0.5</text>
-    <text font-size="20" x="200" y="260">Blue rectangle opacity: 0.5</text>
-    <text font-size="20" x="200" y="278">Green rectangle opacity: 0.5</text>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/masking-path-01-b.svg
+++ /dev/null
@@ -1,95 +0,0 @@
-<svg version="1.1" baseProfile="basic" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="CL" author="LH" status="accepted"
-    version="$Revision: 1.7 $" testname="$RCSfile: masking-path-01-b.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#ClippingPaths">
-

-        Test to see if the basic clipping works using the clipPath element
-        and the clip-path property.
-

-

-        This test uses the following elements : <clipPath> and the following
-        properties : clip-path.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        The test at the top shows an orange rectangle (with black stroke) being clipped by another rectangle.
-        So only the middle portion of the orange rectangle should be visible. Also the black stroke should
-        only be visible along the top and bottom edge of the rectangle.
-

-

-        The example at the bottom has a group containing a text string and two rectangles. The group
-        has a clipping path defined using two  overlapping rectangles. Of concern is the overlapping area
-        shared by the two rectangles. There should not be holes in this overlapping area, the
-        clip region is the union of the two rectangles. For clarity,
-        guide rectangles in grey show the position of the clipping rectangles.
-

-

-        The rendered picture should match the reference image exactly, except for possible
-        variations in the labelling text (per CSS2 rules).
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-path-01-b.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <g shape-rendering="geometricPrecision">
-
-      <defs>
-        <clipPath id="clip1">
-          <rect x="200" y="10" width="60" height="100"/>
-        </clipPath>
-        <clipPath id="clip2">
-          <rect x="90" y="150" width="175" height="100"/>
-          <rect x="225" y="160" width="95" height="75"/>
-        </clipPath>
-      </defs>
-      <rect x="20" y="20" width="440" height="60" fill="orange" stroke="black" stroke-width="5" clip-path="url(#clip1)"/>
-      <text font-size="30" x="20" y="130">Rectangle being clipped</text>
-      <g clip-path="url(#clip2)">
-        <rect x="115" y="190" width="225" height="40" fill="aqua" stroke="blue" stroke-width="5"/>
-        <rect x="115" y="240" width="225" height="40" fill="lime" stroke="green" stroke-width="5"/>
-        <text font-size="30" x="115" y="180">Line of text to be clipped</text>
-      </g>
-      <text font-size="30" x="20" y="280">Group being clipped</text>
-
-      <g fill="none" stroke="#999" stroke-width="2">
-        <rect x="90" y="150" width="175" height="100"/>
-        <rect x="225" y="160" width="95" height="75"/>
-      </g>
-    </g>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/masking-path-02-b.svg
+++ /dev/null
@@ -1,84 +0,0 @@
-<svg version="1.1" baseProfile="basic" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
-    version="$Revision: 1.8 $" testname="$RCSfile: masking-path-02-b.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#ClippingPaths">
-

-        Test to see if clipPathUnits attribute is handled properly on a
-        clipPath element. Only tests the userSpaceOnUse and
-        objectBoundingBox items of the clipPathUnits. userSpace has been
-        tested by the previous test as it is the default.
-

-

-        The test at the top shows a pink rectangle that has been clipped by a
-        rectangular clipping path. The clipping path is defined using clipPathUnits=objectBoundingBox.
-
-

-

-        The example at the bottom a rotated blue rectangle that has been clipped by a
-        rectangular clipping path. The clipping path is defined using clipPathUnits=userSpaceOnUse.
-
-

-

-        The rendered picture should match the reference image exactly, except for possible
-        variations in the labelling text (per CSS2 rules).
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        The test passes if the pink rectangle and blue diamond do not have any
-        color painted outside of their black borders.
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-path-02-b.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <g shape-rendering="geometricPrecision">
-      <clipPath id="clip1" clipPathUnits="objectBoundingBox">
-        <rect x=".25" y=".5" width=".6" height="1"/>
-      </clipPath>
-      <rect x="10" y="10" width="430" height="80" fill="#F08" clip-path="url(#clip1)"/>
-      <rect x="117" y="50" width="258" height="40" fill="none" stroke="black" stroke-width="4"/>
-      <text font-size="30" x="20" y="130">clipPathUnits=objectBoundingBox</text>
-      <clipPath id="clip2" clipPathUnits="userSpaceOnUse">
-        <rect x="60" y="60" width="80" height="80"/>
-      </clipPath>
-      <rect transform="translate(100 200) rotate(-45)" x="0" y="0" width="120" height="120" fill="blue" clip-path="url(#clip2)"/>
-      <rect transform="translate(100 200) rotate(-45)" x="60" y="60" width="60" height="60" fill="none" stroke="black" stroke-width="4"/>
-      <text font-size="30" x="20" y="280">clipPathUnits=userSpaceOnUse</text>
-    </g>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/masking-path-03-b.svg
+++ /dev/null
@@ -1,134 +0,0 @@
-<svg version="1.1" baseProfile="basic" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="SVGWG" author="Jon Ferraiolo" status="accepted"
-    version="$Revision: 1.7 $" testname="$RCSfile: masking-path-03-b.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#ClippingPaths">
-

-        Test 'overflow'/'clip' on outermost and inner 'svg' elements.
-

-

-        There are two parts to the test. The first part tests viewport clipping
-        on outermost 'svg' elements. The second part tests viewport clipping
-        on inner 'svg' elements.
-

-

-        The test case also tests the initial value of the 'overflow' property
-        to ensure that it is set to 'hidden' for all 'svg' elements.
-        Tester should zoom out and/or pan to check this.
-

-

-        To test clipping to the outermost 'svg' element,
-        a rectangle with a light blue interior, a light red border and a black
-        string that says "Clip to outer 'svg'" is painted four times such that
-        it will overflow each of the top, left, right and bottom
-        sides of the bounds of the outermost 'svg' element, respectively.
-

-

-        To test clipping to inner 'svg' elements, a rectangle with a light red
-        interior, a light blue border and a black string that says "Clip to
-        inner 'svg'" is painted four times such that it will overflow each of
-        the top, left, right and bottom sides of the bounds of an inner 'svg'
-        element, respectively.
-

-

-        Note that minor text layout differences, as are permissible under CSS2
-        rules, can lead to slightly different visual results regarding where
-        the text strings get clipped.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-
The test passes if:

-

-
The four "Outer Clip" boxed strings must not render outside the
-        outermost 'svg' element (the 480x360 rectangular viewport) and
-        must continue to be clipped to this viewport if the image is zoomed in or out,
-        or panned.

-
The four "Inner Clip" boxed strings must not render outside the
-        bounds of the green rectangle.

-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-path-03-b.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <g shape-rendering="geometricPrecision">
-
-      <text font-size="18" x="10" y="70">Test 'overflow'/'clip' on outermost and inner 'svg' elements</text>
-
-      <g font-size="48" stroke-width="2">
-        <g transform="translate(115,-20)">
-          <rect width="250" height="60" fill="#ccccff" stroke="#ff8888"/>
-          <text x="15" y="45">Outer Clip</text>
-        </g>
-        <g transform="translate(-175,150)">
-          <rect width="250" height="60" fill="#ccccff" stroke="#ff8888"/>
-          <text x="15" y="45">Outer Clip</text>
-        </g>
-        <g transform="translate(405,150)">
-          <rect width="250" height="60" fill="#ccccff" stroke="#ff8888"/>
-          <text x="15" y="45">Outer Clip</text>
-        </g>
-        <g transform="translate(115,330)">
-          <rect width="250" height="60" fill="#ccccff" stroke="#ff8888"/>
-          <text x="15" y="45">Outer Clip</text>
-        </g>
-      </g>
-
-      <rect x="115" y="100" width="250" height="160" fill="none" stroke="#006600" stroke-width="5"/>
-      <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="115" y="100" width="250" height="160">
-        <g font-size="32" stroke-width="2">
-          <g transform="translate(50,-15)">
-            <rect width="150" height="35" fill="#ffaaaa" stroke="#6666ff"/>
-            <text x="6" y="26">Inner Clip</text>
-          </g>
-          <g transform="translate(-50,62.5)">
-            <rect width="150" height="35" fill="#ffaaaa" stroke="#6666ff"/>
-            <text x="6" y="26">Inner Clip</text>
-          </g>
-          <g transform="translate(150,62.5)">
-            <rect width="150" height="35" fill="#ffaaaa" stroke="#6666ff"/>
-            <text x="6" y="26">Inner Clip</text>
-          </g>
-          <g transform="translate(50,140)">
-            <rect width="150" height="35" fill="#ffaaaa" stroke="#6666ff"/>
-            <text x="6" y="26">Inner Clip</text>
-          </g>
-        </g>
-      </svg>
-    </g>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/masking-path-04-b.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-<svg version="1.1" baseProfile="basic" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="SVGWG" author="Chris Lilley" status="accepted"
-    version="$Revision: 1.5 $" testname="$RCSfile: masking-path-04-b.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#ClippingPaths">
-

-        This test exercises basic user-specified clip paths, using a text
-        string (i.e., content of a 'text' element) as the clip path.
-

-

-        There is a rectangular image of a swirly blue pattern with large
-        yellow text, "Clip Test" superimposed. The image is a PNG file,
-        imported into the picture via the 'image' element.
-

-

-        The test uses the 'rect' element, as well as basic fill (solid primary
-        colors), stroke (black 1-pixel lines), font-family (Arial and
-        Impact) and font-size properties.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        The rendered picture should match the reference image, except for
-        possible variations in the labelling text (per CSS2 rules).
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: masking-path-04-b.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <g shape-rendering="geometricPrecision">
-      <defs>
-        <clipPath id="sample" clipPathUnits="userSpaceOnUse">
-          <text x="45" y="270" font-size="100" font-family="Impact">Clip Test</text>
-        </clipPath>
-      </defs>
-
-      <g>
-        <image xlink:href="resources/bluesquidj.png" preserveAspectRatio="none" x="30" y="20" width="410" height="140"/>
-        <text x="55" y="130" font-size="100" font-family="Impact" fill="yellow">Clip Test</text>
-      </g>
-      <g>
-        <image xlink:href="resources/bluesquidj.png" preserveAspectRatio="none" x="20" y="170" width="410" height="160" clip-path="url(#sample)"/>
-      </g>
-    </g>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/svg1.1/struct-cond-03-t.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-<svg version="1.1" baseProfile="tiny" id="svg-root"
-  width="100%" height="100%" viewBox="0 0 480 360"
-  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-
-
-
-
-
-
-
-
-
-  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
-    template-version="1.4" reviewer="CN" author="VH" status="accepted"
-    version="$Revision: 1.7 $" testname="$RCSfile: struct-cond-03-t.svg,v $">
-    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#ConditionalProcessing">
-

-          Tests the <switch> element with requiredFeatures.
-

-    </d:testDescription>
-    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
-

-        Run the test. No interaction required.
-

-    </d:operatorScript>
-    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
-

-        On the bottom half of the test, there is a first switch.
-        Because SVG Tiny does not support DOM, an SVG Tiny implementation
-        which does not support other SVG Profiles should show a green
-        rectangle. If the application supports the DOM, meaning that
-        it does more than just SVG Tiny, it should show a turquoise rectangle.
-

-

-        On the bottom half of the test, there is another switch.
-        The first child has a requiredFeatures set to
-        http://www.w3.org/TR/SVG11/feature#BasicText which all
-        SVG Tiny implementations should support. If the application
-        does, another green rectangle is displayed. Otherwise,
-        a red rectangle shows.
-

-    </d:passCriteria>
-  </d:SVGTestCase>
-  <title id="test-title">$RCSfile: struct-cond-03-t.svg,v $</title>
-  <defs>
-
-
-
-
-
-  </defs>
-  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
-    <switch>
-      <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#SVGDOM">
-        <rect x="30" y="20" width="420" height="130" fill="rgb(32, 178, 170)"/>
-        <text x="240" y="100" font-size="20" text-anchor="middle">This viewer does more than SVG Tiny</text>
-      </g>
-      <g>
-        <rect x="30" y="20" width="420" height="130" fill="#0F0"/>
-      </g>
-    </switch>
-
-    <switch transform="translate(0, 140)">
-      <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#BasicText">
-        <rect x="30" y="20" width="420" height="130" fill="#0F0"/>
-      </g>
-      <g>
-        <rect x="30" y="20" width="420" height="130" fill="#F00"/>
-        <text x="240" y="100" font-size="20" text-anchor="middle">This is not an SVG Tiny Viewer</text>
-      </g>
-    </switch>
-  </g>
-  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
-    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text>
-  </g>
-  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
-
-
-</svg>
--- a/tests/fixtures/reftests/bugs/340047.svg
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="744.09448819"
-   height="1052.3622047"
-   id="svg2"
-   version="1.1"
-   inkscape:version="0.47 r22583"
-   sodipodi:docname="New document 1">
-
-    <g fill = "navy">
-        <text x = "10" y = "25" font-size = "20">
-            <tspan>
-                e = mc
-                <tspan baseline-shift = "super">
-                    2
-                </tspan>
-            </tspan>
-            <tspan x = "10" y = "60">
-                T
-                <tspan baseline-shift = "sub">
-                    i+2
-                </tspan>
-                =T
-                <tspan baseline-shift = "sub">
-                    i
-                </tspan>
-                + T
-                <tspan baseline-shift = "sub">
-                    i+1
-                </tspan>
-            </tspan>
-        </text>
-    </g>
-</svg>
--- a/tests/fixtures/reftests/bugs/587721-text-transform.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="1179.75118pt" height="687.74173pt"
-     viewBox="0 0 1179.75118 687.74173"
-     enable-background="new 0 0 1179.75118 687.74173"
-     version="1.1" xmlns="http://www.w3.org/2000/svg"
-     xmlns:xlink="http://www.w3.org/1999/xlink" >
-
-  <g font-family="'DejaVu Sans'" font-size="1" kerning="0" font-weight="400" fill="#000000">
-    <text transform="matrix(12 0 0 12 929.88438 660.96434)">Frenchtown</text>
-  </g>
-
-</svg>
--- a/tests/fixtures/reftests/bugs/749415.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="643.56433" height="257.42575" id="svg2852">
-  <defs id="defs2854"/>
-  <g transform="translate(-58.921894,66.069669)" id="layer1">
-    <text x="69.253036" y="-29.653135" id="text3167" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="69.253036" y="-29.653135" id="tspan3169">1</tspan></text>
-    <text x="69.253036" y="179.25775" id="text3167-4" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="69.253036" y="179.25775" id="tspan3273">6</tspan></text>
-    <text x="69.253036" y="137.47557" id="text3167-48" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="69.253036" y="137.47557" id="tspan3271">5</tspan></text>
-    <text x="69.253036" y="95.693436" id="text3167-45" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="69.253036" y="95.693436" id="tspan3269">4</tspan></text>
-    <text x="69.253036" y="53.911259" id="text3167-7" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="69.253036" y="53.911259" id="tspan3267">3</tspan></text>
-    <text x="69.253036" y="12.129059" id="text3167-2" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="69.253036" y="12.129059" id="tspan3265">2</tspan></text>
-    <g transform="matrix(1.5,0,0,1.5,397.76677,54.817007)" id="g3300">
-      <rect width="4.8888898" height="4.6808534" x="-192.98616" y="-71.900017" id="rect2862-2-1-7-2-61" style="fill:#19b2ce;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-      <rect width="2" height="16" x="-87.267052" y="-182.85747" transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)" id="rect2862-2-1-7-2-2-4-42" style="fill:#19b2ce;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    </g>
-    <text x="164.86249" y="-28.66876" id="text3304" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="164.86249" y="-28.66876" id="tspan3308">Tip mass 0.5 kg</tspan></text>
-    <rect width="44.000343" height="14.666781" x="97.317757" y="-7.0793319" id="rect2862-2-1-7-4-4-6" style="fill:#ce9919;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"/>
-    <text x="161.62811" y="12.691559" id="text3304-7" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="161.62811" y="12.691559" id="tspan3408">Liquid crystal device</tspan></text>
-    <rect width="28.712872" height="28.712872" x="104.96149" y="27.906385" id="rect3434" style="fill:#cdd9ec;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    <text x="161.62811" y="54.473759" id="text3304-4" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="161.62811" y="54.473759" id="tspan3461">Membrane 7.5 um thick</tspan></text>
-    <rect width="26.400206" height="13.200104" x="106.11783" y="77.429321" id="rect2862-2-1-7-4-44-4-2-33" style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:0.73499995;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"/>
-    <text x="162.65936" y="96.677811" id="text3304-7-2" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="162.65936" y="96.677811" id="tspan3542">Solar cells 25 um thick</tspan></text>
-    <g transform="translate(-11.463337,-2.9292343)" id="g3588">
-      <path d="m 82.3125,172.71875 -32.21875,32.21875 2.8125,0 30.8125,-30.8125 -1.40625,-1.40625 z" transform="translate(58.921894,-65.07957)" id="rect2862-2-1-7-2-2-3-8-7" style="fill:#ceaa19;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-      <path d="m 92.21875,182.59375 -23.3125,23.34375 2.8125,0 21.90625,-21.90625 -1.40625,-1.4375 z" transform="translate(58.921894,-65.07957)" id="rect2862-2-1-7-2-2-3-5-9-9" style="fill:#1982ce;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    </g>
-    <text x="162.47852" y="138.45995" id="text3304-3" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="162.47852" y="138.45995" id="tspan3617">Tethers</tspan></text>
-    <path d="m 187.32394,828.41852 a 83.098595,83.098595 0 1 1 -166.197185,0 83.098595,83.098595 0 1 1 166.197185,0 z" transform="matrix(0.24067796,0,0,0.24067796,94.233178,-31.78839)" id="path3939-9" style="fill:#0000ff;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    <path d="m 187.32394,828.41852 a 83.098595,83.098595 0 1 1 -166.197185,0 83.098595,83.098595 0 1 1 166.197185,0 z" transform="matrix(0.06016949,0,0,0.06016949,438.17176,92.436)" id="path3939-5-1-8" style="fill:#f3dd00;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    <path d="m 187.32394,828.41852 a 83.098595,83.098595 0 1 1 -166.197185,0 83.098595,83.098595 0 1 1 166.197185,0 z" transform="matrix(0.06016949,0,0,0.06016949,453.02324,75.60432)" id="path3939-5-6-6" style="fill:#f3dd00;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    <path d="m 187.32394,828.41852 a 83.098595,83.098595 0 1 1 -166.197185,0 83.098595,83.098595 0 1 1 166.197185,0 z" transform="matrix(0.06016949,0,0,0.06016949,424.31037,84.5152)" id="path3939-5-5-5" style="fill:#f3dd00;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    <path d="m 187.32394,828.41852 a 83.098595,83.098595 0 1 1 -166.197185,0 83.098595,83.098595 0 1 1 166.197185,0 z" transform="matrix(0.06016949,0,0,0.06016949,440.15195,61.74293)" id="path3939-5-0-0" style="fill:#f3dd00;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
-    <text x="159.24414" y="179.82025" id="text3304-3-6" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="159.24414" y="179.82025" id="tspan3684">Main body</tspan></text>
-    <text x="485.80463" y="138.83588" id="text3304-3-6-2" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="485.80463" y="138.83588" id="tspan3711">Instruments</tspan></text>
-    <text x="392.2764" y="138.83588" id="text3167-4-8" xml:space="preserve" style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan x="392.2764" y="138.83588" id="tspan3738">7</tspan></text>
-    <rect width="643.56433" height="257.42575" x="0" y="-0.99009901" transform="translate(58.921894,-65.07957)" id="rect3740" style="fill:none;stroke:none"/>
-  </g>
-</svg>
\ No newline at end of file
--- a/tests/fixtures/reftests/bugs/777834-empty-text-children.svg
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
-"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"
-[
- <!ATTLIST svg
-  xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
-]>
-
-<svg
-   width="45.1555mm"
-   height="45.1555mm"
-   id="svg260"
-   sodipodi:version="0.26"
-   sodipodi:docname="/mnt/windows/Themes/Sodipodi/text-gradient-3.svg"
-   sodipodi:docbase="/mnt/windows/Themes/Sodipodi/"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:xlink="http://www.w3.org/1999/xlink">
-  <sodipodi:namedview
-     id="base" />
-  <defs
-     id="defs261">
-    <linearGradient
-       id="id0"
-       x1="159"
-       y1="84"
-       x2="7"
-       y2="-2">
-      <stop
-         offset="0.000000"
-         style="stop-color:#009240;stop-opacity:1;"
-         id="stop255" />
-      <stop
-         offset="1.000000"
-         style="stop-color:#b9db7d;stop-opacity:1;"
-         id="stop256" />
-    </linearGradient>
-    <linearGradient
-       x1="0.155172"
-       y1="-0.142973"
-       x2="0.748276"
-       y2="1.15946"
-       xlink:href="#id0"
-       id="linearGradient522" />
-  </defs>
-  <text
-     style="fill:black;stroke:none;font-family:helvetica;font-style:normal;font-weight:normal;font-size:12px;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
-     x="5.566449"
-     y="15.719979"
-     id="text278"
-     transform="scale(1.63731,2.40117)">
-    <tspan
-       id="tspan279">
-Hello World!</tspan>
-  </text>
-  <text
-     style="fill:url(#linearGradient522);stroke:none;font-family:helvetica;font-style:normal;font-weight:normal;font-size:12px;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
-     x="5.315264"
-     y="29.372340"
-     id="text281"
-     transform="scale(1.63731,2.40117)">
-    <tspan
-       id="tspan282"
-       style="fill:url(#linearGradient522);">
-Hello World!</tspan>
-  </text>
-  <text
-     style="fill:url(#linearGradient522);stroke:#003500;font-family:helvetica;font-style:normal;font-weight:normal;font-size:12px;fill-opacity:1;stroke-opacity:1;stroke-width:0.189127;stroke-linejoin:miter;stroke-linecap:butt;"
-     x="5.315264"
-     y="41.984471"
-     id="text536"
-     transform="scale(1.63731,2.40117)">
-    <tspan
-       id="tspan537"
-       style="fill:url(#linearGradient522);stroke:#003500;stroke-opacity:1;stroke-width:0.189127;">
-Hello World!</tspan>
-  </text>
-</svg>


code:
diff --git a/Makefile.am b/Makefile.am
index 670cdcb..1d7043b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,7 @@ SUBDIRS = src test
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xshmfence.pc

-EXTRA_DIST = xshmfence.pc.in ChangeLog
+EXTRA_DIST = xshmfence.pc.in ChangeLog README.md
 MAINTAINERCLEANFILES = ChangeLog

 .PHONY: ChangeLog
diff --git a/README b/README.md
similarity index 56%
rename from README
rename to README.md
index db193b7..748fe8a 100644
--- a/README
+++ b/README.md
@@ -1,4 +1,5 @@
 libxshmfence - Shared memory 'SyncFence' synchronization primitive
+------------------------------------------------------------------

 This library offers a CPU-based synchronization primitive compatible
 with the X SyncFence objects that can be shared between processes
@@ -14,23 +15,15 @@ There are two underlying implementations:
 All questions regarding this software should be directed at the
 Xorg mailing list:

-        http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+  https://lists.x.org/mailman/listinfo/xorg

 The master development code repository can be found at:

-        git://anongit.freedesktop.org/git/xorg/lib/libxshmfence
+  https://gitlab.freedesktop.org/xorg/lib/libxshmfence

-        http://cgit.freedesktop.org/xorg/lib/libxshmfence
+Please submit bug reports and requests to merge patches there.

 For patch submission instructions, see:

-	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
-        http://wiki.x.org/wiki/GitPage
+  https://www.x.org/wiki/Development/Documentation/SubmittingPatches

diff --git a/configure.ac b/configure.ac
index 8afe7a6..5636cb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ dnl Process this file with autoconf to create configure.

 AC_PREREQ([2.60])
 AC_INIT([libxshmfence], [1.3],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libxshmfence])
+        [https://gitlab.freedesktop.org/xorg/lib/libxshmfence/issues], [libxshmfence])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

@@ -91,7 +91,7 @@ AC_SUBST([XPROTO_CFLAGS])

 CFLAGS="$CFLAGS $XPROTO_CFLAGS"

-AC_CHECK_FUNCS(memfd_create)
+AC_CHECK_FUNCS(memfd_create mkostemp)

 AC_CHECK_DECLS([__NR_memfd_create], [], [], [[#include <asm/unistd.h>]])

diff --git a/src/xshmfence_alloc.c b/src/xshmfence_alloc.c
index 05cf953..932adb9 100644
--- a/src/xshmfence_alloc.c
+++ b/src/xshmfence_alloc.c
@@ -26,6 +26,8 @@

 #include "xshmfenceint.h"

+#include <fcntl.h>
+
 #if !HAVE_MEMFD_CREATE
 #if HAVE_DECL___NR_MEMFD_CREATE
 #include <asm/unistd.h>
@@ -68,10 +70,17 @@ xshmfence_alloc_shm(void)
 {
 	char	template[] = SHMDIR "/shmfd-XXXXXX";
 	int	fd;
+#ifndef HAVE_MKOSTEMP
+	int	flags;
+#endif

 #if HAVE_MEMFD_CREATE
 	fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING);
 	if (fd < 0)
+#endif
+#ifdef SHM_ANON
+	fd = shm_open(SHM_ANON, O_RDWR|O_CLOEXEC, 0600);
+	if (fd < 0)
 #endif
 	{
 #ifdef O_TMPFILE
@@ -79,10 +88,21 @@ xshmfence_alloc_shm(void)
 		if (fd < 0)
 #endif
 		{
+#ifdef HAVE_MKOSTEMP
+			fd = mkostemp(template, O_CLOEXEC);
+#else
 			fd = mkstemp(template);
+#endif
 			if (fd < 0)
 				return fd;
 			unlink(template);
+#ifndef HAVE_MKOSTEMP
+			flags = fcntl(fd, F_GETFD);
+			if (flags != -1) {
+				flags |= FD_CLOEXEC;
+				fcntl(fd, F_SETFD, &flags);
+			}
+#endif
 		}
 	}
 	if (ftruncate(fd, sizeof (struct xshmfence)) < 0) {

repo_name: dustdfg/dragora

license: mit


code:
From 8e69b663d6ddef132041a1186f081fdd74d4a31d Mon Sep 17 00:00:00 2001
From: rofl0r <retnyg@gmx.net>
Date: Mon, 20 Jan 2014 21:31:34 +0100
Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h

the declaration of struct sysinfo clashes with userspace.
it's not quite clear why that header was included from kernel.h,
as none of its functionality is needed.
---
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Submitted

 include/uapi/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
index fadf2db71fe8..813800ed141f 100644
--- a/include/uapi/linux/kernel.h
+++ b/include/uapi/linux/kernel.h
@@ -2,7 +2,9 @@
 #ifndef _UAPI_LINUX_KERNEL_H
 #define _UAPI_LINUX_KERNEL_H

+#ifdef __GLIBC__
 #include <linux/sysinfo.h>
+#endif
 #include <linux/const.h>

 #endif /* _UAPI_LINUX_KERNEL_H */


code:
Revert 1fe8e0f074c77aa41aaa579345a9e675acbebfa9
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index 1046f55..777b6cd 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -2,9 +2,6 @@
 #define _UAPI_IF_TUNNEL_H_

 #include <linux/types.h>
-#include <linux/if.h>
-#include <linux/ip.h>
-#include <linux/in6.h>
 #include <asm/byteorder.h>

--
cgit v1.1


code:
--- projects/compiler-rt/cmake/config-ix.cmake.orig	2020-10-07 10:10:48.000000000 +0000
+++ projects/compiler-rt/cmake/config-ix.cmake	2021-01-04 10:30:37.088897130 +0000
@@ -624,7 +624,7 @@
     (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD|NetBSD|OpenBSD|Fuchsia|SunOS" OR
     (OS_NAME MATCHES "Windows" AND NOT CYGWIN AND
         (NOT MINGW OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"))))
-  set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)
+  set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)
 else()
   set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)
 endif()


code:
--- a/examples/logrotate-default	2017-05-04 14:28:48.393620994 -0400
+++ b/examples/logrotate-default	2017-05-04 14:48:58.138616506 -0400
@@ -12,9 +12,9 @@ create
 dateext

 # uncomment this if you want your log files compressed
-#compress
+compress

-# RPM packages drop log rotation information into this directory
+# Directory for application-specific configuration files
 include /etc/logrotate.d

 # no packages own wtmp and btmp -- we'll rotate them here


code:
Submitted By:            Douglas R. Reno <renodr at linuxfromscratch dot org>
Date:                    2020-06-30
Initial Package Version: 5.4.0
Upstream Status:         Rejected
Origin:                  Arch Linux, with some modifications
Description:             Creates a shared liblua library, as well as
                         removes optimization since it causes SIGBUS errors,
                         and sets the search path to /usr from /usr/local.
                         The initial version of this patch was created by
                         Igor Zivkovic, before being rediffed for 5.4.0 by
                         myself with some modifications made.

diff -Naurp lua-5.4.0.orig/Makefile lua-5.4.0/Makefile
--- lua-5.4.0.orig/Makefile	2020-04-15 07:55:07.000000000 -0500
+++ lua-5.4.0/Makefile	2020-06-30 13:22:00.997938585 -0500
@@ -52,7 +52,7 @@ R= $V.0
 all:	$(PLAT)

 $(PLATS) help test clean:
-	@cd src && $(MAKE) $@
+	@cd src && $(MAKE) $@ V=$(V) R=$(R)

 install: dummy
 	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
diff -Naurp lua-5.4.0.orig/src/luaconf.h lua-5.4.0/src/luaconf.h
--- lua-5.4.0.orig/src/luaconf.h	2020-06-18 09:25:54.000000000 -0500
+++ lua-5.4.0/src/luaconf.h	2020-06-30 13:24:59.294932289 -0500
@@ -227,7 +227,7 @@

 #else			/* }{ */

-#define LUA_ROOT	"/usr/local/"
+#define LUA_ROOT	"/usr/"
 #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR "/"
 #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR "/"

diff -Naurp lua-5.4.0.orig/src/Makefile lua-5.4.0/src/Makefile
--- lua-5.4.0.orig/src/Makefile	2020-04-15 08:00:29.000000000 -0500
+++ lua-5.4.0/src/Makefile	2020-06-30 13:24:15.746933827 -0500
@@ -7,7 +7,7 @@
 PLAT= guess

 CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+CFLAGS= -fPIC -O0 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1 $(SYSCFLAGS) $(MYCFLAGS)
 LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
 LIBS= -lm $(SYSLIBS) $(MYLIBS)

@@ -33,6 +33,7 @@ CMCFLAGS= -Os
 PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris

 LUA_A=	liblua.a
+LUA_SO=  liblua.so
 CORE_O=	lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
 LIB_O=	lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
 BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
@@ -44,7 +45,7 @@ LUAC_T=	luac
 LUAC_O=	luac.o

 ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
 ALL_A= $(LUA_A)

 # Targets start here.
@@ -60,6 +61,12 @@ $(LUA_A): $(BASE_O)
 	$(AR) $@ $(BASE_O)
 	$(RANLIB) $@

+$(LUA_SO): $(CORE_O) $(LIB_O)
+	$(CC) -shared -ldl -Wl,--soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm
+	$(MYLDFLAGS)
+	ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+	ln -sf $(LUA_SO).$(R) $(LUA_SO)
+
 $(LUA_T): $(LUA_O) $(LUA_A)
 	$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)


code:
--- ./tools/lvmcmdline.c
+++ ./tools/lvmcmdline.c
@@ -1252,7 +1252,7 @@
 	int err = is_valid_fd(STDERR_FILENO);

 	if (!is_valid_fd(STDIN_FILENO) &&
-	    !(stdin = fopen(_PATH_DEVNULL, "r"))) {
+	    !freopen(_PATH_DEVNULL, "r", stdin)) {
 		if (err)
 			perror("stdin stream open");
 		else
@@ -1262,7 +1262,7 @@
 	}

 	if (!is_valid_fd(STDOUT_FILENO) &&
-	    !(stdout = fopen(_PATH_DEVNULL, "w"))) {
+	    !freopen(_PATH_DEVNULL, "w", stdout)) {
 		if (err)
 			perror("stdout stream open");
 		/* else no stdout */
@@ -1270,7 +1270,7 @@
 	}

 	if (!is_valid_fd(STDERR_FILENO) &&
-	    !(stderr = fopen(_PATH_DEVNULL, "w"))) {
+	    !freopen(_PATH_DEVNULL, "w", stderr)) {
 		printf("stderr stream open: %s\n",
 		       strerror(errno));
 		return 0;
--- ./lib/commands/toolcontext.c.orig
+++ ./lib/commands/toolcontext.c
@@ -1860,7 +1860,7 @@
	/* FIXME Make this configurable? */
	reset_lvm_errno(1);

-#ifndef VALGRIND_POOL
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
	/* Set in/out stream buffering before glibc */
	if (set_buffering
 #ifdef SYS_gettid
@@ -2254,7 +2254,7 @@
	if (cmd->libmem)
		dm_pool_destroy(cmd->libmem);

-#ifndef VALGRIND_POOL
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
	if (cmd->linebuffer) {
	/* Reset stream buffering to defaults */
	   if (is_valid_fd(STDIN_FILENO) &&


code:
--- ./conf/example.conf.in.orig
+++ ./conf/example.conf.in
@@ -694,6 +694,7 @@
 	# Configuration option global/library_dir.
 	# Search this directory first for shared libraries.
 	# This configuration option does not have a default value defined.
+	library_dir="/lib/device-mapper"

 	# Configuration option global/locking_library.
 	# The external locking library to use for locking_type 2.


code:
--- ./lib/mm/memlock.c.orig	2015-03-09 11:18:41.560028850 -0100
+++ ./lib/mm/memlock.c	2015-03-09 11:19:54.504373309 -0100
@@ -137,7 +137,7 @@

 static void _allocate_memory(void)
 {
-#ifndef VALGRIND_POOL
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
 	void *stack_mem;
 	struct rlimit limit;
 	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;


code:
--- ./conf/example.conf.in.orig
+++ ./conf/example.conf.in
@@ -1352,7 +1352,7 @@
 	# Use the old behavior of mlockall to pin all memory.
 	# Prior to version 2.02.62, LVM used mlockall() to pin the whole
 	# process's memory while activating devices.
-	use_mlockall = 0
+	use_mlockall = 1

 	# Configuration option activation/monitoring.
 	# Monitor LVs that are activated.
--- ./lib/config/defaults.h.orig
+++ ./lib/config/defaults.h
@@ -55,7 +55,7 @@
 #define DEFAULT_LVMLOCKD_LOCK_RETRIES 3
 #define DEFAULT_LVMETAD_UPDATE_WAIT_TIME 10
 #define DEFAULT_PRIORITISE_WRITE_LOCKS 1
-#define DEFAULT_USE_MLOCKALL 0
+#define DEFAULT_USE_MLOCKALL 1
 #define DEFAULT_METADATA_READ_ONLY 0
 #define DEFAULT_LVDISPLAY_SHOWS_FULL_DEVICE_PATH 0
 #define DEFAULT_UNKNOWN_DEVICE_NAME "[unknown]"


code:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/m4/patches/patch-update_freadahead	Mon Jul 29 23:39:07 2013 -0400
@@ -0,0 +1,102 @@
+diff -r d1c9a158c955 lib/freadahead.c
+--- lib/freadahead.c	Wed Mar 13 20:55:32 2013 +0000
++++ lib/freadahead.c	Wed Mar 13 20:56:08 2013 +0000
+@@ -1,5 +1,5 @@
+ /* Retrieve information about a FILE stream.
+-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
++   Copyright (C) 2007-2013 Free Software Foundation, Inc.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+@@ -22,6 +22,7 @@
+ #include <stdlib.h>
+ #include "stdio-impl.h"
+
++#ifndef HAVE___FREADAHEAD
+ size_t
+ freadahead (FILE *fp)
+ {
+@@ -31,7 +32,7 @@
+   return (fp->_IO_read_end - fp->_IO_read_ptr)
+          + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
+             0);
+-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
++#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+   if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
+     return 0;
+ # if defined __DragonFly__
+@@ -48,6 +49,10 @@
+   /* equivalent to
+      (fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount) */
+   return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount);
++#elif defined __minix               /* Minix */
++  if ((fp_->_flags & _IOWRITING) != 0)
++    return 0;
++  return fp_->_count;
+ #elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+   if ((fp_->_flag & _IOWRT) != 0)
+     return 0;
+@@ -76,6 +81,10 @@
+   return (fp->__pushed_back
+           ? fp->__get_limit - fp->__pushback_bufp + 1
+           : fp->__get_limit - fp->__bufp);
++#elif defined EPLAN9                /* Plan9 */
++  if (fp->state == 4 /* WR */ || fp->rp >= fp->wp)
++    return 0;
++  return fp->wp - fp->rp;
+ #elif defined SLOW_BUT_NO_HACKS     /* users can define this */
+   abort ();
+   return 0;
+@@ -83,3 +92,4 @@
+  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
+ #endif
+ }
++#endif
+diff -r d1c9a158c955 lib/freadahead.h
+--- lib/freadahead.h	Wed Mar 13 20:55:32 2013 +0000
++++ lib/freadahead.h	Wed Mar 13 20:56:08 2013 +0000
+@@ -1,5 +1,5 @@
+ /* Retrieve information about a FILE stream.
+-   Copyright (C) 2007-2011 Free Software Foundation, Inc.
++   Copyright (C) 2007-2013 Free Software Foundation, Inc.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+@@ -17,10 +17,6 @@
+ #include <stddef.h>
+ #include <stdio.h>
+
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+ /* Assuming the stream STREAM is open for reading:
+    Return the number of bytes waiting in the input buffer of STREAM.
+    This includes both the bytes that have been read from the underlying input
+@@ -31,8 +27,24 @@
+
+    STREAM must not be wide-character oriented.  */
+
+-extern size_t freadahead (FILE *stream);
++#if HAVE___FREADAHEAD || (defined(__linux__) && !defined(__GLIBC__) && !defined(__UCLIBC__)) /* musl libc */
++#ifndef HAVE___FREADAHEAD
++#define HAVE___FREADAHEAD 1
++#endif
+
+-#ifdef __cplusplus
++# include <stdio_ext.h>
++# define freadahead(stream) __freadahead (stream)
++
++#else
++
++# ifdef __cplusplus
++extern "C" {
++# endif
++
++extern size_t freadahead (FILE *stream) _GL_ATTRIBUTE_PURE;
++
++# ifdef __cplusplus
+ }
++# endif
++
+ #endif


code:
Subject: fix usage of cchar_t
--- a/lib/tty/tty-ncurses.h	2021-01-23 02:50:51.458002969 +0200
+++ b/lib/tty/tty-ncurses.h	2021-01-23 02:42:49.203049070 +0200
@@ -3,6 +3,7 @@
 #define MC__TTY_NCURSES_H

 #ifdef USE_NCURSES
+#define _XOPEN_SOURCE_EXTENDED
 #ifdef HAVE_NCURSES_CURSES_H
 #include <ncurses/curses.h>
 #elif defined (HAVE_NCURSES_NCURSES_H)


code:
diff --git a/meson.build b/meson.build
index e1e94e7..b355f94 100644
--- a/meson.build
+++ b/meson.build
@@ -447,7 +447,9 @@ endif

 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
 use_elf_tls = false
-if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
+with_use_elf_tls = get_option('use-elf-tls')
+if with_use_elf_tls and
+    (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
     (not with_platform_android or get_option('platform-sdk-version') >= 29) and
     (not with_platform_windows or not with_shared_glapi))
   pre_args += '-DUSE_ELF_TLS'
diff --git a/meson_options.txt b/meson_options.txt
index a7030ab..73bd28e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -465,3 +465,9 @@ option(
   value : true,
   description : 'use msse2 flag for mingw x86. Default: true',
 )
+option(
+  'use-elf-tls',
+  type : 'boolean',
+  value : false,
+  description : 'Build support for initial-exec TLS model'
+)