Skip to content

Commit

Permalink
Added extern c include guards
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Feuer committed Aug 13, 2019
1 parent ade08ae commit 92b2b14
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions reliable_multicast.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

#ifndef __RELIABLE_MULTICAST_H__
#define __RELIABLE_MULTICAST_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <netinet/in.h>
#include "rmc_list.h"
Expand Down Expand Up @@ -433,4 +438,9 @@ extern payload_len_t rmc_sub_packet_payload_len(struct sub_packet* pack);
// Data was sent on TCP connection.
#define RMC_WRITE_TCP 10


#ifdef __cplusplus
}
#endif

#endif // __RELIABLE_MULTICAST_H__
8 changes: 8 additions & 0 deletions rmc_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#include <stdio.h>
#include <stdarg.h>

#ifdef __cplusplus
extern "C" {
#endif

#define RMC_LOG_LEVEL_NONE 0
#define RMC_LOG_LEVEL_FATAL 1
#define RMC_LOG_LEVEL_ERROR 2
Expand Down Expand Up @@ -54,4 +58,8 @@ extern int _rmc_log_level;
#define RMC_LOG_INDEX_ERROR(index, fmt, ...) { if (_rmc_log_level >= RMC_LOG_LEVEL_ERROR) rmc_log(RMC_LOG_LEVEL_ERROR, __FUNCTION__, __FILE__, __LINE__, index, fmt, ##__VA_ARGS__); }
#define RMC_LOG_INDEX_FATAL(index, fmt, ...) { if (_rmc_log_level >= RMC_LOG_LEVEL_FATAL) rmc_log(RMC_LOG_LEVEL_FATAL, __FUNCTION__, __FILE__, __LINE__, index, fmt, ##__VA_ARGS__); }

#ifdef __cplusplus
}
#endif

#endif // __RMC_LOG_H__

0 comments on commit 92b2b14

Please sign in to comment.