v4-0005-ltree-use-global_libc_ctype.patch

text/x-patch

Filename: v4-0005-ltree-use-global_libc_ctype.patch
Type: text/x-patch
Part: 4
Message: Re: Remaining dependency on setlocale()

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v4-0005
Subject: ltree: use global_libc_ctype.
File+
contrib/ltree/crc32.c 1 1
From fbe7c9c469653731e013b7b98d9ade655df68e5f Mon Sep 17 00:00:00 2001
From: Jeff Davis <jeff@j-davis.com>
Date: Tue, 10 Jun 2025 20:06:50 -0700
Subject: [PATCH v4 5/8] ltree: use global_libc_ctype.

Discussion: https://postgr.es/m/9875f7f9-50f1-4b5d-86fc-ee8b03e8c162@eisentraut.org
---
 contrib/ltree/crc32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/ltree/crc32.c b/contrib/ltree/crc32.c
index 134f46a805e..7a1f666608c 100644
--- a/contrib/ltree/crc32.c
+++ b/contrib/ltree/crc32.c
@@ -12,7 +12,7 @@
 
 #ifdef LOWER_NODE
 #include <ctype.h>
-#define TOLOWER(x)	tolower((unsigned char) (x))
+#define TOLOWER(x)	tolower_l((unsigned char) (x), global_libc_ctype)
 #else
 #define TOLOWER(x)	(x)
 #endif
-- 
2.43.0