From dc8211f03f3c6ab2b427820f01fad755ddfb6136 Mon Sep 17 00:00:00 2001
From: Gabriele Baldassarre <gabriele@gabrielebaldassarre.com>
Date: Fri, 8 May 2020 23:33:56 +0000
Subject: Use autoheader file


diff --git a/libwcs/wcs.h b/libwcs/wcs.h
index 0d69049..6cda4e4 100644
--- a/libwcs/wcs.h
+++ b/libwcs/wcs.h
@@ -30,6 +30,10 @@
 #ifndef _wcs_h_
 #define _wcs_h_
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "wcslib.h"
 #include "fitshead.h"
 
-- 
2.26.0


From d4c42087bf2a8c2e122de4a4a776c05e0ad26a48 Mon Sep 17 00:00:00 2001
From: Gabriele Baldassarre <gabriele@gabrielebaldassarre.com>
Date: Fri, 8 May 2020 23:37:56 +0000
Subject: Fix compiler warnings


diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
index b618686..4279d3c 100644
--- a/libwcs/imhfile.c
+++ b/libwcs/imhfile.c
@@ -1075,7 +1075,7 @@ char	*hdrname;	/* IRAF image header file pathname */
 
 	/* add name */
 	newpixname[len] = '\0';
-	(void)strncat (newpixname, pixname, SZ_IM2PIXFILE);
+	(void)strncat (newpixname, pixname, SZ_IM2PIXFILE - len);
 	}
 
     /* Pixel file has same name as header file, but with .pix extension */
diff --git a/libwcs/webread.c b/libwcs/webread.c
index 1f5c518..cd9cba9 100644
--- a/libwcs/webread.c
+++ b/libwcs/webread.c
@@ -32,6 +32,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <ctype.h>
 #include <math.h>
 #include "wcs.h"
 #include "fitsfile.h"
-- 
2.26.0

