You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by matlo607 <gi...@git.apache.org> on 2018/08/23 09:09:09 UTC

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

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 <ma...@...>
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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


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

Posted by matlo607 <gi...@git.apache.org>.
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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


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

Posted by astitcher <gi...@git.apache.org>.
Github user astitcher commented on the issue:

    https://github.com/apache/qpid-proton/pull/154
  
    That's curious: When I do the same against upstream master I find WIN32 used in `c/include/proton/import_export.h`. Are you checking against the upstream master?
    I did think it was used in more places, but I realise those places are the CMake files so don't matter for this purpose.


---

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


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

Posted by astitcher <gi...@git.apache.org>.
Github user astitcher commented on the issue:

    https://github.com/apache/qpid-proton/pull/154
  
    This looks fine, but you have ignored the c code in the tree - is there a reason for that?


---

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


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

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

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