Added Cygwin build support

strverscmp is included to satisfy a dependency in Cygwin.
Excluded utmp and prctl functions that are not supported currently.
This commit is contained in:
Wayne Porter authored and Craig Small committed 2016-03-12 15:07:30 +11:00
1 parent 656a4980a4
commit e50ad77997
5 files changed
+185 -7

No files matched your search

+4
View File
@@ -21,7 +21,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#ifndef __CYGWIN__
#include <sys/prctl.h>
#endif
#include "c.h"
#define DEFAULT_SLEEPTIME 300
@@ -78,8 +80,10 @@ int main(int argc, char *argv[])
sigaction(SIGUSR1, &signal_action, NULL);
sigaction(SIGUSR2, &signal_action, NULL);
#ifndef __CYGWIN__
/* set process name */
prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL);
#endif
while (sleep_time > 0) {
sleep_time = sleep(sleep_time);