Compile authenticator.c and buffer.c as C++

This commit is contained in:
Johan Wikman
2017-03-22 17:14:22 +02:00
parent 462b572600
commit c84c2dcfbd
4 changed files with 6 additions and 4 deletions

View File

@ -127,8 +127,8 @@ typedef struct gwbuf
void *end; /*< First byte after the valid data */
SHARED_BUF *sbuf; /*< The shared buffer with the real data */
buffer_object_t *gwbuf_bufobj; /*< List of objects referred to by GWBUF */
gwbuf_info_t gwbuf_info; /*< Info bits */
gwbuf_type_t gwbuf_type; /*< buffer's data type information */
uint32_t gwbuf_info; /*< Info bits; mask of gwbuf_info_t values. */
uint32_t gwbuf_type; /*< Type bits; mask of gwbuf_type_t values. */
HINT *hint; /*< Hint data for this buffer */
BUF_PROPERTY *properties; /*< Buffer properties */
struct server *server; /*< The target server where the buffer is executed */
@ -141,7 +141,7 @@ typedef struct gwbuf
#define GWBUF_DATA(b) ((uint8_t*)(b)->start)
/*< Number of bytes in the individual buffer */
#define GWBUF_LENGTH(b) ((char *)(b)->end - (char *)(b)->start)
#define GWBUF_LENGTH(b) ((size_t)((char *)(b)->end - (char *)(b)->start))
/*< Return the byte at offset byte from the start of the unconsumed portion of the buffer */
#define GWBUF_DATA_CHAR(b, byte) (GWBUF_LENGTH(b) < ((byte)+1) ? -1 : *(((char *)(b)->start)+4))

View File

@ -2,7 +2,9 @@ add_library(maxscale-common SHARED
adminusers.cc
alloc.cc
atomic.cc
authenticator.c buffer.c config.c config_runtime.c dcb.c filter.c filter.cc externcmd.c paths.c hashtable.c hint.c housekeeper.c load_utils.c log_manager.cc maxscale_pcre2.c misc.c mlist.c modutil.c monitor.c queuemanager.c query_classifier.cc poll.c random_jkiss.c resultset.c router.cc secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c skygw_utils.cc statistics.c listener.c ssl.c mysql_utils.c mysql_binlog.c modulecmd.c)
authenticator.cc
buffer.cc
config.c config_runtime.c dcb.c filter.c filter.cc externcmd.c paths.c hashtable.c hint.c housekeeper.c load_utils.c log_manager.cc maxscale_pcre2.c misc.c mlist.c modutil.c monitor.c queuemanager.c query_classifier.cc poll.c random_jkiss.c resultset.c router.cc secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c skygw_utils.cc statistics.c listener.c ssl.c mysql_utils.c mysql_binlog.c modulecmd.c)
if(WITH_JEMALLOC)
target_link_libraries(maxscale-common ${JEMALLOC_LIBRARIES})