Sebastian Theophil
b281e9557b
Fix undefined behavior
...
managed_open_or_create_impl::priv_open_or_create calls
construct_func.get_min_size() before construct_func::operator().
The implementation of create_open_func::get_min_size called the static
function segment_manager::get_min_size() by making a member function
call on m_frontend->get_segment_manager() which is still null at this
point.
The crashes when compiling with clang’s undefined behavior sanitizer
2016-06-28 10:30:59 +02:00
Ion Gaztañaga
6fe5f1abc6
Change -pedantic warning disabling method for GCC 6, as it does not like the previous solution.
2016-06-25 11:24:38 +02:00
Ion Gaztañaga
fe75848cb6
Merge branch 'fix_mingw' of https://github.com/pavelvat/interprocess into pavelvat-fix_mingw
2015-12-23 23:29:02 +01:00
Ion Gaztañaga
e242de82aa
Replaced BOOST_FORCEINLINE with BOOST_INTERPROCESS_FORCEINLINE so it's configurable.
2015-12-23 21:42:33 +01:00
Pavel Vatagin
f2c5e598b8
Fixed case sensetive for linux mingw
2015-12-23 20:50:12 +03:00
Marshall Clow
90892fcbf9
Update gcc version check for 'diagnostic pop'
2015-12-08 11:33:16 -08:00
Marshall Clow
fe47ea6f36
Update gcc version check for 'diagnostic push'
2015-12-08 11:32:23 -08:00
Ion Gaztañaga
73b3d75cf9
- Added BOOST_FORCE_INLINE to offset_ptr function.
...
- Reimplemented pointer_plus_bits to correct bugs and use uintptr_t instead of std::size_t.
2015-10-17 00:26:24 +02:00
Ion Gaztañaga
e64e3b5acc
Remove undefined behaviour from offset_ptr. Used uintptr_t internally and all calculations are done in unsigned integers.
...
Support GCC 3.4, which does not allow advanced sfinae in assignment operators.
2015-10-14 23:29:53 +02:00
Ion Gaztañaga
1374fd2d67
Removed uninitialized variable warnings in GCC
2015-10-14 22:25:00 +02:00
Ion Gaztañaga
b0cb8716cc
Support GCC 3.4 on Mingw. Ifdef Wbemidl derived code, which is not supported by Mingw, extra cast in interlocked operations.
2015-10-14 22:24:27 +02:00
Ion Gaztañaga
a082f0826f
Reduce date_time include dependencies.
2015-10-14 22:22:18 +02:00
Ion Gaztañaga
eab4a9bd12
New documentation macros
2015-10-14 22:21:03 +02:00
Ion Gaztañaga
01ae144003
Added pragma diagnostic for GCC warnings
2015-10-14 22:20:32 +02:00
Ion Gaztañaga
e1a659468b
#undef msvc bug workaround macro after being used
2015-09-30 22:28:06 +02:00
Ion Gaztañaga
845d352287
Fixed Trac bug #11699 ("Forward declarations of std templates causes stack corruption under Visual Studio 2015")
2015-09-30 22:20:18 +02:00
Ion Gaztañaga
d4c6011831
Removed unused piecewise_construct;
2015-09-18 13:47:23 +02:00
Ion Gaztañaga
bd14ee3b0c
Use newly refactored move/detail/std_fwd_xxx.hpp headers
2015-09-14 22:39:18 +02:00
Ion Gaztañaga
e352a84dd2
Fixed Trac #5139 ("Initial Stream Position in Boost.Interprocess.Vectorstream")
2015-06-24 16:18:17 +02:00
Ion Gaztañaga
5c090a64be
Remove dead XSI code.
2015-06-23 22:57:33 +02:00
Ion Gaztañaga
9b5ccf2d4b
Cleanup commented code in exceptions.hpp and update changelog with pull #19
2015-06-23 22:11:32 +02:00
Ion Gaztañaga
88e2e960fe
Merge branch 'bugfix/exception-visibility' of https://github.com/Romain-Geissler/interprocess into Romain-Geissler-bugfix/exception-visibility
2015-06-23 22:01:25 +02:00
Ion Gaztañaga
c04a5db131
Support libc++ & gcc in std fwd declarations
2015-06-09 14:53:13 +02:00
Romain Geissler
c98d55c79f
Fix exception visibility.
2015-05-18 23:58:26 +02:00
Ion Gaztañaga
5c00dab958
Try to support GCC's versioned std namespaces in forward declarations.
2015-02-26 00:37:48 +01:00
Ion Gaztañaga
09784e6201
Include boost/config.hpp before testing BOOST_HAS_PRAGMA_ONCE.
2015-02-02 16:12:21 +01:00
Ion Gaztañaga
c35b660d52
Use BOOST_NOEXCEPT AND BOOST_NOINLINE instead of cumstom macros
2015-02-01 01:01:54 +01:00
Ion Gaztañaga
25bb48435f
- Rewritten posix features detection according to the first POSIX/Single Unix Specification that standardized it.
...
- Added macro for unnamed semaphores as OSX claims this support but returns ENOSYS, which is not very useful.
- Added macro for mapped files, as QNX does not support them.
2015-01-31 23:18:32 +01:00
Ion Gaztañaga
870d1b8e2d
Avoid octal for GCc version check
2015-01-14 15:47:49 +01:00
Ion Gaztañaga
5b20f4910d
Replaced _MSC_VER with BOOST_HAS_PRAGMA_ONCE before #pragma once.
2015-01-10 12:50:47 +01:00
Ion Gaztañaga
6c8ba8d3e9
- Erased unused test and files.
...
- Used simplified simple_swap, nothrow and placement new
2015-01-10 11:06:24 +01:00
Ion Gaztañaga
89e02ab28c
Remove Boost.Preprocessor dependency and reuse variadic tools from Container.
2015-01-08 15:39:38 +01:00
Ion Gaztañaga
a8b8eac741
More dependency reduction: Reused Boost.Move/Boost.Intrusive/Boost.Container utilities, removed some standard headers.
...
Removed some GCC warnings.
2015-01-07 00:56:27 +01:00
Ion Gaztañaga
256eb4e6cd
Use <boost/container/detail/minimal_char_traits_header.hpp> to avoid including <string> when possible.
2015-01-04 02:33:38 +01:00
Ion Gaztañaga
37d00bc798
Compile-time dependency reduction. Update to Boost.Container changes.
2015-01-02 19:40:37 +01:00
Ion Gaztañaga
2f61f8543c
Merge branch 'feature/haiku-support' of https://github.com/jessicah/interprocess into jessicah-feature/haiku-support
2014-11-22 09:18:49 +01:00
Ion Gaztañaga
366b20dfc9
Use boost::long_long_type to avoid warnings in -pedantic
2014-11-22 09:16:45 +01:00
Adrien Destugues
8fb11b021b
haiku: we don't have XSI shared memory, so don't try to use it.
...
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-11-16 13:43:52 +13:00
Ion Gaztañaga
060efcfffb
Put the forward declaration of _ReadWriteBarrier before the intrinsic pragma to avoid errors in some MSVC versions
2014-10-18 17:58:22 +02:00
Ion Gaztañaga
ddb2bf50c0
Add Mingw support, as _ReadWriteBarrier is a MSVC intrinsic.
2014-10-18 17:42:29 +02:00
Ion Gaztañaga
ac06eb010a
Removed GCC warnings about unused parameters
2014-10-13 23:33:30 +02:00
Ion Gaztañaga
7d9f58ca99
Added missing #pragma once
2014-10-13 23:26:57 +02:00
Ion Gaztañaga
2c4f35f282
Fixes Trac #10506
2014-10-04 11:42:22 +02:00
Marcel Raad
cc1aebc7ac
Compile fix for BOOST_USE_WINDOWS_H
...
If BOOST_USE_WINDOWS_H is defined, the call to get_system_info has to be qualified with an explicit namespace.
2014-09-26 11:15:42 +02:00
Ion Gaztañaga
e1b438f64f
Added explanations about template parameters in offset_ptr
2014-09-22 00:18:19 +02:00
Ion Gaztañaga
69ad21ad02
Made deallocation function more readable and removed dead code
2014-09-14 23:50:27 +02:00
Ion Gaztañaga
d0d3d7211f
Added extra size check for BOOST_ASSERT when previous block is free
2014-09-10 23:20:52 +02:00
Ion Gaztañaga
19e6101b9e
Specified template parameter in get_rounded_size to avoid compilation errors in some compilers.
2014-08-31 21:40:36 +02:00
Ion Gaztañaga
4986d95b8e
Merge branch 'patch-1' of https://github.com/MarcelRaad/interprocess into MarcelRaad-patch-1
2014-08-31 21:38:42 +02:00
Ion Gaztañaga
0420041e8d
Removed unique_ptr and forwarded boost::interprocess::unique_ptr to boost::movelib::unique_ptr
2014-08-27 23:52:12 +02:00
Marcel Raad
32be68c9a2
Compile fix for BOOST_USE_WINDOWS_H
...
With BOOST_USE_WINDOWS_H defined, get_process_times must be explicitly prefixed with the winapi namespace because ADL cannot deduce it.
2014-08-25 17:04:34 +02:00
Ion Gaztañaga
5a976aa521
Use ___sync_synchronize instead of ___atomic as the later is only available in latest builds.
2014-08-14 01:01:01 +02:00
Ion Gaztañaga
e8c4994b45
Merge branch 'master' of https://github.com/DonOregano/interprocess into DonOregano-master
2014-08-14 00:33:59 +02:00
Lars Hagström
fb52749ed2
fix memory barriers in atomic operations
2014-08-12 10:29:39 +02:00
Ion Gaztañaga
4e56b3c032
Reorganized Doxygen marks to obtain a better header reference
2014-08-04 00:18:14 +02:00
Ion Gaztañaga
58019f0d9a
Trac #10229 : Compiling errors in interprocess\detail\os_file_functions.hpp
2014-07-31 23:41:05 +02:00
Ion Gaztañaga
3c09ceec0c
Renamved variable "hz" as it conflicts with AIX's system variable.
2014-07-30 16:38:50 +02:00
Ion Gaztañaga
ad1b7f301c
Massive but simple changes:
...
- Removed all tabs
- Changed all Doxygen @cond/@endcond tags with preprocessor sections, as Doxygen still has some problems when parsing this code. This also makes unmatched Doxygen sections a compilation error, which is easier to detect.
2014-07-30 11:46:32 +02:00
Adam Wulkiewicz
048c570c70
Fix compilation error in MinGW, invalid return type (pointer to function)
2014-07-28 13:47:26 +02:00
Ion Gaztañaga
dfed5bbab5
Fixes #10230 : No Sleep in interprocess::winapi
2014-07-28 00:09:47 +02:00
Ion Gaztañaga
06eef6f4e8
intermodule_singleton fixes for many platforms:
...
- Use Boost.Container to allow debug-release mixed code (in some platforms, std:: containers' ABI changes from Debug to Release)
- By default non-Phoenix and Lazy singletons.
- Use atexit instead of the global object destructor to obtain LIFO semantics.
- Avoid testing Phoenix singletons, as in many plataforms calling atexit from atexit is not supported.
2014-07-14 23:34:17 +02:00
Ion Gaztañaga
a3e766e635
Fix compilation error in Mingw, GetProcAddress does not return void*, but a pointer to function
2014-07-14 23:32:16 +02:00
Ion Gaztañaga
de72bbf2d8
Fixed vector_test and cleaned up intermodule singleton code.
2014-07-10 21:38:52 +02:00
Ion Gaztañaga
fe40c36e6c
Removed unused variable and strict aliasing warnings in GCC.
2014-06-16 21:07:10 +02:00
Ion Gaztañaga
1eb0000ac9
Fixed unused variable and redeclaration warnings.
2014-06-06 14:06:53 +02:00
Ion Gaztañaga
360a39d078
Removed unneeded dependency from Boost.Math
2014-06-06 14:06:11 +02:00
Adam Wulkiewicz
0be5672e70
Fix MinGW warnings caused by the unknown MSVC pragmas
2014-06-06 00:51:51 +02:00
Ion Gaztañaga
aa09229e8a
Fixes #10011 segment_manager::find( unique_instance_t* ) fails to compile
2014-06-02 14:40:19 +02:00
Ion Gaztañaga
81a5fcf56d
Removed trailing whitespaces.
2014-05-28 15:48:09 +02:00
Ion Gaztañaga
de405e89a3
* If BOOST_USE_WINDOWS_H
is defined, <windows.h> and other windows SDK files are included,
...
otherwise the library declares needed functions and structures to reduce the impact of including
those heavy headers.
* Added `get_size` to windows_shared_memory.
2014-05-28 15:30:04 +02:00
Ion Gaztañaga
02a7e7ecf2
More interprocess_exception fixes & #ifdef rephrasings
2014-05-25 20:50:39 +02:00
Adam Wulkiewicz
d0a647b129
Rephrase the #ifdef in errors.hpp
2014-05-25 17:21:50 +02:00
Adam Wulkiewicz
f1e1af0a47
Fix interprocess_exception throw in file_wrapper::priv_open_or_create.
...
On Windows the exception object is created using the result of GetLastError().
When compiled using MinGW the throw instruction itself is using some WinApi call which overwrites the last error.
Therefore the error code must be retrieved before the exception is thrown.
2014-05-25 17:13:35 +02:00
Richard Dale
ec7b1726a6
Provide support for the Cray C++ compiler. The Cray compiler defines __GNUC__
...
and generally supports gnu extensions to C and C++. It does not, however, support
inline assembly. The changes here are to avoid inline assembly when _CRAYC is asserted
in the preprocessor.
2014-05-20 13:14:53 -05:00
Ion Gaztañaga
fb1b0e547c
Fixes #9767 (bootstamp generation causes error in case of corrupt Windows Event Log) and #9911 (get_tmp_base_dir(...) failure)
2014-04-28 01:21:03 +02:00
Ion Gaztañaga
9191d2cca6
Fixed #9946 : ret_ptr uninitialized in init_atomic_func, fini_atomic_func
2014-04-26 23:47:09 +02:00
Ion Gaztañaga
65b5d34a04
Fixes #9835 , typos and MSVC version offset_ptr branchless optimization fix.
2014-04-08 06:50:52 +02:00
Ion Gaztañaga
cdda0f1854
Workaround for MSVC2013 x64
2014-02-15 00:15:39 +01:00
Ion Gaztañaga
0526a090be
Fixed previous git reset error.
2014-02-14 23:20:54 +01:00
Ion Gaztañaga
a0ea486cf6
Merge branch 'develop'
2014-02-14 20:03:03 +01:00
Ion Gaztañaga
f5f5c8c903
- Removed old fully_mapped_file.hpp header provoked by git transition
...
- Typo and extra space fix.
2013-12-23 10:21:59 +01:00
Ion Gaztañaga
07bb8d0940
Fixed error when adding os_thread_func_ptr_deleter, UNIX OSs also use it.
...
[SVN r86777]
2013-11-20 17:10:43 +00:00
Ion Gaztañaga
ecfec55cc9
Fixes #9408 ("Android does not support XSI_SHARED_MEMORY_OBJECTS")
...
[SVN r86765]
2013-11-19 11:53:51 +00:00
Ion Gaztañaga
7550571040
Removed auto_ptr to avoid deprecation warnings in newer compilers.
...
[SVN r86749]
2013-11-18 09:33:36 +00:00
Ion Gaztañaga
0773ececab
Fixes unfinished code in timed_wait for systems without POSIX timeout support, such as Darwin
...
[SVN r86529]
2013-10-31 08:54:12 +00:00
Ion Gaztañaga
960f8f35fd
Fixes #9284 ("WaitForSingleObject(mutex) must handle WAIT_ABANDONED")
...
[SVN r86512]
2013-10-29 08:05:27 +00:00
Ion Gaztañaga
467ba673d3
Simplified, refactored and unified (timed_)lock code based on try_lock(). There were several bugs in when handling timeout expirations.
...
[SVN r86511]
2013-10-29 07:39:21 +00:00
Ion Gaztañaga
94cfd64cfe
Fixes #9285
...
[SVN r86476]
2013-10-27 12:28:55 +00:00
Ion Gaztañaga
2fe567ffad
Fixes #9288
...
[SVN r86475]
2013-10-27 12:16:43 +00:00
Ion Gaztañaga
ffcddef660
Fixes #9226 (On some computers, Common Appdata is empty in registry, so boost interprocess cannot work)
...
[SVN r86318]
2013-10-15 09:07:36 +00:00
Ion Gaztañaga
b91dd9efbc
Removed incorrect assert(0) introduced when resolving #9221
...
[SVN r86317]
2013-10-15 08:54:28 +00:00
Ion Gaztañaga
a4ce866747
Fixes #9221 ("message_queue deadlock on linux")
...
[SVN r86316]
2013-10-15 08:02:09 +00:00
Ion Gaztañaga
5fb241ea57
Fixes #9248 ("os_file_functions.hpp: delete_subdirectories_recursive Win32 HANDLE leak")
...
[SVN r86304]
2013-10-14 19:50:13 +00:00
Ion Gaztañaga
5565248b45
Don't use EAGAIN as it's not used and requires missing cerrno
...
[SVN r86089]
2013-09-30 21:01:45 +00:00
Ion Gaztañaga
d472972da5
Don't use EAGAIN as it's not used and requires missing cerrno
...
[SVN r86088]
2013-09-30 21:01:27 +00:00
Ion Gaztañaga
94b33a6b0b
Notify all waiting threads in destructor to allow POSIX semantics on condition variables destruction.
...
[SVN r86001]
2013-09-29 11:46:58 +00:00
Ion Gaztañaga
cfbcaa43c3
Changed #include <boost/type_traits.hpp> with <boost/type_traits/alignment_of.hpp> + <boost/type_traits/make_unsigned.hpp> to avoid unnecessary header includes.
...
[SVN r86000]
2013-09-29 11:44:19 +00:00
Stephen Kelly
d3794a5d38
Remove obsolete MSVC check from pragma guard
...
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq
is now clean.
[SVN r85952]
2013-09-26 13:02:51 +00:00
Stephen Kelly
40e5c3adab
Interprocess: Remove obsolete MSVC version check
...
[SVN r85935]
2013-09-26 09:41:56 +00:00
Ion Gaztañaga
aa6dd59f3b
Last merge for 1.55 (Interprocess)
...
[SVN r85705]
2013-09-16 17:01:45 +00:00