qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-7926) [c++ broker] Windows build error "cannot convert from 'int' to 'qpid::sys::PODMutex"
Date Mon, 09 Apr 2018 21:10:00 GMT

    [ https://issues.apache.org/jira/browse/QPID-7926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431294#comment-16431294
] 

ASF GitHub Bot commented on QPID-7926:
--------------------------------------

GitHub user alanconway opened a pull request:

    https://github.com/apache/qpid-cpp/pull/13

    QPID-7926: [c++ broker] Windows build error "cannot convert from 'int…

    …' to 'qpid::sys::PODMutex'"
    
    Renamed PODMutex as GlobalMutex. The important point is that it can be used as a
    global variable. In POSIX we use a POD class and static initializer to acomplish
    this, but on windows we use boost::recursive_mutex, which is documented as being
    safe for use as a global variable.
    
    Modified the QPID_MUTEX_INITIALIZER macro to be empty on windows and '= { 0 }'
    on POSIX.
    
    This closes #11

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alanconway/qpid-cpp winfix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-cpp/pull/13.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13
    
----
commit e078f320b656fb1b5c79b3a9e490fca23e4d03f7
Author: Justin Ross <jross@...>
Date:   2018-03-28T13:40:03Z

    QPID-7926: [c++ broker] Windows build error "cannot convert from 'int' to 'qpid::sys::PODMutex'"
    
    Renamed PODMutex as GlobalMutex. The important point is that it can be used as a
    global variable. In POSIX we use a POD class and static initializer to acomplish
    this, but on windows we use boost::recursive_mutex, which is documented as being
    safe for use as a global variable.
    
    Modified the QPID_MUTEX_INITIALIZER macro to be empty on windows and '= { 0 }'
    on POSIX.
    
    This closes #11

----


> [c++ broker] Windows build error "cannot convert from 'int' to 'qpid::sys::PODMutex"
> ------------------------------------------------------------------------------------
>
>                 Key: QPID-7926
>                 URL: https://issues.apache.org/jira/browse/QPID-7926
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: qpid-cpp-1.36.0
>         Environment: Windows Server 2012 R2, Visual Studio 2012, x64 build
> Today's master branch
>            Reporter: Chuck Rolke
>            Priority: Major
>
> {noformat}
> 1>------ Build started: Project: qpidcommon, Configuration: Debug x64 ------
> 1>  Logger.cpp
> 1>D:\Users\crolke\git\qpid-cpp\src\qpid\log\Logger.cpp(48): error C2440: 'initializing'
: cannot convert from 'int' to 'qpid::sys::PODMutex'
> 1>          No constructor could take the source type, or constructor overload resolution
was ambiguous
> {noformat}
> The issue is with the definition of QPID_MUTEX_INITIALIZER.
> In Linux it is defined as PTHREAD_MUTEX_INITIALIZER which is a complex structure initializer.
> In Windows it is a naked 0.
> In a stand-alone windows program
> {noformat}
> std::is_pod<PODMutex>::value
> {noformat}
> returns false. In Linux the same statement in qpidd broker returns true.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message