#ifndef STFU_H
#define STFU_H
+
+#include <switch.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#endif
#include <assert.h>
-
-
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
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>
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);
*
* THOSE WHO DISAGREE MAY CERTAINLY STFU
*/
+
+#include "switch.h"
#include "switch_stfu.h"
//#define DB_JB 1
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