Remove unnecessary CMake modules and fixup os/CMakeLists.txt
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
This commit is contained in:
parent
1990007614
commit
e25656a4c5
39 changed files with 406 additions and 210 deletions
|
@ -128,16 +128,15 @@ static int unreg_group_membership (struct nn_group_membership *mship, ddsi_tran_
|
|||
|
||||
static char *make_joinleave_msg (char *buf, size_t bufsz, ddsi_tran_conn_t conn, int join, const nn_locator_t *srcloc, const nn_locator_t *mcloc, const struct nn_interface *interf, int err)
|
||||
{
|
||||
char mcstr[DDSI_LOCSTRLEN], srcstr[DDSI_LOCSTRLEN], interfstr[DDSI_LOCSTRLEN];
|
||||
char mcstr[DDSI_LOCSTRLEN], interfstr[DDSI_LOCSTRLEN];
|
||||
char srcstr[DDSI_LOCSTRLEN] = { '*', '\0' };
|
||||
int n;
|
||||
#ifdef DDSI_INCLUDE_SSM
|
||||
if (srcloc)
|
||||
if (srcloc) {
|
||||
ddsi_locator_to_string_no_port(srcstr, sizeof(srcstr), srcloc);
|
||||
else
|
||||
strcpy (srcstr, "*");
|
||||
}
|
||||
#else
|
||||
OS_UNUSED_ARG (srcloc);
|
||||
strcpy (srcstr, "*");
|
||||
#endif
|
||||
ddsi_locator_to_string_no_port (mcstr, sizeof(mcstr), mcloc);
|
||||
if (interf)
|
||||
|
|
|
@ -125,6 +125,7 @@ static int add_addresses_to_addrset_1 (struct addrset *as, const char *ip, int p
|
|||
return 0;
|
||||
}
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
int add_addresses_to_addrset (struct addrset *as, const char *addrs, int port_mode, const char *msgtag, int req_mc)
|
||||
{
|
||||
/* port_mode: -1 => take from string, if 0 & unicast, add for a range of participant indices;
|
||||
|
@ -177,6 +178,7 @@ int add_addresses_to_addrset (struct addrset *as, const char *addrs, int port_mo
|
|||
os_free (addrs_copy);
|
||||
return retval;
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
int compare_locators (const nn_locator_t *a, const nn_locator_t *b)
|
||||
{
|
||||
|
|
|
@ -1473,6 +1473,7 @@ static int uf_string(struct cfgst *cfgst, void *parent, struct cfgelem const * c
|
|||
return 1;
|
||||
}
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
static int uf_natint64_unit(struct cfgst *cfgst, int64_t *elem, const char *value, const struct unit *unittab, int64_t def_mult, int64_t max)
|
||||
{
|
||||
int pos;
|
||||
|
@ -1502,6 +1503,7 @@ static int uf_natint64_unit(struct cfgst *cfgst, int64_t *elem, const char *valu
|
|||
return cfg_error(cfgst, "%s: invalid value", value);
|
||||
}
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
#ifdef DDSI_INCLUDE_BANDWIDTH_LIMITING
|
||||
static int uf_bandwidth(struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, UNUSED_ARG(int first), const char *value)
|
||||
|
@ -1761,6 +1763,7 @@ static void pf_sched_class(struct cfgst *cfgst, void *parent, struct cfgelem con
|
|||
cfg_log(cfgst, "%s%s", str, is_default ? " [def]" : "");
|
||||
}
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
static int uf_maybe_int32(struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, UNUSED_ARG(int first), const char *value)
|
||||
{
|
||||
struct config_maybe_int32 *elem = cfg_address(cfgst, parent, cfgelem);
|
||||
|
@ -1776,6 +1779,7 @@ static int uf_maybe_int32(struct cfgst *cfgst, void *parent, struct cfgelem cons
|
|||
return cfg_error(cfgst, "'%s': neither 'default' nor a decimal integer\n", value);
|
||||
}
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
static int uf_maybe_memsize(struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, UNUSED_ARG(int first), const char *value)
|
||||
{
|
||||
|
@ -1902,6 +1906,7 @@ static int uf_int_min_max(struct cfgst *cfgst, void *parent, struct cfgelem cons
|
|||
return 1;
|
||||
}
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
static int uf_domainId(struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, UNUSED_ARG(int first), const char *value)
|
||||
{
|
||||
struct config_maybe_int32 *elem = cfg_address(cfgst, parent, cfgelem);
|
||||
|
@ -1917,6 +1922,7 @@ static int uf_domainId(struct cfgst *cfgst, void *parent, struct cfgelem const *
|
|||
return cfg_error(cfgst, "'%s': neither 'any' nor a decimal integer in 0 .. 230\n", value);
|
||||
}
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
static int uf_participantIndex(struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, int first, const char *value)
|
||||
{
|
||||
|
@ -2745,6 +2751,7 @@ struct cfgst * config_init
|
|||
struct ut_xmlpState *qx;
|
||||
FILE *fp;
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
if ( (fp = fopen(tok, "r")) == NULL ) {
|
||||
if ( strncmp(tok, "file://", 7) != 0 || (fp = fopen(tok + 7, "r")) == NULL ) {
|
||||
DDS_ERROR("can't open configuration file %s\n", tok);
|
||||
|
@ -2753,6 +2760,7 @@ struct cfgst * config_init
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
cb.attr = proc_attr;
|
||||
cb.elem_close = proc_elem_close;
|
||||
|
|
|
@ -426,6 +426,7 @@ static int check_thread_properties (void)
|
|||
return ok;
|
||||
}
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
int rtps_config_open (void)
|
||||
{
|
||||
int status;
|
||||
|
@ -462,6 +463,7 @@ int rtps_config_open (void)
|
|||
|
||||
return status;
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
int rtps_config_prep (struct cfgst *cfgst)
|
||||
{
|
||||
|
|
|
@ -481,12 +481,11 @@ int find_own_ip (const char *requested_address)
|
|||
char if_name[sizeof (last_if_name)];
|
||||
int q = 0;
|
||||
|
||||
strncpy (if_name, ifa->name, sizeof (if_name) - 1);
|
||||
if_name[sizeof (if_name) - 1] = 0;
|
||||
os_strlcpy(if_name, ifa->name, sizeof(if_name));
|
||||
|
||||
if (strcmp (if_name, last_if_name))
|
||||
DDS_LOG(DDS_LC_CONFIG, "%s%s", sep, if_name);
|
||||
strcpy (last_if_name, if_name);
|
||||
os_strlcpy(last_if_name, if_name, sizeof(last_if_name));
|
||||
|
||||
/* interface must be up */
|
||||
if ((ifa->flags & IFF_UP) == 0) {
|
||||
|
|
|
@ -79,6 +79,7 @@ static const ipv4_hdr_t ipv4_hdr_template = {
|
|||
#define IPV4_HDR_SIZE 20
|
||||
#define UDP_HDR_SIZE 8
|
||||
|
||||
OS_WARNING_MSVC_OFF(4996);
|
||||
FILE *new_pcap_file (const char *name)
|
||||
{
|
||||
FILE *fp;
|
||||
|
@ -101,6 +102,7 @@ FILE *new_pcap_file (const char *name)
|
|||
|
||||
return fp;
|
||||
}
|
||||
OS_WARNING_MSVC_ON(4996);
|
||||
|
||||
static void write_data (FILE *fp, const struct msghdr *msghdr, size_t sz)
|
||||
{
|
||||
|
|
|
@ -2509,6 +2509,7 @@ struct nn_dqueue *nn_dqueue_new (const char *name, uint32_t max_samples, nn_dque
|
|||
{
|
||||
struct nn_dqueue *q;
|
||||
char *thrname;
|
||||
size_t thrnamesz;
|
||||
|
||||
if ((q = os_malloc (sizeof (*q))) == NULL)
|
||||
goto fail_q;
|
||||
|
@ -2523,9 +2524,10 @@ struct nn_dqueue *nn_dqueue_new (const char *name, uint32_t max_samples, nn_dque
|
|||
os_mutexInit (&q->lock);
|
||||
os_condInit (&q->cond, &q->lock);
|
||||
|
||||
if ((thrname = os_malloc (3 + strlen (name) + 1)) == NULL)
|
||||
thrnamesz = 3 + strlen (name) + 1;
|
||||
if ((thrname = os_malloc (thrnamesz)) == NULL)
|
||||
goto fail_thrname;
|
||||
sprintf (thrname, "dq.%s", name);
|
||||
snprintf (thrname, thrnamesz, "dq.%s", name);
|
||||
if ((q->ts = create_thread (thrname, (uint32_t (*) (void *)) dqueue_thread, q)) == NULL)
|
||||
goto fail_thread;
|
||||
os_free (thrname);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue