  # check for ssize_t
  AC_CHECK_TYPE(ssize_t, ,
 diff --git a/lib/Makefile.inc b/lib/Makefile.inc
-index 61e80cf52..47e249d76 100644
+index 69f9b403d..44e2dc039 100644
 --- a/lib/Makefile.inc
 +++ b/lib/Makefile.inc
-@@ -54,7 +54,7 @@ LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
+@@ -54,7 +54,8 @@ LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
    http_ntlm.c curl_ntlm_wb.c curl_ntlm_core.c curl_sasl.c rand.c        \
    curl_multibyte.c hostcheck.c conncache.c pipeline.c dotdot.c          \
    x509asn1.c http2.c smb.c curl_endian.c curl_des.c system_win32.c      \
--  mime.c sha256.c setopt.c curl_path.c
-+  mime.c sha256.c setopt.c curl_path.c pathtools.c
+-  mime.c sha256.c setopt.c curl_path.c curl_ctype.c curl_range.c
++  mime.c sha256.c setopt.c curl_path.c curl_ctype.c curl_range.c        \
++  pathtools.c
  
  LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \
    formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h if2ip.h         \
-@@ -74,7 +74,7 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \
+@@ -74,7 +75,7 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \
    curl_setup_once.h multihandle.h setup-vms.h pipeline.h dotdot.h       \
    x509asn1.h http2.h sigpipe.h smb.h curl_endian.h curl_des.h           \
    curl_printf.h system_win32.h rand.h mime.h curl_sha256.h setopt.h     \
--  curl_path.h
-+  curl_path.h pathtools.h
+-  curl_path.h curl_ctype.h curl_range.h
++  curl_path.h curl_ctype.h curl_range.h pathtools.h
  
  LIB_RCFILES = libcurl.rc
  
 diff --git a/lib/curl_config.h.in b/lib/curl_config.h.in
-index d7ed28def..4868e617b 100644
+index 0f2a80403..9bad51f8d 100644
 --- a/lib/curl_config.h.in
 +++ b/lib/curl_config.h.in
 @@ -12,6 +12,9 @@

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 configure.ac         |   1 +
 lib/Makefile.inc     |   4 +-
 lib/curl_config.h.in |   3 +
 lib/pathtools.c      | 533 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/pathtools.h      |  53 +++++
 lib/url.c            |  16 ++
 6 files changed, 608 insertions(+), 2 deletions(-)
 create mode 100644 lib/pathtools.c
 create mode 100644 lib/pathtools.h

diff --git a/configure.ac b/configure.ac
index c223a0436..6115b69a4 100755
--- a/configure.ac
+++ b/configure.ac
@@ -3465,6 +3465,7 @@ if test "xyes" = "x$longlong"; then
   ])
 fi
 

From 683a5c9b0963e7ec816c5c6d18aa137a32cbc2cf Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 22 Feb 2017 11:03:04 +0100
Subject: [PATCH] Make cURL relocatable
