From 3b2fe57c7d7bf7ecc1e19d112f7ddd63b0eb7139 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 8 Jul 2014 17:14:26 +0200 Subject: misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/extract/cut | 4 ++-- src/lib/gamma-helper.c | 4 ++-- src/lib/libgamma-error.c.gpp | 4 ++++ src/lib/libgamma-error.h | 4 ++++ 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/extract/cut b/src/extract/cut index fa6cb99..7399b7f 100755 --- a/src/extract/cut +++ b/src/extract/cut @@ -36,7 +36,7 @@ while i < n: delimiter = sys.argv[i] elif arg == '-f': i += 1 - fields += [int(f) for f in sys.argv[i].split(',')] + fields += [int(f) - 1 for f in sys.argv[i].split(',')] elif arg == '--complement': complement = True i += 1 @@ -47,7 +47,7 @@ fields = set(fields) def modify(line): line = line.split(delimiter) - if not complement: + if complement: line = [line[i] for i in range(len(line)) if i not in fields] else: line = [line[i] for i in range(len(line)) if i in fields] diff --git a/src/lib/gamma-helper.c b/src/lib/gamma-helper.c index 45a38b5..d30e5ab 100644 --- a/src/lib/gamma-helper.c +++ b/src/lib/gamma-helper.c @@ -55,7 +55,7 @@ static inline uint64_t float_to_64(float value) { /* XXX Which is faster? */ -#ifdef __GCC__ +#ifdef HAVE_INT128 /* `__int128` is a GNU C extension, which (because it is not ISO C) emits a warning under -pedantic. */ @@ -121,7 +121,7 @@ static inline uint64_t double_to_64(double value) { /* XXX Which is faster? */ -#ifdef __GCC__ +#ifdef HAVE_INT128 /* `__int128` is a GNU C extension, which (because it is not ISO C) emits a warning under -pedantic. */ diff --git a/src/lib/libgamma-error.c.gpp b/src/lib/libgamma-error.c.gpp index 0378f57..717f11b 100644 --- a/src/lib/libgamma-error.c.gpp +++ b/src/lib/libgamma-error.c.gpp @@ -37,7 +37,11 @@ $>export PATH=".:${PATH}" * Group that the user needs to be a member of if * `LIBGAMMA_DEVICE_REQUIRE_GROUP` is returned. */ +#ifndef __WIN32__ gid_t libgamma_group_gid = 0; +#else +short libgamma_group_gid = 0; +#endif /** * Group that the user needs to be a member of if diff --git a/src/lib/libgamma-error.h b/src/lib/libgamma-error.h index d11dbc1..419985f 100644 --- a/src/lib/libgamma-error.h +++ b/src/lib/libgamma-error.h @@ -34,7 +34,11 @@ * Group that the user needs to be a member of if * `LIBGAMMA_DEVICE_REQUIRE_GROUP` is returned. */ +#ifndef __WIN32__ extern gid_t libgamma_group_gid; +#else +extern short libgamma_group_gid; +#endif /** * Group that the user needs to be a member of if -- cgit v1.2.3-70-g09d2