0008-Moving-wstrcmp-and-wstrncmp-implementations.patch

application/octet-stream

Filename: 0008-Moving-wstrcmp-and-wstrncmp-implementations.patch
Type: application/octet-stream
Part: 2
Message: Re: making the backend's json parser work in frontend code

Patch

Format: format-patch
Series: patch 0008
Subject: Moving wstrcmp and wstrncmp implementations.
File+
src/backend/utils/mb/Makefile 1 3
src/common/Makefile 3 1
src/common/wstrcmp.c 1 1
src/common/wstrncmp.c 1 1
From c4a38c31d9be99dda51fe6f66c39c584521b26cc Mon Sep 17 00:00:00 2001
From: Mark Dilger <mark.dilger@enterprisedb.com>
Date: Wed, 22 Jan 2020 20:19:34 -0800
Subject: [PATCH 08/11] Moving wstrcmp and wstrncmp implementations.

The functions defined in wstrcmp.c and wstrncmp.c are declared in
src/include/common/pg_wchar.h and contain no backend-specific code, so moving
those two files into src/common/ where they belong.
---
 src/backend/utils/mb/Makefile               | 4 +---
 src/common/Makefile                         | 4 +++-
 src/{backend/utils/mb => common}/wstrcmp.c  | 2 +-
 src/{backend/utils/mb => common}/wstrncmp.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
 rename src/{backend/utils/mb => common}/wstrcmp.c (98%)
 rename src/{backend/utils/mb => common}/wstrncmp.c (98%)

diff --git a/src/backend/utils/mb/Makefile b/src/backend/utils/mb/Makefile
index b19a125fa2..3e6f19cd44 100644
--- a/src/backend/utils/mb/Makefile
+++ b/src/backend/utils/mb/Makefile
@@ -15,9 +15,7 @@ include $(top_builddir)/src/Makefile.global
 OBJS = \
 	conv.o \
 	mbutils.o \
-	stringinfo_mb.o \
-	wstrcmp.o \
-	wstrncmp.o
+	stringinfo_mb.o
 
 include $(top_srcdir)/src/backend/common.mk
 
diff --git a/src/common/Makefile b/src/common/Makefile
index 44ca68fa6c..3882cd7a3d 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -72,7 +72,9 @@ OBJS_COMMON = \
 	unicode_norm.o \
 	username.o \
 	wait_error.o \
-	wchar.o
+	wchar.o \
+	wstrcmp.o \
+	wstrncmp.o
 
 ifeq ($(with_openssl),yes)
 OBJS_COMMON += \
diff --git a/src/backend/utils/mb/wstrcmp.c b/src/common/wstrcmp.c
similarity index 98%
rename from src/backend/utils/mb/wstrcmp.c
rename to src/common/wstrcmp.c
index e5f57d717d..4d0a66952b 100644
--- a/src/backend/utils/mb/wstrcmp.c
+++ b/src/common/wstrcmp.c
@@ -1,5 +1,5 @@
 /*
- * src/backend/utils/mb/wstrcmp.c
+ * src/common/wstrcmp.c
  *
  *-
  * Copyright (c) 1990, 1993
diff --git a/src/backend/utils/mb/wstrncmp.c b/src/common/wstrncmp.c
similarity index 98%
rename from src/backend/utils/mb/wstrncmp.c
rename to src/common/wstrncmp.c
index cce0c6c5cf..7fb8319161 100644
--- a/src/backend/utils/mb/wstrncmp.c
+++ b/src/common/wstrncmp.c
@@ -1,5 +1,5 @@
 /*
- * src/backend/utils/mb/wstrncmp.c
+ * src/common/wstrncmp.c
  *
  *
  * Copyright (c) 1989, 1993
-- 
2.21.1 (Apple Git-122.3)