/* The main runtime obj we keep this hidden for ourselves */
static struct switch_core_runtime runtime;
-
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
static int handle_SIGPIPE(int sig)
{
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Sig Pipe!\n");
return 0;
}
-#pragma warning( pop )\r
-
+#ifdef WIN32
+#pragma warning( pop )
#ifdef TRAP_BUS
static int handle_SIGBUS(int sig)
{
return 0;
}
#endif
+#endif
/* no ctl-c mofo */
-\r
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
static int handle_SIGINT(int sig)
{
return 0;
}
-#pragma warning( pop )\r
-
+#ifdef WIN32
+#pragma warning( pop )
+#endif
static void db_pick_path(char *dbname, char *buf, size_t size)
{
return SWITCH_STATUS_SUCCESS;
}
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
static void *switch_core_service_thread(switch_thread *thread, void *obj)
{
switch_core_thread_session *data = obj;
data->running = 0;
return NULL;
}
-#pragma warning( pop )\r
-
+#ifdef WIN32
+#pragma warning( pop )
+#endif
/* Either add a timeout here or make damn sure the thread cannot get hung somehow (my preference) */
SWITCH_DECLARE(void) switch_core_thread_session_end(switch_core_thread_session *thread_session)
{
}
}
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
static void switch_core_standard_on_transmit(switch_core_session *session)
{
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Standard TRANSMIT\n");
}
-#pragma warning( pop )\r
+#ifdef WIN32
+#pragma warning( pop )
+#endif
SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session *session)
{
return SWITCH_STATUS_GENERR;
}
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
SWITCH_DECLARE(switch_status) switch_core_hash_destroy(switch_hash *hash)
{
return SWITCH_STATUS_SUCCESS;
}
-#pragma warning( pop )\r
+#ifdef WIN32
+#pragma warning( pop )
+#endif
SWITCH_DECLARE(switch_status) switch_core_hash_insert_dup(switch_hash *hash, char *key, void *data)
{
static struct switch_loadable_module_container loadable_modules;
-
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
static void *switch_loadable_module_exec(switch_thread *thread, void *obj)
{
switch_status status = SWITCH_STATUS_SUCCESS;
switch_yield(1000000);
return NULL;
}
-#pragma warning( pop )\r
-
+#ifdef WIN32
+#pragma warning( pop )
+#endif
static switch_status switch_loadable_module_load_file(char *filename, switch_memory_pool *pool,
switch_loadable_module **new_module)
{
return i;
}
-
-#pragma warning( push )\r
-#pragma warning( disable : 4100 )\r
+#ifdef WIN32
+#pragma warning( push )
+#pragma warning( disable : 4100 )
+#endif
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_memory_pool *pool, switch_codec_interface **array,
int arraylen, char **prefs, int preflen)
{
return i;
}
-#pragma warning( pop )\r
+#ifdef WIN32
+#pragma warning( pop )
+#endif
SWITCH_DECLARE(switch_status) switch_api_execute(char *cmd, char *arg, char *retbuf, size_t len)
{