From 4e86b0312609db29cae3f078d505b02566569b45 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 3 Apr 2014 13:58:07 -0400 Subject: [PATCH] FS-6424: --resolve properly export symbols from stfu --- src/include/switch.h | 2 +- src/include/switch_stfu.h | 23 ++++------------------- src/switch_stfu.c | 4 +++- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/include/switch.h b/src/include/switch.h index 07e3bb5769..2fda7e7ade 100644 --- a/src/include/switch.h +++ b/src/include/switch.h @@ -106,9 +106,9 @@ #include #include -#include "switch_stfu.h" #include "switch_platform.h" #include "switch_types.h" +#include "switch_stfu.h" #include "switch_apr.h" #include "switch_mprintf.h" #include "switch_core_db.h" diff --git a/src/include/switch_stfu.h b/src/include/switch_stfu.h index 1434699522..1af6b23010 100644 --- a/src/include/switch_stfu.h +++ b/src/include/switch_stfu.h @@ -28,6 +28,9 @@ #ifndef STFU_H #define STFU_H + +#include + #ifdef __cplusplus extern "C" { #endif @@ -75,8 +78,6 @@ typedef unsigned long in_addr_t; #endif #include - - #ifdef WIN32 #include #include @@ -95,23 +96,7 @@ typedef intptr_t stfu_ssize_t; typedef int stfu_filehandle_t; #define STFU_SOCK_INVALID INVALID_SOCKET #define strerror_r(num, buf, size) strerror_s(buf, size, num) -#if defined(STFU_DECLARE_STATIC) -#define STFU_DECLARE(type) type __stdcall -#define STFU_DECLARE_NONSTD(type) type __cdecl -#define STFU_DECLARE_DATA -#elif defined(STFU_EXPORTS) -#define STFU_DECLARE(type) __declspec(dllexport) type __stdcall -#define STFU_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl -#define STFU_DECLARE_DATA __declspec(dllexport) #else -#define STFU_DECLARE(type) __declspec(dllimport) type __stdcall -#define STFU_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl -#define STFU_DECLARE_DATA __declspec(dllimport) -#endif -#else -#define STFU_DECLARE(type) type -#define STFU_DECLARE_NONSTD(type) type -#define STFU_DECLARE_DATA #include #include #include @@ -197,7 +182,7 @@ stfu_instance_t *stfu_n_init(uint32_t qlen, uint32_t max_qlen, uint32_t samples_ stfu_status_t stfu_n_resize(stfu_instance_t *i, uint32_t qlen); stfu_status_t stfu_n_add_data(stfu_instance_t *i, uint32_t ts, uint16_t seq, uint32_t pt, void *data, size_t datalen, uint32_t timer_ts, int last); stfu_frame_t *stfu_n_read_a_frame(stfu_instance_t *i); -STFU_DECLARE(int32_t) stfu_n_copy_next_frame(stfu_instance_t *jb, uint32_t timestamp, uint16_t seq, uint16_t distance, stfu_frame_t *next_frame); +SWITCH_DECLARE(int32_t) stfu_n_copy_next_frame(stfu_instance_t *jb, uint32_t timestamp, uint16_t seq, uint16_t distance, stfu_frame_t *next_frame); void _stfu_n_reset(stfu_instance_t *i, const char *file, const char *func, int line); #define stfu_n_reset(_i) _stfu_n_reset(_i, STFU_PRE) stfu_status_t stfu_n_sync(stfu_instance_t *i, uint32_t packets); diff --git a/src/switch_stfu.c b/src/switch_stfu.c index b951206a9c..7977b720a6 100644 --- a/src/switch_stfu.c +++ b/src/switch_stfu.c @@ -25,6 +25,8 @@ * * THOSE WHO DISAGREE MAY CERTAINLY STFU */ + +#include "switch.h" #include "switch_stfu.h" //#define DB_JB 1 @@ -824,7 +826,7 @@ stfu_frame_t *stfu_n_read_a_frame(stfu_instance_t *i) return rframe; } -STFU_DECLARE(int32_t) stfu_n_copy_next_frame(stfu_instance_t *jb, uint32_t timestamp, uint16_t seq, uint16_t distance, stfu_frame_t *next_frame) +SWITCH_DECLARE(int32_t) stfu_n_copy_next_frame(stfu_instance_t *jb, uint32_t timestamp, uint16_t seq, uint16_t distance, stfu_frame_t *next_frame) { uint32_t i = 0, j = 0; #ifdef WIN32