]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix "warning: 'max' macro redefined".
authorBruno Haible <bruno@clisp.org>
Sat, 17 Oct 2020 19:55:47 +0000 (21:55 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
* gettext-tools/src/x-javascript.c (max): Undefine first.
* gettext-tools/src/x-python.c (max): Likewise.

gettext-tools/src/x-javascript.c
gettext-tools/src/x-python.c

index 7545adafbed58aea18c53d4242da8bff70ece245..3f2e2ac7e02e17e9a018a1cc83b436c41c579d27 100644 (file)
@@ -56,6 +56,7 @@
 
 #define _(s) gettext(s)
 
+#undef max /* clean up after MSVC's <stdlib.h> */
 #define max(a,b) ((a) > (b) ? (a) : (b))
 
 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
index 4c95797f79a2ceae48ec69b581c119ec60786a02..d7ac26f771289d8914edeba890060a931b2d31fe 100644 (file)
@@ -57,6 +57,7 @@
 
 #define _(s) gettext(s)
 
+#undef max /* clean up after MSVC's <stdlib.h> */
 #define max(a,b) ((a) > (b) ? (a) : (b))
 
 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))