#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-
#include <assert.h>
#ifdef WIN32
#include <winsock.h>
#define close(x) closesocket(x)
+#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e)
#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <sys/times.h>
#endif
bCtrlC = true;
LogPrintf("Caught signal: %d, cleaning up, just a second...\n", sig);
// ignore all these signals now and let the connection close
- signal(SIGHUP, SIG_IGN);
signal(SIGINT, SIG_IGN);
- signal(SIGPIPE, SIG_IGN);
signal(SIGTERM, SIG_IGN);
+#ifndef WIN32
+ signal(SIGHUP, SIG_IGN);
+ signal(SIGPIPE, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
+#endif
}
int
char *flvFile = 0;
- char DEFAULT_FLASH_VER[] = "LNX 10,0,22,87";
+#undef OSS
+#ifdef WIN32
+#define OSS "WIN"
+#else
+#define OSS "LNX"
+#endif
+
+ char DEFAULT_FLASH_VER[] = OSS " 10,0,22,87";
- signal(SIGHUP, sigIntHandler);
signal(SIGINT, sigIntHandler);
- signal(SIGPIPE, sigIntHandler);
signal(SIGTERM, sigIntHandler);
+#ifndef WIN32
+ signal(SIGHUP, sigIntHandler);
+ signal(SIGPIPE, sigIntHandler);
signal(SIGQUIT, sigIntHandler);
+#endif
/* sleep(30); */