Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 99166200D1E for ; Wed, 4 Oct 2017 02:01:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 95CAE160BD5; Wed, 4 Oct 2017 00:01:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3E7BC1609DE for ; Wed, 4 Oct 2017 02:01:46 +0200 (CEST) Received: (qmail 48862 invoked by uid 500); 4 Oct 2017 00:01:45 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 48852 invoked by uid 99); 4 Oct 2017 00:01:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Oct 2017 00:01:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B06D1F32F2; Wed, 4 Oct 2017 00:01:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aconway@apache.org To: commits@qpid.apache.org Message-Id: <42324b3663be409fbd9e54e4ff5dc5d9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: qpid-proton git commit: PROTON-1609: build C examples with c90 flag for older compilers Date: Wed, 4 Oct 2017 00:01:44 +0000 (UTC) archived-at: Wed, 04 Oct 2017 00:01:47 -0000 Repository: qpid-proton Updated Branches: refs/heads/master b36b70c2a -> 433e9a039 PROTON-1609: build C examples with c90 flag for older compilers - Get rid of // comments in public header files, not allowed in c90 - Simplify/clarify cmake variables exported from proton-c/CMakeLists for examples - Set -std=c90 for gcc/clang example builds - Fix examples to build with c90 - // comments and variable declarations in front Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/433e9a03 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/433e9a03 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/433e9a03 Branch: refs/heads/master Commit: 433e9a0395c75ef4279a119081b253e0074b7521 Parents: b36b70c Author: Alan Conway Authored: Tue Oct 3 17:15:15 2017 -0400 Committer: Alan Conway Committed: Tue Oct 3 19:58:37 2017 -0400 ---------------------------------------------------------------------- examples/c/CMakeLists.txt | 6 ++- examples/c/broker.c | 3 +- examples/c/direct.c | 5 +- examples/c/receive.c | 3 +- examples/c/send-abort.c | 13 ++--- examples/c/send.c | 2 +- examples/cpp/CMakeLists.txt | 4 +- proton-c/CMakeLists.txt | 18 ++++--- proton-c/bindings/CMakeLists.txt | 6 +-- proton-c/include/proton/import_export.h | 27 ++++------ proton-c/include/proton/message.h | 6 ++- proton-c/include/proton/netaddr.h | 2 +- proton-c/include/proton/object.h | 4 +- proton-c/include/proton/sasl-plugin.h | 78 ++++++++++++++-------------- proton-c/include/proton/type_compat.h | 31 ++++++----- 15 files changed, 108 insertions(+), 100 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index 3bd5c6b..4bfff2d 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -25,7 +25,7 @@ include(CheckCCompilerFlag) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Proton_INCLUDE_DIRS}) -add_definitions(${COMPILE_LANGUAGE_FLAGS} ${COMPILE_WARNING_FLAGS} ${WERROR} ${COMPILE_PLATFORM_FLAGS} ${LINK_TIME_OPTIMIZATION}) +add_definitions(${C_EXAMPLE_FLAGS}) # Add a test with the correct environment to find test executables and valgrind. if(WIN32) @@ -37,7 +37,9 @@ endif() foreach (name broker send receive direct send-abort) add_executable(c-${name} ${name}.c) target_link_libraries(c-${name} ${Proton_Proactor_LIBRARIES} ${Proton_Core_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) - set_target_properties(c-${name} PROPERTIES OUTPUT_NAME ${name}) + set_target_properties(c-${name} PROPERTIES + OUTPUT_NAME ${name} + LINK_FLAGS "${C_EXAMPLE_FLAGS}") endforeach() set(run_env ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/proton-c/env.py ${EXAMPLE_ENV} "PATH=${test_path}" ${VALGRIND_ENV}) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/c/broker.c ---------------------------------------------------------------------- diff --git a/examples/c/broker.c b/examples/c/broker.c index 85bebf8..f862133 100644 --- a/examples/c/broker.c +++ b/examples/c/broker.c @@ -338,9 +338,10 @@ static void handle(broker_t* b, pn_event_t* e) { pn_link_t *l = pn_delivery_link(d); size_t size = pn_delivery_pending(d); pn_rwbytes_t* m = message_buffer(l); /* Append data to incoming message buffer */ + int recv; m->size += size; m->start = (char*)realloc(m->start, m->size); - int recv = pn_link_recv(l, m->start, m->size); + recv = pn_link_recv(l, m->start, m->size); if (recv == PN_ABORTED) { /* */ fprintf(stderr, "Message aborted\n"); m->size = 0; /* Forget the data we accumulated */ http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/c/direct.c ---------------------------------------------------------------------- diff --git a/examples/c/direct.c b/examples/c/direct.c index 52ca1e0..63ae090 100644 --- a/examples/c/direct.c +++ b/examples/c/direct.c @@ -144,9 +144,10 @@ static void handle_receive(app_data_t *app, pn_event_t* event) { pn_link_t *l = pn_delivery_link(d); size_t size = pn_delivery_pending(d); pn_rwbytes_t* m = &app->msgin; /* Append data to incoming message buffer */ + int recv; m->size += size; m->start = (char*)realloc(m->start, m->size); - int recv = pn_link_recv(l, m->start, m->size); + recv = pn_link_recv(l, m->start, m->size); if (recv == PN_ABORTED) { fprintf(stderr, "Message aborted\n"); m->size = 0; /* Forget the data we accumulated */ @@ -193,7 +194,7 @@ static void handle_send(app_data_t* app, pn_event_t* event) { pn_link_t *sender = pn_event_link(event); while (pn_link_credit(sender) > 0 && app->sent < app->message_count) { ++app->sent; - // Use sent counter as unique delivery tag. + /* Use sent counter as unique delivery tag. */ pn_delivery(sender, pn_dtag((const char *)&app->sent, sizeof(app->sent))); { pn_bytes_t msgbuf = encode_message(app); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/c/receive.c ---------------------------------------------------------------------- diff --git a/examples/c/receive.c b/examples/c/receive.c index bf0a32f..1eeba43 100644 --- a/examples/c/receive.c +++ b/examples/c/receive.c @@ -99,9 +99,10 @@ static bool handle(app_data_t* app, pn_event_t* event) { pn_link_t *l = pn_delivery_link(d); size_t size = pn_delivery_pending(d); pn_rwbytes_t* m = &app->msgin; /* Append data to incoming message buffer */ + int recv; m->size += size; m->start = (char*)realloc(m->start, m->size); - int recv = pn_link_recv(l, m->start, m->size); + recv = pn_link_recv(l, m->start, m->size); if (recv == PN_ABORTED) { fprintf(stderr, "Message aborted\n"); m->size = 0; /* Forget the data we accumulated */ http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/c/send-abort.c ---------------------------------------------------------------------- diff --git a/examples/c/send-abort.c b/examples/c/send-abort.c index fcf3550..defbee5 100644 --- a/examples/c/send-abort.c +++ b/examples/c/send-abort.c @@ -77,11 +77,8 @@ static void check_condition(pn_event_t *e, pn_condition_t *cond) { static pn_bytes_t encode_message(app_data_t* app) { /* Construct a message with the map { "sequence": app.sent } */ pn_message_t* message = pn_message(); - char data[MSG_SIZE + 11]; - size_t i; + char data[MSG_SIZE + 11] = {0}; pn_data_t* body; - for (i=0; isent); /* Set the message_id also */ body = pn_message_body(message); pn_data_enter(body); @@ -136,16 +133,16 @@ static bool handle(app_data_t* app, pn_event_t* event) { while (app->in_progress || (pn_link_credit(sender) > 0 && app->sent < app->message_count)) { if (!app->in_progress) { pn_bytes_t msgbuf = encode_message(app); - // Use sent counter as unique delivery tag. + /* Use sent counter as unique delivery tag. */ pn_delivery(sender, pn_dtag((const char *)&app->sent, sizeof(app->sent))); - pn_link_send(sender, msgbuf.start, msgbuf.size - HOLDBACK); // Send some part of message + pn_link_send(sender, msgbuf.start, msgbuf.size - HOLDBACK); /* Send some part of message */ app->in_progress = true; - // Return from this link flow event and abort the message on next, + /* Return from this link flow event and abort the message on next, */ break; } else { pn_delivery_t * pnd = pn_link_current(sender); pn_delivery_abort(pnd); - // aborted delivery is presettled and never ack'd. + /* aborted delivery is presettled and never ack'd. */ if (++app->aborted == app->message_count) { printf("%d messages started and aborted\n", app->aborted); pn_connection_close(pn_event_connection(event)); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/c/send.c ---------------------------------------------------------------------- diff --git a/examples/c/send.c b/examples/c/send.c index 9817164..6e5966c 100644 --- a/examples/c/send.c +++ b/examples/c/send.c @@ -113,7 +113,7 @@ static bool handle(app_data_t* app, pn_event_t* event) { pn_link_t *sender = pn_event_link(event); while (pn_link_credit(sender) > 0 && app->sent < app->message_count) { ++app->sent; - // Use sent counter as unique delivery tag. + /* Use sent counter as unique delivery tag. */ pn_delivery(sender, pn_dtag((const char *)&app->sent, sizeof(app->sent))); { pn_bytes_t msgbuf = encode_message(app); http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/examples/cpp/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index eeab787..0c548af 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -21,7 +21,7 @@ find_package(ProtonCpp REQUIRED) include_directories(${ProtonCpp_INCLUDE_DIRS}) link_libraries(${ProtonCpp_LIBRARIES}) -add_definitions(${CXX_WARNING_FLAGS}) +add_definitions(${CXX_EXAMPLE_FLAGS}) # Add a test with the correct environment to find test executables and valgrind. macro(add_cpp_test name) @@ -58,6 +58,7 @@ foreach(example service_bus encode_decode) add_executable(${example} ${example}.cpp) + set_target_properties(${example} PROPERTIES LINK_FLAGS "${CXX_EXAMPLE_FLAGS}") endforeach() if(HAS_CPP11) @@ -68,6 +69,7 @@ if(HAS_CPP11) multithreaded_client_flow_control ) add_executable(${example} ${example}.cpp) + set_target_properties(${example} PROPERTIES LINK_FLAGS "${CXX_EXAMPLE_FLAGS}") endforeach() endif() http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt index 921906e..0711aa8 100644 --- a/proton-c/CMakeLists.txt +++ b/proton-c/CMakeLists.txt @@ -294,13 +294,17 @@ if (SANITIZE_FLAGS) endif() endif() -# Make flags visible to examples. -set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS}" PARENT_SCOPE) -set(COMPILE_WARNING_FLAGS "${COMPILE_WARNING_FLAGS}" PARENT_SCOPE) -set(COMPILE_LANGUAGE_FLAGS "${COMPILE_LANGUAGE_FLAGS}" PARENT_SCOPE) -set(LINK_TIME_OPTIMIZATION "${LTO}" PARENT_SCOPE) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE) +# Flags used to build examples for self-test. +# The examples must be self-contained and build even if these are not set. +if (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCC) + # Ensure that examples build with c90, to deal with older c++03-as-c compilers. + set(C_EXAMPLE_FLAGS "-std=c90 -pedantic") +endif() +set(C_EXAMPLE_FLAGS "${C_EXAMPLE_FLAGS} ${COMPILE_WARNING_FLAGS} ${CMAKE_C_FLAGS}") +set(CXX_EXAMPLE_FLAGS ${CXX_WARNING_FLAGS} ${CMAKE_CXX_FLAGS}) +# Set example flags in parent scope so example/CMakefile can read them. +set(C_EXAMPLE_FLAGS ${C_EXAMPLE_FLAGS} PARENT_SCOPE) +set(CXX_EXAMPLE_FLAGS ${CXX_EXAMPLE_FLAGS} PARENT_SCOPE) if (MSVC) set(CMAKE_DEBUG_POSTFIX "d") http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/bindings/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/bindings/CMakeLists.txt b/proton-c/bindings/CMakeLists.txt index 40944d9..7537406 100644 --- a/proton-c/bindings/CMakeLists.txt +++ b/proton-c/bindings/CMakeLists.txt @@ -109,10 +109,10 @@ set(BUILD_ONLY "${BINDINGS}" CACHE STRING foreach(BINDING ${BINDINGS}) string(TOUPPER ${BINDING} UBINDING) list(FIND BUILD_ONLY ${BINDING} N) - if("NOBUILD_${UBINDING}" OR ( N EQUAL -1 ) ) # Over-ridden or not on the BUILD_ONLY list - set("DEFAULT_${UBINDING}" OFF) + if(NOBUILD_${UBINDING} OR ( N EQUAL -1 ) ) # Over-ridden or not on the BUILD_ONLY list + set(DEFAULT_${UBINDING} OFF) endif() - option("BUILD_${UBINDING}" "Build ${BINDING} language binding" ${DEFAULT_${UBINDING}}) + option(BUILD_${UBINDING} "Build ${BINDING} language binding" ${DEFAULT_${UBINDING}}) if (BUILD_${UBINDING}) add_subdirectory(${BINDING}) endif () http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/include/proton/import_export.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/import_export.h b/proton-c/include/proton/import_export.h index 86776cd..ee09132 100644 --- a/proton-c/include/proton/import_export.h +++ b/proton-c/include/proton/import_export.h @@ -26,44 +26,39 @@ * @cond INTERNAL */ -// -// Compiler specific mechanisms for managing the import and export of -// symbols between shared objects. -// -// PN_EXPORT - Export declaration -// PN_IMPORT - Import declaration -// +/* + Compiler specific mechanisms for managing the import and export of + symbols between shared objects. + PN_EXPORT - Export declaration + PN_IMPORT - Import declaration +*/ #if defined(WIN32) && !defined(PROTON_DECLARE_STATIC) - // - // Import and Export definitions for Windows: - // +/* Import and Export definitions for Windows: */ # define PN_EXPORT __declspec(dllexport) # define PN_IMPORT __declspec(dllimport) #else - // - // Non-Windows (Linux, etc.) definitions: - // +/* Non-Windows (Linux, etc.) definitions */ # define PN_EXPORT __attribute ((visibility ("default"))) # define PN_IMPORT #endif -// For core proton library symbols +/* For core proton library symbols */ #if defined(qpid_proton_core_EXPORTS) || defined(qpid_proton_EXPORTS) # define PN_EXTERN PN_EXPORT #else # define PN_EXTERN PN_IMPORT #endif -// For proactor proton symbols +/* For proactor proton symbols */ #if defined(qpid_proton_proactor_EXPORTS) || defined(qpid_proton_EXPORTS) # define PNP_EXTERN PN_EXPORT #else # define PNP_EXTERN PN_IMPORT #endif -// For extra proton symbols +/* For extra proton symbols */ #if defined(qpid_proton_EXPORTS) # define PNX_EXTERN PN_EXPORT #else http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/include/proton/message.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/message.h b/proton-c/include/proton/message.h index b27ebcb..2723915 100644 --- a/proton-c/include/proton/message.h +++ b/proton-c/include/proton/message.h @@ -138,7 +138,9 @@ PN_EXTERN bool pn_message_is_inferred(pn_message_t *msg); */ PN_EXTERN int pn_message_set_inferred(pn_message_t *msg, bool inferred); -// standard message headers and properties +/**@group standard message headers and properties + *@{ + */ /** * Get the durable flag for a message. @@ -697,6 +699,8 @@ PN_EXTERN pn_data_t *pn_message_annotations(pn_message_t *msg); */ PN_EXTERN pn_data_t *pn_message_properties(pn_message_t *msg); +/**@}*/ + /** * Get/set the body of a message. * http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/include/proton/netaddr.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/netaddr.h b/proton-c/include/proton/netaddr.h index 33cf37e..bd2f9c1 100644 --- a/proton-c/include/proton/netaddr.h +++ b/proton-c/include/proton/netaddr.h @@ -73,4 +73,4 @@ PNP_EXTERN size_t pn_netaddr_socklen(const pn_netaddr_t *na); * @} */ -#endif // PROTON_NETADDR_H +#endif /* PROTON_NETADDR_H */ http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/include/proton/object.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/object.h b/proton-c/include/proton/object.h index bbd7de0..2761091 100644 --- a/proton-c/include/proton/object.h +++ b/proton-c/include/proton/object.h @@ -65,8 +65,8 @@ struct pn_class_t { int (*inspect)(void *, pn_string_t *); }; -// Hack alert: Declare these as arrays so we can treat the name -// of the single object as the address +/* Hack alert: Declare these as arrays so we can treat the name of the single + object as the address */ PN_EXTERN extern const pn_class_t PN_OBJECT[]; PN_EXTERN extern const pn_class_t PN_VOID[]; PN_EXTERN extern const pn_class_t PN_WEAKREF[]; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/include/proton/sasl-plugin.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/sasl-plugin.h b/proton-c/include/proton/sasl-plugin.h index 3acc12f..d420eaf 100644 --- a/proton-c/include/proton/sasl-plugin.h +++ b/proton-c/include/proton/sasl-plugin.h @@ -30,41 +30,43 @@ extern "C" { #endif -/// @cond INTERNAL - -// Internal SASL authenticator interface: These are the entry points to a SASL implementations -// -// Free up all data structures allocated by the SASL implementation -// void free(pn_transport_t *transport); -// -// Return space separated list of supported mechanisms (client and server) -// If the returned string is dynamically allocated by the SASL implemetation -// it must stay valid until the free entry point is called. -// const char *list_mechs(pn_transport_t *transport); -// -// Initialise for either client or server (can't call both for a -// given transport/connection): -// bool init_server(pn_transport_t *transport); -// bool init_client(pn_transport_t *transport); -// -// Writing: -// void prepare_write(pn_transport_t *transport); -// -// Reading: -// Server side (process server SASL messages): -// void process_init(pn_transport_t *transport, const char *mechanism, const pn_bytes_t *recv); -// void process_response(pn_transport_t *transport, const pn_bytes_t *recv); -// -// Client side (process client SASL messages) -// bool process_mechanisms(pn_transport_t *transport, const char *mechs); -// void process_challenge(pn_transport_t *transport, const pn_bytes_t *recv); -// void process_outcome(pn_transport_t *transport); - -// Security layer interface (active after SASL succeeds) -// bool can_encrypt(pn_transport_t *transport); -// ssize_t max_encrypt_size(pn_transport_t *transport); -// ssize_t encode(pn_transport_t *transport, pn_bytes_t in, pn_bytes_t *out); -// ssize_t decode(pn_transport_t *transport, pn_bytes_t in, pn_bytes_t *out); +/** @cond INTERNAL */ + +/* + Internal SASL authenticator interface: These are the entry points to a SASL implementations + + Free up all data structures allocated by the SASL implementation + void free(pn_transport_t *transport); + + Return space separated list of supported mechanisms (client and server) + If the returned string is dynamically allocated by the SASL implemetation + it must stay valid until the free entry point is called. + const char *list_mechs(pn_transport_t *transport); + + Initialise for either client or server (can't call both for a + given transport/connection): + bool init_server(pn_transport_t *transport); + bool init_client(pn_transport_t *transport); + + Writing: + void prepare_write(pn_transport_t *transport); + + Reading: + Server side (process server SASL messages): + void process_init(pn_transport_t *transport, const char *mechanism, const pn_bytes_t *recv); + void process_response(pn_transport_t *transport, const pn_bytes_t *recv); + + Client side (process client SASL messages) + bool process_mechanisms(pn_transport_t *transport, const char *mechs); + void process_challenge(pn_transport_t *transport, const pn_bytes_t *recv); + void process_outcome(pn_transport_t *transport); + + Security layer interface (active after SASL succeeds) + bool can_encrypt(pn_transport_t *transport); + ssize_t max_encrypt_size(pn_transport_t *transport); + ssize_t encode(pn_transport_t *transport, pn_bytes_t in, pn_bytes_t *out); + ssize_t decode(pn_transport_t *transport, pn_bytes_t in, pn_bytes_t *out); +*/ typedef struct pnx_sasl_implementation { @@ -91,7 +93,7 @@ typedef struct pnx_sasl_implementation } pnx_sasl_implementation; -// Shared SASL API used by the actual SASL authenticators +/* Shared SASL API used by the actual SASL authenticators */ enum pnx_sasl_state { SASL_NONE, SASL_POSTED_INIT, @@ -104,7 +106,7 @@ enum pnx_sasl_state { SASL_ERROR }; -// APIs used by sasl implementations +/* APIs used by sasl implementations */ PN_EXTERN void pnx_sasl_logf(pn_transport_t *transport, const char *format, ...); PN_EXTERN void *pnx_sasl_get_context(pn_transport_t *transport); @@ -134,7 +136,7 @@ PN_EXTERN void pnx_sasl_fail_authentication(pn_transport_t *transport); PN_EXTERN void pnx_sasl_set_implementation(pn_transport_t *transport, const pnx_sasl_implementation *impl, void *context); PN_EXTERN void pnx_sasl_set_default_implementation(const pnx_sasl_implementation *impl); -/// @endcond +/** @endcond */ #ifdef __cplusplus } http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/433e9a03/proton-c/include/proton/type_compat.h ---------------------------------------------------------------------- diff --git a/proton-c/include/proton/type_compat.h b/proton-c/include/proton/type_compat.h index fe96994..b6d7760 100644 --- a/proton-c/include/proton/type_compat.h +++ b/proton-c/include/proton/type_compat.h @@ -26,12 +26,12 @@ * @cond INTERNAL */ -// Get Boolean +/* Get Boolean */ #if !defined(__cplusplus) && !defined(__bool_true_false_are_defined) # if __STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || _MSC_VER >=1800 # include # else -// Need to get bool/true/false manually +/* Need to get bool/true/false manually */ # if _MSC_VER # define bool char # define false 0 @@ -52,7 +52,7 @@ * PN_INCLUDE_STDINT/PN_NOINCLUDE_STDINT : include (or not) stdint.h */ -// Honor positive overrides +/* Honor positive overrides */ #if defined(PN_DEFINE_STDINT) # define PNI_DEFINE_STDINT #endif @@ -63,9 +63,9 @@ # define PNI_DEFINE_SSIZE_T #endif -// Determinine default action +/* Determinine default action */ #ifndef _MSC_VER -// Not Windows and not using Visual Studio +/* Not Windows and not using Visual Studio */ /* MBED_BUILD_TIMESTAMP is used to detect whether Proton is being built on www.mbed.org with the ARM compiler. In that case ssize_t needs to be defined in this file. */ @@ -79,29 +79,29 @@ the ARM compiler. In that case ssize_t needs to be defined in this file. */ # define PNI_INCLUDE_STDINT # endif #else -// all versions of Visual Studio +/* all versions of Visual Studio */ # ifndef PNI_DEFINE_SSIZE_T -// ssize_t def is needed, unless third party definition interferes, e.g. python/swig +/* ssize_t def is needed, unless third party definition interferes, e.g. python/swig */ # ifndef Py_CONFIG_H # define PNI_DEFINE_SSIZE_T # endif # endif # if (_MSC_VER < 1600) -// VS 2008 and earlier +/* VS 2008 and earlier */ # ifndef PNI_DEFINE_STDINT # define PNI_DEFINE_STDINT # endif # else -// VS 2010 and newer +/* VS 2010 and newer */ # ifndef PNI_INCLUDE_STDINT # define PNI_INCLUDE_STDINT # endif -# endif // (_MSC_VER < 1600) -#endif //_MSC_VER +# endif /* (_MSC_VER < 1600) */ +#endif /*_MSC_VER */ -// Honor negative overrides +/* Honor negative overrides */ #ifdef PN_NODEFINE_SSIZE_T # undef PNI_DEFINE_SSIZE_T #endif @@ -123,7 +123,7 @@ typedef SSIZE_T ssize_t; # else typedef intptr_t ssize_t; # endif -#endif // PNI_DEFINE_SSIZE_T +#endif /* PNI_DEFINE_SSIZE_T */ #ifdef PNI_DEFINE_STDINT # ifdef _MSC_VER @@ -138,11 +138,10 @@ typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; -# else // _MSC_VER +# else /* _MSC_VER */ # error stdint.h definitions not kown # endif -#endif // PNI_DEFINE_SSIZE_T - +#endif /* PNI_DEFINE_SSIZE_T */ /** * @endcond */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org