From 2b3c15b079c5f8aebd2f6a8f861c9422db757c2b Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@gmail.com>
Date: Thu, 18 Apr 2024 12:06:17 +1200
Subject: [PATCH v3 2/3] Remove traces of BeOS.

Commit 15abc7788e6 tolerated namespace pollution from BeOS system
headers.  Commit 44f902122 de-supported BeOS.  Since that stuff didn't
make it into the Meson build system, synchronize by removing from
configure.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> (the idea, not the patch)
Discussion: https://postgr.es/m/ME3P282MB3166F9D1F71F787929C0C7E7B6312%40ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM
---
 configure                  | 44 --------------------------------------
 configure.ac               |  5 -----
 src/include/c.h            |  8 -------
 src/include/pg_config.h.in | 12 -----------
 4 files changed, 69 deletions(-)

diff --git a/configure b/configure
index cfec577a1c1..3bfbfdf6521 100755
--- a/configure
+++ b/configure
@@ -16784,50 +16784,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-# Some platforms predefine the types int8, int16, etc.  Only check
-# a (hopefully) representative subset.
-ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
-"
-if test "x$ac_cv_type_int8" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
-"
-if test "x$ac_cv_type_uint8" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
-"
-if test "x$ac_cv_type_int64" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT64 1
-_ACEOF
-
-
-fi
-ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
-"
-if test "x$ac_cv_type_uint64" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT64 1
-_ACEOF
-
-
-fi
-
-
 # Check how to format int64_t without warnings from printf.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf int64_t modifier" >&5
 $as_echo_n "checking for printf int64_t modifier... " >&6; }
diff --git a/configure.ac b/configure.ac
index 10bfb994d4f..0560b9ce1a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1985,11 +1985,6 @@ if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
 fi
 AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any C data type.])
 
-# Some platforms predefine the types int8, int16, etc.  Only check
-# a (hopefully) representative subset.
-AC_CHECK_TYPES([int8, uint8, int64, uint64], [], [],
-[#include <stdio.h>])
-
 # Check how to format int64_t without warnings from printf.
 PGAC_PRINTF_INT64_MODIFIER
 
diff --git a/src/include/c.h b/src/include/c.h
index 024213f37f3..dd140d2ae57 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -485,14 +485,10 @@ typedef char *Pointer;
  *		used for numerical computations and the
  *		frontend/backend protocol.
  */
-#ifndef HAVE_INT8
 typedef int8_t int8;			/* == 8 bits */
 typedef int16_t int16;			/* == 16 bits */
 typedef int32_t int32;			/* == 32 bits */
-#endif							/* not HAVE_INT8 */
-#ifndef HAVE_INT64
 typedef int64_t int64;			/* == 64 bits */
-#endif							/* not HAVE_INT64 */
 
 /*
  * uintN
@@ -500,14 +496,10 @@ typedef int64_t int64;			/* == 64 bits */
  *		used for numerical computations and the
  *		frontend/backend protocol.
  */
-#ifndef HAVE_UINT8
 typedef uint8_t uint8;			/* == 8 bits */
 typedef uint16_t uint16;		/* == 16 bits */
 typedef uint32_t uint32;		/* == 32 bits */
-#endif							/* not HAVE_UINT8 */
-#ifndef HAVE_UINT64
 typedef uint64_t uint64;		/* == 64 bits */
-#endif							/* not HAVE_UINT64 */
 
 /*
  * bitsN
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 3755eb69e24..797f6ba3d64 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -213,12 +213,6 @@
 /* Define to 1 if you have the `inet_pton' function. */
 #undef HAVE_INET_PTON
 
-/* Define to 1 if the system has the type `int64'. */
-#undef HAVE_INT64
-
-/* Define to 1 if the system has the type `int8'. */
-#undef HAVE_INT8
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -465,12 +459,6 @@
 /* Define to 1 if you have the <ucred.h> header file. */
 #undef HAVE_UCRED_H
 
-/* Define to 1 if the system has the type `uint64'. */
-#undef HAVE_UINT64
-
-/* Define to 1 if the system has the type `uint8'. */
-#undef HAVE_UINT8
-
 /* Define to 1 if the system has the type `union semun'. */
 #undef HAVE_UNION_SEMUN
 
-- 
2.45.2

