From 6de71767abd7fa42b9c6aac6ad3af4e581a5b792 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 5 Jun 2023 14:39:27 -0700 Subject: [PATCH] fragment: Mingw needs to use POSIX handling for `\\` Otherwise it won't correctly escape things like spaces, and can print out the `\` literal escaping nothing, which causes most shell lexers to choke. Fixes: #238 --- libpkgconf/fragment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpkgconf/fragment.c b/libpkgconf/fragment.c index c015e4f..8cc8c1d 100644 --- a/libpkgconf/fragment.c +++ b/libpkgconf/fragment.c @@ -438,7 +438,7 @@ fragment_quote(const pkgconf_fragment_t *frag) (*src > ':' && *src < '=') || (*src > '=' && *src < '@') || (*src > 'Z' && *src < '\\') || -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__MINGW32__) (*src == '\\') || #endif (*src > '\\' && *src < '^') ||