<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - basic_filebuf non-standard constructor/open functions for taking an open FILE stream"
   href="https://llvm.org/bugs/show_bug.cgi?id=24567">24567</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>basic_filebuf non-standard constructor/open functions for taking an open FILE stream
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>welten@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14773" name="attach_14773" title="patch that adds FILE* constructor/open function to basic_filebuf">attachment 14773</a> <a href="attachment.cgi?id=14773&action=edit" title="patch that adds FILE* constructor/open function to basic_filebuf">[details]</a></span>
patch that adds FILE* constructor/open function to basic_filebuf

Currently it is not possible to construct a C++ stream for an already open
file.

Some other C++ libraries offer non-standard extensions like 

__gnu_cxx::stdio_filebuf from ext/stdio_filebuf.h

in the libstdc++.

Given that the current implementation of basic_filebuf uses a FILE stream
internally it is easily possibly to add an alternative constructor and open
function that takes an already open FILE stream.

Attached is a patch containing a straight forward approach to add this
functionality.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>