PROTON-596: change raw .bat file to .bat.in for use in cmake configure

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1600907 13f79535-47bb-0310-9956-ffa450edef68
PROTON-596: Add cmake configure_file to customize config.bat for windows builds.

1. Cmake on windows produces all four cmake configurations (debug, relwithdebinfo, ...) on one pass. Producing N config.bat files, one for each configuration, seems like overkill. The build produces just one config.bat that that is set up for RelWithDebInfo.

2. The prototype bash file config.sh does several conditional tests for sensing the build and changing the environment accordingly. The windows version flattens these tests out and forces the settings every time. It's easier to understand this way and requires a lot less testing for proof. Only the Python binding has been exercised; Ruby, Perl, and PHP not so much.

3. A typical 32-bit VS2010 run:
  > mkdir build
  > mkdir install
  > cd build
  > call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" x86
  > cmake -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=../install ..
  > devenv proton.sln /build "RelWithDebInfo|Win32" /project INSTALL
  > devenv proton.sln /build "Debug|Win32" /project INSTALL
  > call config.bat
  > ctest -VV

There is one python test that fails regularly (out of 282).


git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1600924 13f79535-47bb-0310-9956-ffa450edef68
PROTON-595: Accomodate windows when launching Popen(xxx.py,...)

Detects running on windows and in that case runs Popen with shell=True.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1600981 13f79535-47bb-0310-9956-ffa450edef68
PROTON-596: Suppress MSVC warnings

This suppression covers:

>..\..\proton-c\src\object\object.c(232): 
   warning C4244: 'argument' : conversion from 'ssize_t' to 'int',
   possible loss of data
2>..\..\proton-c\src\object\object.c(260):
   warning C4267: 'argument' : conversion from 'size_t' to 'int',
   possible loss of data
2>..\..\proton-c\src\windows\driver.c(777):
   warning C4800: 'int' : forcing value to bool 'true' or 'false'
   (performance warning)
6>..\..\..\..\..\tests\tools\apps\c\msgr-recv.c(90): 
   warning C4996: 'sscanf': This function or variable may be unsafe.
   Consider using sscanf_s instead. 
   To disable deprecation, use _CRT_SECURE_NO_WARNINGS

This covers the majority of the warnings. A typical 64-bit compile has 172 
warnings making real problems harder to see. It also follows the
pattern used in Qpid proper.

* C4244 and C4267 could still be real problems.
  Try enabling -Wconversion in GCC if you want to be pedantic in Qpid or
  Proton.

* C4800 is probably not a risk as it's a fairly idiomatic pattern in C.

* C4996 is MSVC complaining of functions that consume buffers using
 {pointer} and not {pointer, size}. They have been the source of seg
 faults and innumerable security vulnerabilities throughout the years.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1601010 13f79535-47bb-0310-9956-ffa450edef68
PROTON-602: Fix syntax errors in Perl.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1601971 13f79535-47bb-0310-9956-ffa450edef68
PROTON-603: testCreditReclaim fails on windows
The issue is that during 'while client2.work(0): self.pump()' 
on windows the credit rebalancing is already happening. 
Testing that it hasn't yet happened causes the failure. 
The only safe thing to do is to keep calling pump and 
verify that the expected credits are achieved eventually.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1602016 13f79535-47bb-0310-9956-ffa450edef68
PROTON-604: Fixed help message for Perl send example.

Modified the patch slightly to not attempt to perform a connection if
help was displayed.

Contributed by Ernie Allen <eallen@redhat.com>

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1602276 13f79535-47bb-0310-9956-ffa450edef68
PROTON-595: Python Popen() failure on Windows
Reviewed at https://reviews.apache.org/r/22273/
This patch incorporates both of astitcher's review comments.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1602290 13f79535-47bb-0310-9956-ffa450edef68
PROTON-607: Perl recv only shows subject if received

Put a guard in place to only display the subject line if the message has
a subject.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1602412 13f79535-47bb-0310-9956-ffa450edef68
PROTON-606: Python testReclaimCredit exposes test server messenger hang on windows
Move client2 into NBMessengerTest scope and include it in main pump loop.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1602513 13f79535-47bb-0310-9956-ffa450edef68
PROTON-606: Python testReclaimCredit: fix for windows causes hang in RHEL6 32-bit
This patch calls work() for each messenger even if it is stopped in order to
force a transition to stopped.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1603230 13f79535-47bb-0310-9956-ffa450edef68
change events to use a single context
removed extraneous is_valid check
removed type specific initializers
check that finalize did not create a new ref
don't zero out refcount in pn_finalize
added assert for null event context; fixed pn_collector_pop to decref context prior to adding event back to the free list
added PN_{CONNECTION,SESSION,LINK}_FINAL events
removed unneeded helper function
made pn_collector_put take the context as an argument