Commit Graph

47 Commits

Author SHA1 Message Date
James E. King III
d7f1b82682 Added CI framework
- travis with valgrind, cppcheck, ubsan, codecov, covscan (future)
      - appveyor with MSVC 2010 through 2017, cygwin 32/64, mingw 32/64
      - README, LICENSE, etc.

Additional fixes for cygwin builds to work
2018-07-30 09:14:56 -04:00
Edward Diener
7b5bf3663a
Merge pull request #53 from msuvajac/nonblocking_read
Fixed non-blocking adapter read() data overwrite and infinite loop.
2018-04-14 22:47:07 -04:00
Reimar Döffinger
78f4496235 Add zstd compression/decompression filter.
Implements trac issue #13356.
2018-03-24 19:55:17 +01:00
msuvajac
b51c1d005e Fixed non-blocking adapter read() data overwrite and infinite loop.
Non-blocking adapter read() wasn't tracking amount read properly which
could cause an infinite loop when underlying (infinite) source returns amounts
smaller than requested. Also amounts read previously were
overwritten by subsequent calls.
2018-03-02 11:37:50 +01:00
Reimar Döffinger
2c30bedbe0 Fix test when zlib or bzip2 not available.
Do not try to run tests when the dependencies
are not available.
Should fix the AppVeyor build.
2018-01-19 22:33:26 +01:00
Reimar Döffinger
282b1edd76 Add lzma compressor and decompressor filters.
Needs lzma.jam file in tools/build module.
See also trac ticket 7534.
The code has been around in random places since some time,
I only added tests and build system updates and
minor fixes for issues those tests discovered.
2017-07-25 16:21:30 +02:00
Reimar Döffinger
b9a61eaa0d Fix endless loop when writing to file exceeds quota.
See also issue 2557.
2017-07-03 19:31:00 +02:00
Jorge Lodos
d248dcd9b4 Add dual seek-able test. 2016-02-07 22:28:22 -06:00
Marshall Clow
ef38e18a1f Added test for fix for Bug #6576; thanks to Boris
[SVN r79936]
2012-08-08 19:48:28 +00:00
Jürgen Hunold
634e39df42 Fix: remove obsolete test using removed Boost.Filesystem V2
[SVN r78216]
2012-04-27 06:49:28 +00:00
Daniel James
0ef8087040 Iostreams: Support filesystem3 paths. Refs #4485.
Based on Zhuo Qiang's patch with added tests and support
for `operator=`.

I also used `codecvt_type` to detect `filesystem3::path`
instead of `string_type`. Using `string_type` made
`filesystem2::path` ambiguous because it has both
`string_type` and `external_string_type` members. 

The member types are a bit arbitrary, but a more precise
distinction would probably also be more expensive.



[SVN r72382]
2011-06-03 23:29:59 +00:00
Daniel James
04d9e47c57 Try to improve file_descriptor's ownership policies. Refs #3517
* Deprecate the old 'close_on_exit' constructors.
* Introduce new constructors from file handle, taking either
  `never_close_handle` or `close_handle`.
* Close current file handle when opening a new file handle,
  if it would have been closed in the destructor.

[SVN r63430]
2010-06-29 14:15:13 +00:00
Daniel James
581486bcf0 Use unique_path instead of tmpnam. Refs #2325.
[SVN r63429]
2010-06-29 14:13:52 +00:00
Steven Watanabe
7803ec6b9d Add BOOST_IOSTREAMS_DECL to file_descriptor_source and file_descriptor_sink. Fixes #4335.
[SVN r62811]
2010-06-11 18:55:31 +00:00
Vladimir Prus
4ba99d5ff9 Remove forcing of static runtime on msvc.
[SVN r52374]
2009-04-13 21:39:33 +00:00
Jonathan Turkanis
35e2fe3964 removed functions relating to file timestamps (addresses #2154)
[SVN r47866]
2008-07-29 14:06:01 +00:00
Jonathan Turkanis
cc4ea77f19 changes to wide-character path and file timestampt support for POSIX and MinGW
[SVN r46737]
2008-06-26 18:40:23 +00:00
Jonathan Turkanis
4c96a2557d added grep_filter and tests (issue #1627); line_filter needed modification to be usable as a base for grep_filter; the commented out tests for grep_filter::count() are incorrect, because they query the original filter rather than the copy used for i/o; I have verified independently that count() works, and will fix the test later
[SVN r45833]
2008-05-27 20:18:02 +00:00
Jonathan Turkanis
ecbd2bd5e8 merged changes from iostreams_dev, revisions 42962-43059: updated copyright notices
[SVN r43061]
2008-02-02 22:10:46 +00:00
Jonathan Turkanis
3cbc8c29eb removed intel-darwin sepcific code, since it didn't work
[SVN r42707]
2008-01-12 20:20:35 +00:00
Jonathan Turkanis
42d8be6eb4 another attempt to fix linking for compression tests on intel-darwin
[SVN r42684]
2008-01-11 19:12:22 +00:00
Jonathan Turkanis
3f1b2a1580 force static runtime-link for intel-darwin
[SVN r42672]
2008-01-11 01:35:46 +00:00
Jonathan Turkanis
bfa2424fb9 merged changes from branches/iostreams_dev, revisions 42645=42660; fix for Intel-darwin; removed dependence of file_descriptor_test and mapped_file_test on library boost_iostreams
[SVN r42670]
2008-01-11 00:02:36 +00:00
Jonathan Turkanis
3e02e11442 merged changes from branches/iostreams_dev, revisions 42544-42544
- added "slice" as an alias for "restrict", for platforms on which "restrict" is a keyword
- attempted to configure file_descriptor for __IBMCPP__
- added better error output to stream_offset_64bit_test.cpp

[SVN r42565]
2008-01-07 05:20:32 +00:00
Jonathan Turkanis
f735f49547 copy.hpp:
fix for Visual Age: std::min was passed arguments of different types; replaced std:: min with conditional

detail/streambuf/indirect_streambuf.hpp: 

    removed trailing comma in enum definition

test/combine_test.cpp:
test/symmetric_filter_test.cpp:
test/compose_test.cpp:
test/close_test.cpp:
test/invert_test.cpp:
test/tee_test.cpp:
test/restrict_test.cpp:
test/Jamfile.v2:

    moved tests for close() into the test files for various adapters

[SVN r42544]
2008-01-06 18:32:05 +00:00
Jonathan Turkanis
9cc19290e6 changes from iostreams_dev not merged by svnmerge for some reason; better error reporting for file_offset_64bit_test.cpp; added 'std::' all over the place for Intel on Linux and Darwin; commented out stream_state_test.cpp because it seems to be a test for the standard library, and it is not clear that the standard requires that the test pass
[SVN r42440]
2008-01-03 19:10:48 +00:00
Jonathan Turkanis
1753faf9e0 ported changes from branches/iostreams_dev revisions 42306-42342: reworking of low-level file access to address #824, plus rigorous tests for large seeks
[SVN r42343]
2007-12-29 19:50:22 +00:00
K. Noel Belcourt
e94024b747 Add missing iostreams files from iostreams_dev branch.
Re-enable these two tests.



[SVN r42311]
2007-12-27 00:37:52 +00:00
K. Noel Belcourt
91708aa511 Comment out these two tests
[ test-iostreams stream_offset_32bit_test.cpp ]
[ test-iostreams stream_offset_64bit_test.cpp ]

since, apparently, these source files didn't get 
added.



[SVN r42310]
2007-12-26 22:48:28 +00:00
Jonathan Turkanis
8c65fa7d15 ported changes from branches/iostreams_dev revisions 42265-42306
[SVN r42307]
2007-12-26 05:45:15 +00:00
Jonathan Turkanis
49ba093a28 ported changes from branches/iostreams_dev revisions 42144-42265
[SVN r42266]
2007-12-24 00:27:12 +00:00
Jonathan Turkanis
4f85a131de I. Changed signature and specification of boost::iostreams::close(),
and made corresponding changes throughout the iostreams library.
   New spec is:
   
   template<typename T>
   void close(T& t);

     Convenience function for closing a device; calls close(t, in) and 
     close(t, out).

   template<typename T>
   void close(T& t, openmode which);

   template<typename T, typename Sink>
   void close(T& t, Sink& snk, openmode which);

     These two functions should only be called by the library implementation
     or by advanced users. The openmode parameter must always equal in or 
     out, never in | out.

     There are three cases:

     1. If T is not closable and which == out, calls boost::iostreams::flush

     2. If T operates on a single sequence, and is NOT a dual-use filter:

        a. If which == in and the mode of T is convertible to input but
           not to output, calls t.close() (or t.close(snk))

        b. If which == out and the mode of T is not convertible to input or
           is convertible to input and to output, calls t.close() 
           (or t.close(snk))

        The effect of a. and b. is that for any T in this category, 
        close() is called exactly once.

     3. If T operates on two sequences or is a dual-use filter, calls
        t.close(which) (or t.close(snk, which))

     If multiple operations that might throw must be called in the course
     of closing a filter or device, all of the operations are attempted
     and the first exception thrown by any of the operations is rethrown

  The new test close_test.cpp contains 95 checks verifying that the operation
  behaves as sepcified.

  This affects the following files:

    chain.hpp
    close.hpp
    code_converter.hpp
    combine.hpp
    compose.hpp
    copy.hpp
    detail/adapter/basic_adapter.hpp [removed]
    detail/adapter/device_adapter.hpp [new]
    detail/adapter/direct_adapter.hpp
    detail/adapter/filter_adapter.hpp [new]
    detail/adapter/mode_adapter.hpp
    detail/broken_overload_resolution/stream_buffer.hpp
    detail/closer.hpp [removed]
    detail/config/limits.hpp
    detail/execute.hpp [new]
    detail/functional.hpp [new]
    detail/streambuf/direct_streambuf.hpp
    detail/streambuf/indirect_streambuf.hpp
    detail/streambuf/linked_streambuf.hpp
    detail/vc6/close.hpp
    device/null.hpp
    filter/aggregate.hpp
    filter/bzip2.hpp
    filter/gzip.hpp
    filter/line.hpp
    filter/newline.hpp
    filter/symmetric.hpp
    filter/test.hpp
    invert.hpp
    restrict.hpp
    tee.hpp
    example/finite_state_filter.hpp
    test/Jamfile.v2
    test/close_test.cpp [new]
    test/code_converter_test.cpp
    test/execute_test.cpp [new]
    test/operation_sequence_test.cpp [new]

II. When exceptions are caught and ignored, we now use catch (...)
    uniformly instead of catch (std::exception&). This affects the 
    following files:

    stream_buffer.hpp
    src/mapped_file.cpp

III. Unnecessary dependence on Boost.Range has been eliminated. This
     affects the following files:

    detail/is_iterator_range.hpp
    detail/resolve.hpp
    traits.hpp
    test/Jamfile.v2
    test/filtering_stream_test.cpp
    test/offset_test.cpp
    test/seek_test.hpp
    test/seekable_filter_test.cpp
    test/sequence_test.cpp [new]
    test/wide_stream_test.cpp

IV. There are several fixes to the documentation. This affects the
    following files:

    doc/classes/symmetric_filter.html
    doc/guide/concepts.html
    doc/guide/modes.html
    doc/tutorial/container_device.html [serious error in algorithm]
    doc/tutorial/dictionary_filters.html [unused member variable]
    doc/tutorial/multichar_filters.html

V. Other changes include:

    stream.hpp [missing include directive]
    example/container_device.hpp [serious error in algorithm]
    example/container_device_example.cpp [outdated naming]
    example/container_sink_example.cpp [outdated naming]
    example/container_source_example.cpp [outdated naming]
    example/dictionary_filter.hpp [unused member variable]
    test/compose_test.cpp [added comments]
    test/example_test.cpp [reformatted]

[SVN r42047]
2007-12-14 19:30:07 +00:00
Vladimir Prus
f0b005fa29 Do not use peek at source files, link to the library.
[SVN r37409]
2007-04-10 06:02:10 +00:00
Vladimir Prus
3d82d1a4e1 When parts of iostream lib are directly compiled into tests, without
any DLL created, we should not set BOOST_IOSTREAMS_DYN_LIB.


[SVN r36192]
2006-11-28 08:12:02 +00:00
Vladimir Prus
de8f315f3b Allow building of shared versions of some Boost.Test libraries.
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.

Patch from Juergen Hunold.


[SVN r35989]
2006-11-10 19:09:56 +00:00
John Maddock
4718f83c38 Added dll-export options.
[SVN r35647]
2006-10-17 12:52:11 +00:00
Vladimir Prus
e3d36e5735 Don't run compression tests when compression is not available. This
avoids false failures.


[SVN r33423]
2006-03-21 17:17:44 +00:00
Vladimir Prus
c2b853b970 Update Jamfile.v2
[SVN r32488]
2006-01-31 16:31:59 +00:00
Vladimir Prus
2326f0bb79 Update Jamfile.v2
[SVN r32487]
2006-01-31 16:28:07 +00:00
Dave Abrahams
73c36ee9ea Added missing import
[SVN r31391]
2005-10-19 18:14:58 +00:00
Jonathan Turkanis
44372b3d3b added tests for modified component access
[SVN r30656]
2005-08-24 23:39:02 +00:00
John Maddock
ec8f567b96 Change Jamfile to <runtime-link>
[SVN r29738]
2005-06-22 17:03:13 +00:00
Jonathan Turkanis
0cc5562b26 updates to reflect changes to version 1 Jamfile
[SVN r29196]
2005-05-25 19:32:20 +00:00
Jonathan Turkanis
5d8a402dfa restored after accidental removal
[SVN r29195]
2005-05-25 19:29:11 +00:00
Jonathan Turkanis
57fc1ff557 obsolete
[SVN r28611]
2005-05-02 21:20:04 +00:00
Vladimir Prus
5f28194a95 Fix some paths
[SVN r28267]
2005-04-15 08:11:16 +00:00
Vladimir Prus
4416f099a8 Add V2 Jamfile
[SVN r28266]
2005-04-15 07:59:23 +00:00