Farid Zaripov wrote:
1. The files in etc/config/src which are includes the
file BAD_ALLOC_ASSIGNMENT.cpp should be compiled after the
RUNTIME_IN_STD.cpp. The BAD_ALLOC_ASSIGNMENT.cpp itself
compiled after RUNTIME_IN_STD.cpp due to
"#ifndef _RWSTD_NO_RUNTIME_IN_STD" line.
Good catch! Should we do the same for _RWSTD_NO_HONOR_STD since
it's being used in the same config tests as well? (You can commit
your change separately if you want.)
2. The file TLS.cpp uses __thread modifier, but with MSVC (and
ICC/Windows as well) should used __declspec (thread) modifier.
I have been fixed it (the diff file is attached).
Great! We will also need to make a corresponding change to rw/_defs.h
or change the test to print out the #definition of the macro. These
two should be committed simultaneously otherwise just fixing the TLS
test might break the library.
ChangeLog:
* BAD_ALLOC_COPY_CTOR.cpp: Added dependency on RUNTIME_IN_STD.cpp
* BAD_ALLOC_DEFAULT_CTOR.cpp: Ditto
* BAD_ALLOC_DTOR.cpp: Ditto
* BAD_ALLOC_WHAT.cpp: Ditto
* BAD_CAST_ASSIGNMENT.cpp: Ditto
* BAD_CAST_COPY_CTOR.cpp: Ditto
* BAD_CAST_DEFAULT_CTOR.cpp: Ditto
* BAD_CAST_DTOR.cpp: Ditto
* BAD_CAST_WHAT.cpp: Ditto
* BAD_EXCEPTION_ASSIGNMENT.cpp: Ditto
* BAD_EXCEPTION_COPY_CTOR.cpp: Ditto
* BAD_EXCEPTION_DEFAULT_CTOR.cpp: Ditto
* BAD_EXCEPTION_DTOR.cpp: Ditto
* BAD_EXCEPTION_WHAT.cpp: Ditto
* BAD_TYPEID_ASSIGNMENT.cpp: Ditto
* BAD_TYPEID_COPY_CTOR.cpp: Ditto
* BAD_TYPEID_DEFAULT_CTOR.cpp: Ditto
* BAD_TYPEID_DTOR.cpp: Ditto
* BAD_TYPEID_WHAT.cpp: Ditto
* EXCEPTION_ASSIGNMENT.cpp: Ditto
* EXCEPTION_COPY_CTOR.cpp: Ditto
* EXCEPTION_DEFAULT_CTOR.cpp: Ditto
* EXCEPTION_DTOR.cpp: Ditto
* EXCEPTION_WHAT.cpp: Ditto
* TLS.cpp [_MSC_VER]: Used modifier __declspec (thread) instead of
__thread
Also I see that THREAD_SAFE_ERRNO.cpp and THREAD_SAFE_EXCEPTIONS.cpp
are platform dependent and cannot be used on Windows.
You mean because the tests use pthreads? Yes, but we should port
them to Windows. If you don't, could you please open an issue in
Jira as a reminder?
I not ported it
because I not found using of the _RWSTD_NO_THREAD_SAFE_ERRNO nor
_RWSTD_NO_THREAD_SAFE_EXCEPTIONS macros in the source files.
They're not being used yet but they should be. The only place where
we look at errno right now that I know of is the num_get facet.
Thanks!
Martin