[jira] [Resolved] (PROTON-106) OS X: MSG_NOSIGNAL does not exist
[ https://issues.apache.org/jira/browse/PROTON-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Stitcher resolved PROTON-106. Resolution: Fixed Fix Version/s: 0.3 Assignee: Andrew Stitcher This is fixed by making the build use either MSG_NOSIGNAL or SO_NOSIGPIPE depending on what is available. OS X: MSG_NOSIGNAL does not exist - Key: PROTON-106 URL: https://issues.apache.org/jira/browse/PROTON-106 Project: Qpid Proton Issue Type: Bug Components: proton-c Reporter: Hiram Chirino Assignee: Andrew Stitcher Fix For: 0.3 MSG_NOSIGNAL is used in proton-c/src/driver.c but it does not exist on OS X. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-121) Platform specific code is mixed in with platform independent code
[ https://issues.apache.org/jira/browse/PROTON-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13510835#comment-13510835 ] Andrew Stitcher commented on PROTON-121: A good (perhaps the only) example of this is the use of ntohl() in the engine code. ntohl() is part of the BSD sockets API and not defined in ANSI C at all. Platform specific code is mixed in with platform independent code - Key: PROTON-121 URL: https://issues.apache.org/jira/browse/PROTON-121 Project: Qpid Proton Issue Type: Bug Components: proton-c Reporter: Andrew Stitcher the function pn_error_from errno() is platform specific and so should not be in error.c which is (everywhere else) purely platform independent. It should be moved to a platform (POSIX) specific file (perhaps a file with only this single function). [The clue for this is the #define POSIX_C_SOURCE at the top of error.c] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-121) Platform specific code is mixed in with platform independent code
[ https://issues.apache.org/jira/browse/PROTON-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13510841#comment-13510841 ] Andrew Stitcher commented on PROTON-121: Another example is the use of strcasecmp() which again is not part of ANSI C. Platform specific code is mixed in with platform independent code - Key: PROTON-121 URL: https://issues.apache.org/jira/browse/PROTON-121 Project: Qpid Proton Issue Type: Bug Components: proton-c Reporter: Andrew Stitcher the function pn_error_from errno() is platform specific and so should not be in error.c which is (everywhere else) purely platform independent. It should be moved to a platform (POSIX) specific file (perhaps a file with only this single function). [The clue for this is the #define POSIX_C_SOURCE at the top of error.c] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-159) port proton to C++
[ https://issues.apache.org/jira/browse/PROTON-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13509074#comment-13509074 ] Andrew Stitcher commented on PROTON-159: I think maybe we could break this down into a smaller number of changes, each with a single theme. For instance changing all the memory allocation into macros/static inlines would be one; fixing up the vlas might be another; the struct initialiseers another; the char* - const char* changes might be another etc. port proton to C++ -- Key: PROTON-159 URL: https://issues.apache.org/jira/browse/PROTON-159 Project: Qpid Proton Issue Type: New Feature Components: proton-c Affects Versions: 0.3 Reporter: Cliff Jansen Attachments: proton-159-0.diff, proton-159-0-partial.diff Make code compile in both C99 and C++, using the gnu toolchain. This is a necessary first step towards a Microsoft Visual Studio port (where the compiler supports C++ but not C99). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-170) generated pkg config file is broken
[ https://issues.apache.org/jira/browse/PROTON-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13507600#comment-13507600 ] Andrew Stitcher commented on PROTON-170: No problem with the comment change! (although I did copy the initial file directly from qpid so I expect the same problem exists there) I'm not 100% sure about the fix you've got there since I don't think that CMAKE_INSTALL_PREFIX has to be an absolute path (and I seem to remember discussing with Rafi that in fact that is the way he uses CMAKE_INSTALL_PREFIX). I think it'd be more flexible to add in definitions for LIBDIR and INCLUDEDIR to CMakeLists.txt rather than change the .pc file (that is how we do it in qpid) - it seems I just failed to copy it over correctly from qpid and didn't notice generated pkg config file is broken --- Key: PROTON-170 URL: https://issues.apache.org/jira/browse/PROTON-170 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.2 Reporter: Gordon Sim Assignee: Andrew Stitcher Attachments: PROTON-170.patch E.g. cmake -DCMAKE_INSTALL_PREFIX=/path/to/non-standard/install make install will install a pkg config file that doesn't have the include and lib directories set. Also Cflags is set to -I${includedir} which breaks compilation even for a standard install if the includedir is not set. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (PROTON-168) Support for building on OS X
[ https://issues.apache.org/jira/browse/PROTON-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13506776#comment-13506776 ] Andrew Stitcher edited comment on PROTON-168 at 11/29/12 8:51 PM: -- Since the wholesale deprecation is only openSSL I suggest we just turn the -Werror off only for openssl.c on MacOS. I note from Andy's log that the compiler is actually clang not gcc, so I'll give that a try on my box and fix any obvious problems. was (Author: astitcher): Since the wholesale depracation is only openSSL I suggest we just turn the -Werror off only for openssl.c on MacOS. I note from Andy's log that the compiler is actually clang not gcc, so I'll give that a try on my box and fix any obvious problems. Support for building on OS X Key: PROTON-168 URL: https://issues.apache.org/jira/browse/PROTON-168 Project: Qpid Proton Issue Type: New Feature Components: proton-c Environment: Mac OS X Lion Reporter: Andy Goldstein Priority: Minor Attachments: build.log, clock.patch, nowerror.patch, proton-168.patch, PROTON-168-v2.patch, SO_NOSIGPIPE.patch I did some quick hacky work to get proton-c to compile on my Mac running Lion. I also have homebrew installed and use that to supply any libraries that are necessary but not included by default on the Mac. I'm attaching my quick patch, and it would be great if someone could take it and update it so it's more robust and commit-quality :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-168) Support for building on OS X
[ https://issues.apache.org/jira/browse/PROTON-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13506776#comment-13506776 ] Andrew Stitcher commented on PROTON-168: Since the wholesale depracation is only openSSL I suggest we just turn the -Werror off only for openssl.c on MacOS. I note from Andy's log that the compiler is actually clang not gcc, so I'll give that a try on my box and fix any obvious problems. Support for building on OS X Key: PROTON-168 URL: https://issues.apache.org/jira/browse/PROTON-168 Project: Qpid Proton Issue Type: New Feature Components: proton-c Environment: Mac OS X Lion Reporter: Andy Goldstein Priority: Minor Attachments: build.log, clock.patch, nowerror.patch, proton-168.patch, PROTON-168-v2.patch, SO_NOSIGPIPE.patch I did some quick hacky work to get proton-c to compile on my Mac running Lion. I also have homebrew installed and use that to supply any libraries that are necessary but not included by default on the Mac. I'm attaching my quick patch, and it would be great if someone could take it and update it so it's more robust and commit-quality :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-168) Support for building on OS X
[ https://issues.apache.org/jira/browse/PROTON-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13506785#comment-13506785 ] Andrew Stitcher commented on PROTON-168: Ok in order to allow individual developers to turn warnings as errors off I'll introduce a new cmake switch for this. That way you can turn it off for yourself. Support for building on OS X Key: PROTON-168 URL: https://issues.apache.org/jira/browse/PROTON-168 Project: Qpid Proton Issue Type: New Feature Components: proton-c Environment: Mac OS X Lion Reporter: Andy Goldstein Priority: Minor Attachments: build.log, clock.patch, deprecate-pragma.patch, nowerror.patch, proton-168.patch, PROTON-168-v2.patch, SO_NOSIGPIPE.patch I did some quick hacky work to get proton-c to compile on my Mac running Lion. I also have homebrew installed and use that to supply any libraries that are necessary but not included by default on the Mac. I'm attaching my quick patch, and it would be great if someone could take it and update it so it's more robust and commit-quality :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-168) Support for building on OS X
[ https://issues.apache.org/jira/browse/PROTON-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13505958#comment-13505958 ] Andrew Stitcher commented on PROTON-168: I've made a couple of changes to the source tree which improve some of the issues noted here: (r1414960 r1414961) The code still won't compile on OS-X but it should now at least explain why it won't! Support for building on OS X Key: PROTON-168 URL: https://issues.apache.org/jira/browse/PROTON-168 Project: Qpid Proton Issue Type: New Feature Components: proton-c Environment: Mac OS X Lion Reporter: Andy Goldstein Priority: Minor Attachments: proton-168.patch, PROTON-168-v2.patch I did some quick hacky work to get proton-c to compile on my Mac running Lion. I also have homebrew installed and use that to supply any libraries that are necessary but not included by default on the Mac. I'm attaching my quick patch, and it would be great if someone could take it and update it so it's more robust and commit-quality :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-168) Support for building on OS X
[ https://issues.apache.org/jira/browse/PROTON-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13505960#comment-13505960 ] Andrew Stitcher commented on PROTON-168: Note that the patch attached here doesn't correctly fix the MSG_NOSIGPIPE issue as it just defines the macro to be SO_NOSIGPIPE which is not used in the same way: MSG_NOSIGPIPE is used as a flag value to send() SO_NOSIGPIPE is used to set a socket option with setsockopt() This patch will compile but it won't have the effect of avoiding SIGPIPE. Support for building on OS X Key: PROTON-168 URL: https://issues.apache.org/jira/browse/PROTON-168 Project: Qpid Proton Issue Type: New Feature Components: proton-c Environment: Mac OS X Lion Reporter: Andy Goldstein Priority: Minor Attachments: proton-168.patch, PROTON-168-v2.patch I did some quick hacky work to get proton-c to compile on my Mac running Lion. I also have homebrew installed and use that to supply any libraries that are necessary but not included by default on the Mac. I'm attaching my quick patch, and it would be great if someone could take it and update it so it's more robust and commit-quality :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-168) Support for building on OS X
[ https://issues.apache.org/jira/browse/PROTON-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13505967#comment-13505967 ] Andrew Stitcher commented on PROTON-168: Cool - that's the effect I was expecting - it being slightly better to explain what is wrong than to error during the compilation! Support for building on OS X Key: PROTON-168 URL: https://issues.apache.org/jira/browse/PROTON-168 Project: Qpid Proton Issue Type: New Feature Components: proton-c Environment: Mac OS X Lion Reporter: Andy Goldstein Priority: Minor Attachments: proton-168.patch, PROTON-168-v2.patch I did some quick hacky work to get proton-c to compile on my Mac running Lion. I also have homebrew installed and use that to supply any libraries that are necessary but not included by default on the Mac. I'm attaching my quick patch, and it would be great if someone could take it and update it so it's more robust and commit-quality :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (PROTON-159) port proton to C++
[ https://issues.apache.org/jira/browse/PROTON-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13503990#comment-13503990 ] Andrew Stitcher edited comment on PROTON-159 at 11/26/12 7:08 PM: -- In order to avoid the nuisance (unreadable) malloc casts why not introduce a macro (I think this might be one of the few places where such might be really justified). something like: #define NEW(t) ((t*) malloc(sizeof(t))) or #define NEWARRAY(t, n) ((t*) malloc((n)*sizeof(t)) or perhaps to be insufferable: #ifdef __cplusplus__ #define NEW(t) new t #define FREE(x) delete x #else #define NEW malloc(sizeof(t)) #define FREE(x) free(x) #endif I think it's just possible that using these (latter) macros and having no casts might allow the compiler to give diagnostics that it couldn't if it had casts which might be a good thing in the longer run. was (Author: astitcher): In order to avoid the nuisance (unreadable) malloc casts why not introduce a macro (I think this might be one of the few places where such might be really justified). something like: #define NEW(t) ((t*) malloc(sizeof(t))) or #define NEWARRAY(t, n) ((t*) malloc((n)*sizeof(t)) or perhaps to be insufferable: #ifdef __cplusplus__ #define NEW(t) new t #define FREE(x) delete x #else #define NEW malloc(sizeof(t)) #define FREE(x) free(x) #endif I think it's just possible that using these (latter) macros and having no casts might allow the compiler to give diagnostics that it couldn't before which might be a good thing. port proton to C++ -- Key: PROTON-159 URL: https://issues.apache.org/jira/browse/PROTON-159 Project: Qpid Proton Issue Type: New Feature Components: proton-c Affects Versions: 0.3 Reporter: Cliff Jansen Attachments: proton-159-0.diff, proton-159-0-partial.diff Make code compile in both C99 and C++, using the gnu toolchain. This is a necessary first step towards a Microsoft Visual Studio port (where the compiler supports C++ but not C99). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (PROTON-121) Platform specific code is mixed in with platform independent code
Andrew Stitcher created PROTON-121: -- Summary: Platform specific code is mixed in with platform independent code Key: PROTON-121 URL: https://issues.apache.org/jira/browse/PROTON-121 Project: Qpid Proton Issue Type: Bug Components: proton-c Reporter: Andrew Stitcher the function pn_error_from errno() is platform specific and so should not be in error.c which is (everywhere else) purely platform independent. It should be moved to a platform (POSIX) specific file (perhaps a file with only this single function). [The clue for this is the #define POSIX_C_SOURCE at the top of error.c] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-113) Fixes for packaging issues
[ https://issues.apache.org/jira/browse/PROTON-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13487832#comment-13487832 ] Andrew Stitcher commented on PROTON-113: I strongly recommend not using the same version for so version as for release version initially. It will be way too easy to confuse them if they start equal. Obviously the initial release version is whatever it is. I'd suggest starting the so version at 1.0 and going from there. Fixes for packaging issues -- Key: PROTON-113 URL: https://issues.apache.org/jira/browse/PROTON-113 Project: Qpid Proton Issue Type: Improvement Components: proton-c Reporter: Darryl L. Pierce Assignee: Darryl L. Pierce Priority: Blocker Attachments: 0001-Added-the-version-to-the-share-directory-name.patch, 0002-Sets-the-soversion-for-the-qpid-proton-library.patch, 0003-Provides-the-ability-to-disable-rpath-in-libraries.patch, 0004-Added-some-boiler-plate-text-to-the-TODO-file.patch The following patches: * add the version number to the shared data directory; i.e., /usr/share/proton-0.1 * sets the soversion number for libqpid-proton.so * enables turning off rpath for distribution builds, and * adds some text to the TODO file -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-113) Fixes for packaging issues
[ https://issues.apache.org/jira/browse/PROTON-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13487943#comment-13487943 ] Andrew Stitcher commented on PROTON-113: in qpid the *release* version is in a file because several different build systems need to refer to it and so there needs to be a authoritative place to find it. That is *not* true for the library so versions because (in theory at least) only a single build builds them and so only that build needs to know the version number so it can happily be in one place - therefore there is no need to put the so versions in a file. Fixes for packaging issues -- Key: PROTON-113 URL: https://issues.apache.org/jira/browse/PROTON-113 Project: Qpid Proton Issue Type: Improvement Components: proton-c Reporter: Darryl L. Pierce Assignee: Darryl L. Pierce Priority: Blocker Attachments: 0001-Added-the-version-to-the-share-directory-name.patch, 0002-Sets-the-soversion-for-the-qpid-proton-library.patch, 0003-Provides-the-ability-to-disable-rpath-in-libraries.patch, 0004-Added-some-boiler-plate-text-to-the-TODO-file.patch The following patches: * add the version number to the shared data directory; i.e., /usr/share/proton-0.1 * sets the soversion number for libqpid-proton.so * enables turning off rpath for distribution builds, and * adds some text to the TODO file -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (PROTON-48) Adds the PROTON_INSTALL_LIBDIR macro to the Cmake environment
[ https://issues.apache.org/jira/browse/PROTON-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Stitcher reopened PROTON-48: --- Adds the PROTON_INSTALL_LIBDIR macro to the Cmake environment - Key: PROTON-48 URL: https://issues.apache.org/jira/browse/PROTON-48 Project: Qpid Proton Issue Type: Improvement Components: proton-c Reporter: Darryl L. Pierce Attachments: 0001-Adds-the-PROTON_INSTALL_LIBDIR-macro.patch On 64-bit platforms, the libraries need to be installed into a directory named /usr/lib64. However, CMake by default uses /usr/lib. This patch lets the build environment specify the directory name, with the default behavior being what CMake already does it the directory isn't specified. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-48) Adds the PROTON_INSTALL_LIBDIR macro to the Cmake environment
[ https://issues.apache.org/jira/browse/PROTON-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13475059#comment-13475059 ] Andrew Stitcher commented on PROTON-48: --- Ok I see what the patch adds - reworked to more sanely switch from $PREFIX/lib to $PREFIX/whatever you want [Note though that specifying LIBDIR directly might be more useful than just the directory name as I think the packaging environment can supply it directly through the __libdir macro, which would automatically be sent into configure, but will have to be sent manually into cmake - at least that's my understanding of how rpmbuild works] Adds the PROTON_INSTALL_LIBDIR macro to the Cmake environment - Key: PROTON-48 URL: https://issues.apache.org/jira/browse/PROTON-48 Project: Qpid Proton Issue Type: Improvement Components: proton-c Reporter: Darryl L. Pierce Attachments: 0001-Adds-the-PROTON_INSTALL_LIBDIR-macro.patch On 64-bit platforms, the libraries need to be installed into a directory named /usr/lib64. However, CMake by default uses /usr/lib. This patch lets the build environment specify the directory name, with the default behavior being what CMake already does it the directory isn't specified. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-67) Porting Issue -- Initialization with braces is not supported by Visual Studio.
[ https://issues.apache.org/jira/browse/PROTON-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13473406#comment-13473406 ] Andrew Stitcher commented on PROTON-67: --- Is it worth pointing out that regular brace initialisation of structures has been in C for a very long time and is certainly supported by Visual Studio c and c++. So it's only necessary to change pn_atoms_t latoms = {.size=data-size + data-extras, .start=atoms}; into pn_atoms_t latoms = {data-size + data-extras, atoms}; Of course for many other structs it won't be so simple and will require setting default values for uninitialised members in the middle of initialised values. Also the code will no longer be as clear or safe. Porting Issue -- Initialization with braces is not supported by Visual Studio. -- Key: PROTON-67 URL: https://issues.apache.org/jira/browse/PROTON-67 Project: Qpid Proton Issue Type: Improvement Components: proton-c Environment: Windows using Visual Studio 2010 Reporter: Mary hinton Labels: build In the Windows port, I used ifdef(s) for the initializations to keep the current code for Linux, and added code to compile in Visual Studio. If there is no objection, maybe we could replace the current initialization code with the Visual Studio code and remove the #ifdef(s). Here's some examples: Eample1 ssize_t pn_data_encode(pn_data_t *data, char *bytes, size_t size) { #ifndef _WINDOWS pn_atoms_t latoms = {.size=data-size + data-extras, .start=atoms}; #else pn_atoms_t latoms; latoms.size = data-size + data-extras; latoms.start = atoms; #endif Example 2 #ifndef _WINDOWS return (pn_bytes_t) {size, start}; #else pn_bytes_t pnBytes; pnBytes.size = size; pnBytes.start= start; return pnBytes; #endif Example 3 pn_do_transfer() #ifndef _WINDOWS delivery = pn_delivery(link, pn_dtag(tag.start, tag.size)); #else pn_delivery_tag_t delivt; delivt.bytes = tag.start; delivt.size = tag.size; delivery = pn_delivery(link, delivt); #endif -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-67) Porting Issue -- Initialization with braces is not supported by Visual Studio.
[ https://issues.apache.org/jira/browse/PROTON-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13473425#comment-13473425 ] Andrew Stitcher commented on PROTON-67: --- I also second Cliff's point about the #ifdef test being incorrect: Id say that the correct test would probably be something like: #if defined(__STDC_VERSION) __STDC_VERSION__ = 199901L ...[existing code] #elif __cplusplus ...[replacement code] #else #error Unsupported compiiler #endif We could protect ourselves immediately from unsupported environments by using just the STDC_VERSION test with the else and error. [There is a useful stackoverflow article about detecting C language version here - http://stackoverflow.com/questions/2115867/is-there-a-define-for-c99] Porting Issue -- Initialization with braces is not supported by Visual Studio. -- Key: PROTON-67 URL: https://issues.apache.org/jira/browse/PROTON-67 Project: Qpid Proton Issue Type: Improvement Components: proton-c Environment: Windows using Visual Studio 2010 Reporter: Mary hinton Labels: build In the Windows port, I used ifdef(s) for the initializations to keep the current code for Linux, and added code to compile in Visual Studio. If there is no objection, maybe we could replace the current initialization code with the Visual Studio code and remove the #ifdef(s). Here's some examples: Eample1 ssize_t pn_data_encode(pn_data_t *data, char *bytes, size_t size) { #ifndef _WINDOWS pn_atoms_t latoms = {.size=data-size + data-extras, .start=atoms}; #else pn_atoms_t latoms; latoms.size = data-size + data-extras; latoms.start = atoms; #endif Example 2 #ifndef _WINDOWS return (pn_bytes_t) {size, start}; #else pn_bytes_t pnBytes; pnBytes.size = size; pnBytes.start= start; return pnBytes; #endif Example 3 pn_do_transfer() #ifndef _WINDOWS delivery = pn_delivery(link, pn_dtag(tag.start, tag.size)); #else pn_delivery_tag_t delivt; delivt.bytes = tag.start; delivt.size = tag.size; delivery = pn_delivery(link, delivt); #endif -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (PROTON-8) Proton header files don't have 'extern C ' which makes them harder to use for C++ than necessary.
Andrew Stitcher created PROTON-8: Summary: Proton header files don't have 'extern C ' which makes them harder to use for C++ than necessary. Key: PROTON-8 URL: https://issues.apache.org/jira/browse/PROTON-8 Project: Qpid Proton Issue Type: Bug Reporter: Andrew Stitcher -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PROTON-4) Moves cproton.i to the include directory.
[ https://issues.apache.org/jira/browse/PROTON-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13448109#comment-13448109 ] Andrew Stitcher commented on PROTON-4: -- I have commited this patch now (somewhat changed to put the cproton.i file in include/proton not plain include). However I'm not allowed to resolve the issue, or even to assign it to myself. Moves cproton.i to the include directory. - Key: PROTON-4 URL: https://issues.apache.org/jira/browse/PROTON-4 Project: Qpid Proton Issue Type: Improvement Reporter: Darryl L. Pierce Priority: Minor Attachments: 0001-Moves-the-cproton.i-file-to-the-include-directory.patch Since, by default, the include path is searched, it's more logical to have the core descriptor file in the include directory. All language bindings have been updated as well to get the cproton.i file from the include path. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira