提交 4c50fea5 authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #815 in FS/freeswitch from…

Merge pull request #815 in FS/freeswitch from ~ALEXANDR.DUBOVIKOV_GMAIL.COM/freeswitch:feature/FS-9078-hepv2-and-hepv3-support-windows-pragma to master

* commit '024af441':
  one push one pop
  FS-9078 added #pragma for MSVC compiler
......@@ -145,67 +145,79 @@ struct hep_ip6hdr {
#endif
/* HEPv3 types */
#if (defined __SUNPRO_CC) || defined(__SUNPRO_C) || defined(_MSC_VER)
#define PACKED
#endif
#ifndef PACKED
#define PACKED __attribute__ ((__packed__))
#endif
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk {
uint16_t vendor_id;
uint16_t type_id;
uint16_t length;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk hep_chunk_t;
struct hep_chunk_uint8 {
hep_chunk_t chunk;
uint8_t data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_uint8 hep_chunk_uint8_t;
struct hep_chunk_uint16 {
hep_chunk_t chunk;
uint16_t data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_uint16 hep_chunk_uint16_t;
struct hep_chunk_uint32 {
hep_chunk_t chunk;
uint32_t data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_uint32 hep_chunk_uint32_t;
struct hep_chunk_str {
hep_chunk_t chunk;
char *data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_str hep_chunk_str_t;
struct hep_chunk_ip4 {
hep_chunk_t chunk;
struct in_addr data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_ip4 hep_chunk_ip4_t;
struct hep_chunk_ip6 {
hep_chunk_t chunk;
struct in6_addr data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_ip6 hep_chunk_ip6_t;
struct hep_chunk_payload {
hep_chunk_t chunk;
char *data;
} __attribute__((packed));
} PACKED;
typedef struct hep_chunk_payload hep_chunk_payload_t;
struct hep_ctrl {
char id[4];
uint16_t length;
} __attribute__((packed));
} PACKED;
typedef struct hep_ctrl hep_ctrl_t;
......@@ -219,10 +231,13 @@ struct hep_generic {
hep_chunk_uint32_t time_usec;
hep_chunk_uint8_t proto_t;
hep_chunk_uint32_t capt_id;
} __attribute__((packed));
} PACKED;
typedef struct hep_generic hep_generic_t;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_generic hep_generic_t;
/** Maximum size when streaming. */
#define MSG_SSIZE_MAX (USIZE_MAX)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论