regcomp: avoid a namespace collision with C23 <float.h>

C23 adds the INFINITY macro to float.h and obsoletes the INFINITY macro in
math.h. Clang's float.h declares the INFINITY macro even in older GNU
modes, like -std=gnu99. Bionic's limits.h includes float.h, so the
conflicting INFINITY macro prevents compiling regcomp.c.

Bug: b/384985989
Change-Id: Id1ad71268b94f93855dcfa6a853ac7c86afbae52

Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/74568
Tested-by: Shahbaz Youssefi <syoussefi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
diff --git a/third_party/llvm-10.0/llvm/lib/Support/regcomp.c b/third_party/llvm-10.0/llvm/lib/Support/regcomp.c
index ee2a1d8..b7abc1d 100644
--- a/third_party/llvm-10.0/llvm/lib/Support/regcomp.c
+++ b/third_party/llvm-10.0/llvm/lib/Support/regcomp.c
@@ -278,6 +278,7 @@
 #else
 #define	DUPMAX	255
 #endif
+#undef INFINITY // avoid collision with C23 <float.h> INFINITY (via <limits.h> on Bionic)
 #define	INFINITY	(DUPMAX + 1)
 
 #ifndef NDEBUG
diff --git a/third_party/llvm-16.0/llvm/lib/Support/regcomp.c b/third_party/llvm-16.0/llvm/lib/Support/regcomp.c
index 9d48419..9482784 100644
--- a/third_party/llvm-16.0/llvm/lib/Support/regcomp.c
+++ b/third_party/llvm-16.0/llvm/lib/Support/regcomp.c
@@ -278,6 +278,7 @@
 #else
 #define	DUPMAX	255
 #endif
+#undef INFINITY // avoid collision with C23 <float.h> INFINITY (via <limits.h> on Bionic)
 #define	INFINITY	(DUPMAX + 1)
 
 #ifndef NDEBUG
diff --git a/third_party/llvm-subzero/lib/Support/regcomp.c b/third_party/llvm-subzero/lib/Support/regcomp.c
index ebde64f..05bd388 100644
--- a/third_party/llvm-subzero/lib/Support/regcomp.c
+++ b/third_party/llvm-subzero/lib/Support/regcomp.c
@@ -150,6 +150,7 @@
 #else
 #define	DUPMAX	255
 #endif
+#undef INFINITY // avoid collision with C23 <float.h> INFINITY (via <limits.h> on Bionic)
 #define	INFINITY	(DUPMAX + 1)
 
 #ifndef NDEBUG