#ifndef __UTILS_SIGNAL_H
#define __UTILS_SIGNAL_H
+#ifndef _WIN32
#include <signal.h>
#include <termios.h>
#include <freerdp/api.h>
extern int terminal_fildes;
extern struct termios orig_flags;
extern struct termios new_flags;
+#endif
-FREERDP_API void freerdp_handle_signals(void);
+FREERDP_API int freerdp_handle_signals(void);
#endif /* __UTILS_SIGNAL_H */
#include <stddef.h>
#include <freerdp/utils/signal.h>
+#ifdef _WIN32
+#include <errno.h>
+int freerdp_handle_signals(void)
+{
+ errno = ENOSYS;
+ return -1;
+}
+#else
volatile sig_atomic_t terminal_needs_reset = 0;
int terminal_fildes = 0;
struct termios orig_flags;
raise(signum);
}
-void freerdp_handle_signals(void)
+int freerdp_handle_signals(void)
{
const int fatal_signals[] = {
SIGABRT,
&fatal_sigaction, NULL);
pthread_sigmask(SIG_SETMASK, &orig_set, NULL);
+ return 0;
}
+#endif