aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2019-02-16 15:28:27 -0800
committerNoah Misch <noah@leadboat.com>2019-02-16 15:28:27 -0800
commit04a87ae2626311e922cf964d1e7d42a5ef7d87bf (patch)
tree5c67a6b993411b6c5c3d54e7a100721bb3e928d0
parent6ee89952d4e944b5c9c26181d418395b2f5d5fd8 (diff)
downloadpostgresql-04a87ae2626311e922cf964d1e7d42a5ef7d87bf.tar.gz
postgresql-04a87ae2626311e922cf964d1e7d42a5ef7d87bf.zip
In imath.h, replace stdint.h usage with c.h equivalents.
As things stood, buildfarm member dory failed. MSVC versions lacking stdint.h are unusable for building PostgreSQL, but pg_config.h.win32 doesn't know that. Even so, we support other systems lacking stdint.h, including buildfarm member gaur. Per a suggestion from Tom Lane. Discussion: https://postgr.es/m/9598.1550353336@sss.pgh.pa.us
-rw-r--r--contrib/pgcrypto/imath.c1
-rw-r--r--contrib/pgcrypto/imath.h18
2 files changed, 10 insertions, 9 deletions
diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c
index fa1d0bc049b..431eb6c444a 100644
--- a/contrib/pgcrypto/imath.c
+++ b/contrib/pgcrypto/imath.c
@@ -16,6 +16,7 @@
* - #undef MIN, #undef MAX before defining them
* - remove includes covered by c.h
* - rename DEBUG to IMATH_DEBUG
+ * - replace stdint.h usage with c.h equivalents
*
* 2. Download a newer imath.c and imath.h. Transform them like in step 1.
* Apply to these files the diff you saved in step 1. Look for new lines
diff --git a/contrib/pgcrypto/imath.h b/contrib/pgcrypto/imath.h
index 65be7483c92..9c471bb7a1d 100644
--- a/contrib/pgcrypto/imath.h
+++ b/contrib/pgcrypto/imath.h
@@ -36,17 +36,17 @@ typedef long mp_small; /* must be a signed type */
typedef unsigned long mp_usmall; /* must be an unsigned type */
-/* Build with words as uint64_t by default. */
+/* Build with words as uint64 by default. */
#ifdef USE_32BIT_WORDS
-typedef uint16_t mp_digit;
-typedef uint32_t mp_word;
-#define MP_DIGIT_MAX (UINT16_MAX * 1UL)
-#define MP_WORD_MAX (UINT32_MAX * 1UL)
+typedef uint16 mp_digit;
+typedef uint32 mp_word;
+#define MP_DIGIT_MAX (PG_UINT16_MAX * 1UL)
+#define MP_WORD_MAX (PG_UINT32_MAX * 1UL)
#else
-typedef uint32_t mp_digit;
-typedef uint64_t mp_word;
-#define MP_DIGIT_MAX (UINT32_MAX * UINT64_C(1))
-#define MP_WORD_MAX (UINT64_MAX)
+typedef uint32 mp_digit;
+typedef uint64 mp_word;
+#define MP_DIGIT_MAX (PG_UINT32_MAX * UINT64CONST(1))
+#define MP_WORD_MAX (PG_UINT64_MAX)
#endif
typedef struct