summaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-03 06:06:01 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-03 06:06:01 +0000
commit2dda64a6258fe213cb75f8a1b381d6a8ce338bb4 (patch)
tree69dc5d71503b8283d8144704ac5beaf98a8a2c94 /fixincludes/inclhack.def
parentd3ed35175e394ed9bf2721192f14f57c91c1fbe9 (diff)
downloadgcc-2dda64a6258fe213cb75f8a1b381d6a8ce338bb4.tar.gz
2009-06-03 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r148111 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@148114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def62
1 files changed, 62 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index a6aa651a764..cfa567f29c9 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3167,6 +3167,68 @@ fix = {
/*
+ * Sun Solaris 10 has a version of sys/int_const.h that defines
+ * UINT8_C and UINT16_C to unsigned constants.
+ */
+fix = {
+ hackname = solaris_int_const;
+ select = '@\(#\)int_const.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ files = sys/int_const.h;
+ c_fix = format;
+ c_fix_arg = "#define\tUINT8_C(c)\t(c)\n"
+ "%1\n"
+ "#define\tUINT16_C(c)\t(c)";
+ c_fix_arg = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n"
+ "(/\*.*\*/)\n"
+ "#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*";
+ test_text =
+ '#pragma ident "@(#)int_const.h 1.5 04/09/28 SMI"'"\n"
+ "#define UINT8_C(c) __CONCAT__(c,u)\n"
+ "/* CSTYLED */\n"
+ "#define UINT16_C(c) __CONCAT__(c,u)";
+};
+
+
+/*
+ * Sun Solaris 10 has a version of sys/int_limits.h that defines
+ * UINT8_MAX and UINT16_MAX to unsigned constants.
+ */
+fix = {
+ hackname = solaris_int_limits_1;
+ select = '@\(#\)int_limits.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ files = sys/int_limits.h;
+ c_fix = format;
+ c_fix_arg = "#define\tUINT8_MAX\t(255)\n"
+ "#define\tUINT16_MAX\t(65535)";
+ c_fix_arg = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n"
+ "#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)";
+ test_text =
+ '#pragma ident "@(#)int_limits.h 1.9 04/09/28 SMI"'"\n"
+ "#define UINT8_MAX (255U)\n"
+ "#define UINT16_MAX (65535U)";
+};
+
+
+/*
+ * Sun Solaris 10 has a version of sys/int_limits.h that defines
+ * INT_FAST16 limits to wrong values for sys/int_types.h.
+ */
+fix = {
+ hackname = solaris_int_limits_2;
+ select = '@\(#\)int_limits.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ files = sys/int_limits.h;
+ c_fix = format;
+ c_fix_arg = "#define\t%1_FAST16_%2 %132_%2";
+ c_fix_arg = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*";
+ test_text =
+ '#pragma ident "@(#)int_limits.h 1.9 04/09/28 SMI"'"\n"
+ "#define INT_FAST16_MAX INT16_MAX\n"
+ "#define UINT_FAST16_MAX UINT16_MAX\n"
+ "#define INT_FAST16_MIN INT16_MIN";
+};
+
+
+/*
* Solaris 2.8 has what appears to be some gross workaround for
* some old version of their c++ compiler. G++ doesn't want it
* either, but doesn't want to be tied to SunPRO version numbers.