From 07ffb1a19859791d419b83a876ba552dadedbf46 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 22 May 2011 15:56:04 +0200 Subject: [PATCH] Make return value of SetPriorityClass() behave the same as setpriority(). --- NEWS | 4 ++++ configure.in | 2 +- src/tincd.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 792a71f1..4b2176e7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Version 1.0.15 not released yet + + * Fix ProcessPriority option under Windows. + Version 1.0.14 May 8 2011 * Fixed reading configuration files that do not end with a newline. Again. diff --git a/configure.in b/configure.in index 0f9c2f31..8836ca2d 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT AC_CONFIG_SRCDIR([src/tincd.c]) -AM_INIT_AUTOMAKE(tinc, 1.0.14) +AM_INIT_AUTOMAKE(tinc, 1.0.14+git) AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE diff --git a/src/tincd.c b/src/tincd.c index 40ac0383..b3d911b8 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -504,7 +504,7 @@ static bool drop_privs() { } #ifdef HAVE_MINGW -# define setpriority(level) SetPriorityClass(GetCurrentProcess(), (level)) +# define setpriority(level) !SetPriorityClass(GetCurrentProcess(), (level)) #else # define NORMAL_PRIORITY_CLASS 0 # define BELOW_NORMAL_PRIORITY_CLASS 10 -- 2.39.5