clean-up-portable-paths.patch.nocfbot
application/octet-stream
Filename: clean-up-portable-paths.patch.nocfbot
Type: application/octet-stream
Part: 0
diff --git a/src/include/port/pg_bitutils.h b/src/include/port/pg_bitutils.h
index 789663edd93..3fa0248f32e 100644
--- a/src/include/port/pg_bitutils.h
+++ b/src/include/port/pg_bitutils.h
@@ -289,8 +289,8 @@ extern PGDLLIMPORT uint64 (*pg_popcount_masked_optimized) (const char *buf, int
#else
/* Use a portable implementation -- no need for a function pointer. */
-extern uint64 pg_popcount_optimized(const char *buf, int bytes);
-extern uint64 pg_popcount_masked_optimized(const char *buf, int bytes, bits8 mask);
+#define pg_popcount_optimized(buf, bytes) pg_popcount_portable(buf, bytes)
+#define pg_popcount_masked_optimized(buf, bytes, mask) pg_popcount_masked_portable(buf, bytes, mask)
#endif
diff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c
index 49b130f1306..047044b2917 100644
--- a/src/port/pg_bitutils.c
+++ b/src/port/pg_bitutils.c
@@ -161,34 +161,3 @@ pg_popcount_masked_portable(const char *buf, int bytes, bits8 mask)
return popcnt;
}
-
-#if !defined(HAVE_X86_64_POPCNTQ) && !defined(USE_NEON)
-
-/*
- * When special CPU instructions are not available, there's no point in using
- * function pointers to vary the implementation. We instead just make these
- * actual external functions. The compiler should be able to inline the
- * portable versions here.
- */
-
-/*
- * pg_popcount_optimized
- * Returns the number of 1-bits in buf
- */
-uint64
-pg_popcount_optimized(const char *buf, int bytes)
-{
- return pg_popcount_portable(buf, bytes);
-}
-
-/*
- * pg_popcount_masked_optimized
- * Returns the number of 1-bits in buf after applying the mask to each byte
- */
-uint64
-pg_popcount_masked_optimized(const char *buf, int bytes, bits8 mask)
-{
- return pg_popcount_masked_portable(buf, bytes, mask);
-}
-
-#endif /* ! HAVE_X86_64_POPCNTQ && ! USE_NEON */