[CIFIX]add extern 'C' in C++ code

This commit is contained in:
liuwentan
2022-08-11 10:50:41 +08:00
parent 14703ec4b4
commit 85c28ff17e
12 changed files with 145 additions and 24 deletions

View File

@@ -8,10 +8,15 @@
***********************************************************************************************
*/
#pragma once
#ifndef _PIO_MARSIO_H_
#define _PIO_MARSIO_H_
#ifdef __cpluscplus
extern "C"
{
#endif
#include <stdint.h>
#include <marsio.h>
/**
@@ -166,4 +171,10 @@ char *pio_marsio_device_buff_mtod(struct stellar_packet *p);
uint32_t pio_marsio_device_buff_buflen(struct stellar_packet *p);
uint32_t pio_marsio_device_buff_datalen(struct stellar_packet *p);
uint32_t pio_marsio_device_buff_datalen(struct stellar_packet *p);
#ifdef __cpluscplus
}
#endif
#endif /* _PIO_MARSIO_H_ */

View File

@@ -8,7 +8,13 @@
***********************************************************************************************
*/
#pragma once
#ifndef _PACKET_IO_H_
#define _PACKET_IO_H_
#ifdef __cpluscplus
extern "C"
{
#endif
#include <stdint.h>
#include <limits.h>
@@ -169,4 +175,10 @@ uint32_t packet_io_buff_buflen(struct packet_io_device *pdev, struct stellar_pac
/**
* @brief get packet_io packet's data length
*/
uint32_t packet_io_buff_datalen(struct packet_io_device *pdev, struct stellar_packet *p);
uint32_t packet_io_buff_datalen(struct packet_io_device *pdev, struct stellar_packet *p);
#ifdef __cpluscplus
}
#endif
#endif /* _PIO_PCAP_LIVE_H_ */

View File

@@ -8,7 +8,13 @@
***********************************************************************************************
*/
#pragma once
#ifndef _PIO_PCAP_FILE_H_
#define _PIO_PCAP_FILE_H_
#ifdef __cpluscplus
extern "C"
{
#endif
#include <stdint.h>
#include <dirent.h>
@@ -137,4 +143,10 @@ char *pio_pcap_file_device_buff_mtod(struct stellar_packet *p);
uint32_t pio_pcap_file_device_buff_buflen(struct stellar_packet *p);
uint32_t pio_pcap_file_device_buff_datalen(struct stellar_packet *p);
uint32_t pio_pcap_file_device_buff_datalen(struct stellar_packet *p);
#ifdef __cpluscplus
}
#endif
#endif /* _PIO_PCAP_FILE_H_ */

View File

@@ -8,7 +8,13 @@
***********************************************************************************************
*/
#pragma once
#ifndef _PIO_PCAP_LIVE_H_
#define _PIO_PCAP_LIVE_H_
#ifdef __cpluscplus
extern "C"
{
#endif
#include <stdint.h>
#include <pcap/pcap.h>
@@ -99,4 +105,10 @@ char *pio_pcap_live_device_buff_mtod(struct stellar_packet *p);
uint32_t pio_pcap_live_device_buff_buflen(struct stellar_packet *p);
uint32_t pio_pcap_live_device_buff_datalen(struct stellar_packet *p);
uint32_t pio_pcap_live_device_buff_datalen(struct stellar_packet *p);
#ifdef __cpluscplus
}
#endif
#endif /* _PIO_PCAP_LIVE_H_ */