]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6424: --resolve properly export symbols from stfu
authorMichael Jerris <mike@jerris.com>
Thu, 3 Apr 2014 17:58:07 +0000 (13:58 -0400)
committerMichael Jerris <mike@jerris.com>
Thu, 3 Apr 2014 17:58:13 +0000 (13:58 -0400)
src/include/switch.h
src/include/switch_stfu.h
src/switch_stfu.c

index 07e3bb576918a8e5701a3a0d98240423316163a1..2fda7e7ade6592a933ac50dbc971fc21fb016806 100644 (file)
 #include <signal.h>
 #include <errno.h>
 
-#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"
index 1434699522127850a6d62e6c5315ab710b51d45e..1af6b23010bb46527c5da51f5fb3006554b377d2 100644 (file)
@@ -28,6 +28,9 @@
 
 #ifndef STFU_H
 #define STFU_H
+
+#include <switch.h> 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -75,8 +78,6 @@ typedef unsigned long   in_addr_t;
 #endif
 #include <assert.h>
 
-
-
 #ifdef WIN32
 #include <winsock2.h>
 #include <windows.h>
@@ -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 <stdint.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -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);
index b951206a9c4c465089eca7543f501ead07ab36db..7977b720a64fc407be318008749120c1b540f4e9 100644 (file)
@@ -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