Blob Blame Raw
From 109ee57e2469121520ee1ead5fcca7d8e9976b32 Mon Sep 17 00:00:00 2001
From: Martin Lambers <marlam@marlam.de>
Date: Sun, 1 Oct 2017 16:33:35 +0200
Subject: Revert commit 7963c22de093ac40e62a44cacb13f0b2fed19aa4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This should fix test failures on Fedora, reported by Volker Fröhlich.
It works on Debian unstable amd64.
I don't remember the reason for commit
7963c22de093ac40e62a44cacb13f0b2fed19aa4, but that patch seems to be misguided.
---
 gtatool/src/conv-netpbm/from-netpbm.cpp | 4 ++--
 gtatool/src/conv-netpbm/to-netpbm.cpp   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gtatool/src/conv-netpbm/from-netpbm.cpp b/gtatool/src/conv-netpbm/from-netpbm.cpp
index d3fd97f..27eba9b 100644
--- a/gtatool/src/conv-netpbm/from-netpbm.cpp
+++ b/gtatool/src/conv-netpbm/from-netpbm.cpp
@@ -2,7 +2,7 @@
  * This file is part of gtatool, a tool to manipulate Generic Tagged Arrays
  * (GTAs).
  *
- * Copyright (C) 2010, 2011, 2012, 2013, 2015
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015, 2017
  * Martin Lambers <marlam@marlam.de>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -98,7 +98,7 @@ extern "C" int gtatool_from_netpbm(int argc, char *argv[])
             tuple *tuplerow;
 
             pm_init("gta from-netpbm", 0);
-#if 0
+#ifdef PAM_STRUCT_SIZE
             pnm_readpaminit(fi, &inpam, PAM_STRUCT_SIZE(tuple_type));
 #else
             pnm_readpaminit(fi, &inpam, sizeof(struct pam));
diff --git a/gtatool/src/conv-netpbm/to-netpbm.cpp b/gtatool/src/conv-netpbm/to-netpbm.cpp
index 436d390..05610f2 100644
--- a/gtatool/src/conv-netpbm/to-netpbm.cpp
+++ b/gtatool/src/conv-netpbm/to-netpbm.cpp
@@ -2,7 +2,7 @@
  * This file is part of gtatool, a tool to manipulate Generic Tagged Arrays
  * (GTAs).
  *
- * Copyright (C) 2010, 2011, 2012, 2013, 2015
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015, 2017
  * Martin Lambers <marlam@marlam.de>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -121,7 +121,7 @@ extern "C" int gtatool_to_netpbm(int argc, char *argv[])
             struct pam outpam;
             std::memset(&outpam, 0, sizeof(outpam));
             outpam.size = sizeof(struct pam);
-#if 0
+#ifdef PAM_STRUCT_SIZE
             outpam.len = PAM_STRUCT_SIZE(tuple_type);
 #else
             outpam.len = outpam.size;
-- 
cgit v1.0-41-gc330