[GitHub] qpid-proton issue #154: Replace user-defined macro WIN32 by compiler-defined...

2018-08-23 Thread matlo607
Github user matlo607 commented on the issue:

https://github.com/apache/qpid-proton/pull/154
  
Actually everything looks correct in the C code.
Here below is the result of `git grep WIN32`.
```
CMakeLists.txt:382:  if(WIN32)
c/CMakeLists.txt:22:if(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:25:endif(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:380:  if(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:387:  endif(WIN32 AND NOT CYGWIN)
c/examples/CMakeLists.txt:40:if(WIN32)
c/examples/broker.c:38:#if defined(_WIN32)
c/examples/send-ssl.c:54:#if defined(_WIN32)
CMakeLists.txt:382:  if(WIN32)
c/CMakeLists.txt:22:if(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:25:endif(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:380:  if(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:387:  endif(WIN32 AND NOT CYGWIN)
c/examples/CMakeLists.txt:40:if(WIN32)
c/examples/broker.c:38:#if defined(_WIN32)
c/examples/send-ssl.c:54:#if defined(_WIN32)
CMakeLists.txt:382:  if(WIN32)
c/CMakeLists.txt:22:if(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:25:endif(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:380:  if(WIN32 AND NOT CYGWIN)
c/CMakeLists.txt:387:  endif(WIN32 AND NOT CYGWIN)
c/examples/CMakeLists.txt:40:if(WIN32)
c/examples/broker.c:38:#if defined(_WIN32)
c/examples/send-ssl.c:54:#if defined(_WIN32)
c/examples/thread.h:24:#ifdef _WIN32
c/include/proton/import_export.h:36:#if defined(_WIN32) && 
!defined(PROTON_DECLARE_STATIC)
c/include/proton/import_export.h:69:#  if defined(_WIN32)
c/include/proton/selectable.h:59:#if defined(_WIN32) && ! 
defined(__CYGWIN__)
c/src/reactor/io/windows/io.c:23:#ifndef _WIN32_WINNT
c/src/reactor/io/windows/io.c:24:#define _WIN32_WINNT 0x0501
c/src/reactor/io/windows/io.c:26:#if _WIN32_WINNT < 0x0501
c/src/reactor/io/windows/iocp.c:22:#ifndef _WIN32_WINNT
c/src/reactor/io/windows/iocp.c:23:#define _WIN32_WINNT 0x0501
c/src/reactor/io/windows/iocp.c:25:#if _WIN32_WINNT < 0x0501
c/src/reactor/io/windows/selector.c:22:#ifndef _WIN32_WINNT
c/src/reactor/io/windows/selector.c:23:#define _WIN32_WINNT 0x0501
c/src/reactor/io/windows/selector.c:25:#if _WIN32_WINNT < 0x0501
c/src/reactor/io/windows/write_pipeline.c:30:#ifndef _WIN32_WINNT
c/src/reactor/io/windows/write_pipeline.c:31:#define _WIN32_WINNT 0x0501
c/src/reactor/io/windows/write_pipeline.c:33:#if _WIN32_WINNT < 0x0501
c/src/ssl/openssl.c:33:#ifndef _WIN32_WINNT
c/src/ssl/openssl.c:34:#define _WIN32_WINNT 0x0501
c/src/ssl/openssl.c:36:#if _WIN32_WINNT < 0x0501
c/src/ssl/openssl.c:1531:#ifdef _WIN32
c/src/ssl/schannel.c:46:#define SECURITY_WIN32
c/src/ssl/schannel.c:50:#undef SECURITY_WIN32
c/tests/CMakeLists.txt:76:  if(WIN32)
c/tests/CMakeLists.txt:78:  else(WIN32)
c/tests/CMakeLists.txt:80:  endif(WIN32)
c/tests/proactor.c:700:#if defined(_WIN32)
c/tests/proactor.c:1095:#if !defined(_WIN32)
c/tests/ssl.c:67:#if !defined(_WIN32)
c/tests/thread.h:24:#ifdef _WIN32
c/tools/include/pncompat/misc_defs.h:42:#elif !defined(_WIN32) || defined 
(__CYGWIN__)
c/tools/include/pncompat/misc_funcs.inc:41:#if defined(_WIN32) && ! 
defined(__CYGWIN__)
c/tools/include/pncompat/misc_funcs.inc:45:#if defined(_WIN32) && ! 
defined(__CYGWIN__)
cpp/examples/CMakeLists.txt:108:  if(WIN32)
cpp/examples/CMakeLists.txt:110:  else(WIN32)
cpp/examples/CMakeLists.txt:112:  endif(WIN32)
```


---

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



[GitHub] qpid-proton pull request #154: Replace user-defined macro WIN32 by compiler-...

2018-08-23 Thread matlo607
GitHub user matlo607 opened a pull request:

https://github.com/apache/qpid-proton/pull/154

Replace user-defined macro WIN32 by compiler-defined _WIN32

On Windows, if qpid-proton is used by another build system (still compiling 
with VC) than a Visual Studio project, `/D WIN32` is not automatically set on 
the command line.

Today both `WIN32` and `_WIN32` can be found in the source code.

The idea here are:
* removing this uncertainty by using `_WIN32` that is automatically set by 
the compiler
* having a better uniformity across the source code.

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

$ git pull https://github.com/matlo607/qpid-proton replace-WIN32-by-_WIN32

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

https://github.com/apache/qpid-proton/pull/154.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 #154


commit ee3484bc506e098932de7963426d71837b98b8a7
Author: Matthieu Longo 
Date:   2018-08-22T13:53:01Z

Replace user-defined macro WIN32 by compiler-defined _WIN32

More information are available at 
https://stackoverflow.com/questions/662084/whats-the-difference-between-the-win32-and-win32-defines-in-c




---

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



[GitHub] qpid-dispatch pull request #288: Refactor cmake to use modern feature

2018-04-18 Thread matlo607
GitHub user matlo607 opened a pull request:

https://github.com/apache/qpid-dispatch/pull/288

Refactor cmake to use modern feature

I wanted to create a recipe for [Conan](https://www.conan.io/) and I 
experienced some issue with the build system.

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

$ git pull https://github.com/matlo607/qpid-dispatch 
cmake-refactor-compiler-flags

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

https://github.com/apache/qpid-dispatch/pull/288.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 #288


commit 1a8e023fffe3bb6b6d130d96f2c03238af67d2a3
Author: Matthieu Longo <mateo.longo@...>
Date:   2018-04-13T10:33:15Z

[cmake] fix indent

commit f6ac7e63891d188d507bba31efdb71fe21e1ade1
Author: Matthieu Longo <mateo.longo@...>
Date:   2018-04-13T10:12:47Z

[cmake] change build scripts to use features from modern CMake 3.+




---

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



[GitHub] qpid-proton pull request #141: [windows] build fails if CMAKE_MODULE_PATH is...

2018-04-11 Thread matlo607
GitHub user matlo607 opened a pull request:

https://github.com/apache/qpid-proton/pull/141

[windows] build fails if CMAKE_MODULE_PATH is not empty, use 
CMAKE_SOURCE_DIR instead



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

$ git pull https://github.com/matlo607/qpid-proton 
build-windows-python-script-path

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

https://github.com/apache/qpid-proton/pull/141.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 #141


commit 884579dbca93cb32959896776db8839a20534d78
Author: Matthieu Longo <matthieu.longo@...>
Date:   2018-04-09T09:33:57Z

[windows] build fails if CMAKE_MODULE_PATH is not empty, use 
CMAKE_SOURCE_DIR instead




---

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



[GitHub] qpid-proton issue #113: [Solaris] fix build with gcc-4.9

2017-07-27 Thread matlo607
Github user matlo607 commented on the issue:

https://github.com/apache/qpid-proton/pull/113
  
Hello,

Is the build on Windows meeting some issues ?
The errors are not related at all to my changes and I met exactly the same 
problem in another pull request (fix-path-test-binaries) on Windows.

```
24: ==
24: ERROR: test_ssl_no_name (__main__.ContainerExampleSSLTest)
24: --
24: Traceback (most recent call last):
24:   File "C:/projects/qpid-proton/examples/cpp/example_test.py", line 
253, in tearDown
24: super(ContainerExampleSSLTest, self).tearDown()
24:   File "C:/projects/qpid-proton/examples/cpp/example_test.py", line 
108, in tearDown
24: raise ProcError(b, "broker crash")
24: ProcError: ['broker', '-a', 'APPVYR-WIN:1650'] broker crash, 
code=-1073740791
24: 
24: broker listening on APPVYR-WIN:1650
24: fixme: dangling listener_maybe_free.  aborting
24: 
24: 
24: 
24: --
24: Ran 4 tests in 1.391s
24: 
24: FAILED (errors=8)
24/24 Test #24: cpp-example-container-ssl ***Failed1.48 sec
88% tests passed, 3 tests failed out of 24
Total Test time (real) =  28.40 sec
The following tests FAILED:
 10 - cpp-container_test (OTHER_FAULT)
 23 - cpp-example-container (Failed)
 24 - cpp-example-container-ssl (Failed)
Errors while running CTest
Command exited with code 8
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] qpid-proton pull request #113: [Solaris] fix build with gcc-4.9

2017-07-26 Thread matlo607
GitHub user matlo607 opened a pull request:

https://github.com/apache/qpid-proton/pull/113

[Solaris] fix build with gcc-4.9



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

$ git pull https://github.com/matlo607/qpid-proton fix-build-gcc49-solaris

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

https://github.com/apache/qpid-proton/pull/113.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 #113


commit 6d587f2c3e6bd7f27d16983f288c7e23638c9a19
Author: Matthieu Longo <matthieu.lo...@murex.com>
Date:   2017-07-24T13:04:07Z

fix build errors triggered by -Werror=parentheses

commit c7b426439000c989462299f4deade938256836c1
Author: Matthieu Longo <matthieu.lo...@murex.com>
Date:   2017-07-24T13:17:38Z

[solaris] change linker's flags since GCC uses Solaris's default linker

commit ea8fbf89872a1642108314af1db89a707c6a7ef2
Author: Matthieu Longo <matthieu.lo...@murex.com>
Date:   2017-07-26T12:58:53Z

[solaris] add extra linker flag -lsocket

commit 4227f197f21d1a633c1bda132ff9084d99cd0e10
Author: Matthieu Longo <matthieu.lo...@murex.com>
Date:   2017-07-26T14:38:47Z

[solaris] fix -Werror=implicit-function-declaration on getopt()




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] qpid-proton issue #112: fix paths to test binaries

2017-07-26 Thread matlo607
Github user matlo607 commented on the issue:

https://github.com/apache/qpid-proton/pull/112
  
@astitcher 
Please could you give me some hints to fix the build on Windows ?
I don't have a clue and a Windows machine too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] qpid-proton pull request #112: fix paths to test binaries

2017-07-21 Thread matlo607
GitHub user matlo607 opened a pull request:

https://github.com/apache/qpid-proton/pull/112

fix paths to test binaries

I could not execute the unit tests on Linux after a build with the package 
manager conan.
I got various errors as below :
```
Could not find executable 
/home/vagrant/.conan/data/qpid-proton/0.17.0/murex/testing/build/0a97a1801350fba2ff4f9c864097f04752c8d5c5/build-dir/proton-c/bindings/cpp/codec_test
...
The following tests passed:
python-test
cpp-example-container

11% tests passed, 17 tests failed out of 19

Total Test time (real) =  38.84 sec

The following tests FAILED:
  2 - cpp-codec_test (Not Run)
  3 - cpp-thread_safe_test (Not Run)
  4 - cpp-interop_test (Not Run)
  5 - cpp-message_test (Not Run)
  6 - cpp-scalar_test (Not Run)
  7 - cpp-value_test (Not Run)
  8 - cpp-container_test (Not Run)
  9 - cpp-url_test (Not Run)
 10 - c-object-tests (Not Run)
 11 - c-message-tests (Not Run)
 12 - c-engine-tests (Not Run)
 13 - c-parse-url-tests (Not Run)
 14 - c-refcount-tests (Not Run)
 15 - c-reactor-tests (Not Run)
 16 - c-event-tests (Not Run)
 17 - c-data-tests (Not Run)
 18 - c-condition-tests (Not Run)
Errors while running CTest
```
To reproduce the initial problem, please feel free to use this conan recipe 
:
```cmake
PROJECT(conan-qpid-proton)
cmake_minimum_required(VERSION 2.8)
include(${CMAKE_CURRENT_SOURCE_DIR}/../conanbuildinfo.cmake)
CONAN_BASIC_SETUP()

macro(use_cxx11)
if(CMAKE_VERSION VERSION_LESS "3.1")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
endif()
else()
set(CMAKE_CXX_STANDARD 11)
endif()
endmacro(use_cxx11)

if(CXX_14)
MESSAGE("Activating CXX_STANDARD 14")
set(CMAKE_CXX_STANDARD 14)
else()
MESSAGE("Not activating CXX_STANDARD 14")
MESSAGE("Activating CXX_STANDARD 11")
use_cxx11()
endif()

include("CMakeListsOriginal.cmake")
```
```python
#!/usr/bin/env python

import os
import shutil
from conans import ConanFile, CMake

def _defs_to_string(defs):
return " ".join(['-D{0}="{1}"'.format(k, v) for k, v in defs.items()])

class QpidProtonConan(ConanFile):
name = 'qpid-proton'
version = '0.17.0'
license = "https://github.com/apache/qpid-proton/blob/master/LICENSE;
settings = "os", "compiler", "build_type", "arch"
options = {
"PIC": [True, False],
"shared": [True, False],
"include_pdbs": [True, False],
"tests": [True, False],
"std": ['c++98', 'c++11']
}
default_options = "PIC=True", "shared=True", "include_pdbs=False", 
"tests=False", "std=c++11"
sources = "https://github.com/apache/qpid-proton.git;
source_dir = "qpid-proton"
generators = "cmake"
exports_sources = "CMakeLists.txt"

def source(self):
self.run("git clone %s" % (self.sources))
self.run("cd %s && git checkout tags/%s" % (self.source_dir, 
self.version))
os.rename(os.path.join(self.source_dir, 'CMakeLists.txt'), 
os.path.join(self.source_dir, 'CMakeListsOriginal.cmake'))
shutil.move('CMakeLists.txt', self.source_dir)

def requirements(self):
self.requires("OpenSSL/1.0.2l@conan/stable")

def build(self):
cmake = CMake(self.settings)
cmake.definitions['CMAKE_C_FLAGS'] = '-D_REENTRANT'
cmake.definitions['CMAKE_CXX_FLAGS'] = '-D_REENTRANT -std=%s' % 
(self.options.std)
cmake.definitions['CMAKE_SHARED_LINKER_FLAGS'] = '-ldl'
cmake.definitions['CMAKE_INSTALL_PREFIX'] = '%s' % 
(self.package_folder)
#cmake.definitions['CMAKE_VERBOSE_MAKEFILE:BOOL'] = 'ON'

python_home = os.environ['PYTHONHOME']

cmake_defs = dict()
cmake_defs['ENABLE_VALGRIND'] = 'OFF'
# proton-j was removed in version 0.17.0 and '-DBUILD_JAVA' becomes 
obsolete
cmake_defs['BUILD_JAVA'] = 'OFF'
cmake_defs['BUILD_PERL'] = 'OFF'
cmake_defs['BUILD_PHP'] = 'OFF'
cmake_defs['BUILD_PYTHON'] = 'ON'
cmake_defs['BUILD_RUBY'] = 'OFF'
cmake_de