*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed January 6, 2026 at 04:43:53 PM by AutoGen 5.18.12
+ * It has been AutoGen-ed February 15, 2026 at 11:11:08 PM by AutoGen 5.18.12
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT MERGE THIS FILE, EITHER Tue Jan 6 16:43:53 CET 2026
+/* DO NOT MERGE THIS FILE, EITHER Sun Feb 15 23:11:08 CET 2026
*
* You must regenerate it. Use the ./genfixes script.
*
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 250 fixup descriptions.
+ * This file contains 251 fixup descriptions.
*
* See README for more information.
*
"#define\tSIZE_MAX\t4294967295U",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Solaris_Int8_T fix
+ */
+tSCC zSolaris_Int8_TName[] =
+ "solaris_int8_t";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Int8_TList[] =
+ "sys/int_types.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Int8_TMachs[] = {
+ "*-*-solaris2*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Int8_TSelect0[] =
+ "^[ \t]*typedef[ \t]*char[ \t]*int(|_fast|_least)8_t.*";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zSolaris_Int8_TBypass0[] =
+ "_LEGACY_INT8_T";
+
+#define SOLARIS_INT8_T_TEST_CT 2
+static tTestDesc aSolaris_Int8_TTests[] = {
+ { TT_NEGREP, zSolaris_Int8_TBypass0, (regex_t*)NULL },
+ { TT_EGREP, zSolaris_Int8_TSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Int8_T
+ */
+static const char* apzSolaris_Int8_TPatch[] = {
+ "format",
+ "#if !defined(_LEGACY_INT8_T)\n\
+typedef signed char int%18_t;\n\
+#else\n\
+%0\n\
+#endif",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Math_12 fix
*
* List of all fixes
*/
-#define REGEX_COUNT 289
+#define REGEX_COUNT 291
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 250
+#define FIX_COUNT 251
/*
* Enumerate the fixes
SOLARIS_INT_CONST_FIXIDX,
SOLARIS_INT_LIMITS_1_FIXIDX,
SOLARIS_INT_LIMITS_3_FIXIDX,
+ SOLARIS_INT8_T_FIXIDX,
SOLARIS_MATH_12_FIXIDX,
SOLARIS_POW_INT_OVERLOAD_FIXIDX,
STATSSWTCH_FIXIDX,
SOLARIS_INT_LIMITS_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Int_Limits_3Tests, apzSolaris_Int_Limits_3Patch, 0 },
+ { zSolaris_Int8_TName, zSolaris_Int8_TList,
+ apzSolaris_Int8_TMachs,
+ SOLARIS_INT8_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Int8_TTests, apzSolaris_Int8_TPatch, 0 },
+
{ zSolaris_Math_12Name, zSolaris_Math_12List,
apzSolaris_Math_12Machs,
SOLARIS_MATH_12_TEST_CT, FD_MACH_ONLY,
"#define SIZE_MAX 4294967295UL";
};
+/*
+ * Solaris <sys/int_types.h> defines int8_t as char which violates C99.
+ * Same for int_fast8_t and int_least8_t.
+ */
+fix = {
+ hackname = solaris_int8_t;
+ files = sys/int_types.h;
+ mach = '*-*-solaris2*';
+ bypass = '_LEGACY_INT8_T';
+ c_fix = format;
+ c_fix_arg = "#if !defined(_LEGACY_INT8_T)\n"
+ "typedef signed char int%18_t;\n"
+ "#else\n"
+ "%0\n"
+ "#endif";
+ select = "^[ \t]*typedef[ \t]*char[ \t]*int(|_fast|_least)8_t.*";
+ test_text =
+ "typedef char int8_t;\n"
+ "typedef char int_fast8_t;\n"
+ "typedef char int_least8_t;";
+};
+
/*
* Some versions of Solaris 10+ <math.h> #undef libstdc++-internal macros.
*/
--- /dev/null
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/sys/int_types.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SOLARIS_INT8_T_CHECK )
+#if !defined(_LEGACY_INT8_T)
+typedef signed char int8_t;
+#else
+typedef char int8_t;
+#endif
+#if !defined(_LEGACY_INT8_T)
+typedef signed char int_fast8_t;
+#else
+typedef char int_fast8_t;
+#endif
+#if !defined(_LEGACY_INT8_T)
+typedef signed char int_least8_t;
+#else
+typedef char int_least8_t;
+#endif
+#endif /* SOLARIS_INT8_T_CHECK */
#define SIG_ATOMIC_TYPE "int"
-/* ??? This definition of int8_t follows the system header but does
- not conform to C99. Likewise int_fast8_t, int_least8_t. */
-#define INT8_TYPE "char"
+/* <sys/int_types.h> uses char (which is signed) to define int8_t, which does
+ not conform to C99, 7.18.1.1 Exact-width integer types. Likewise
+ int_fast8_t, int_least8_t. Until this is fixed, it's handled by
+ fixincludes. */
+#define INT8_TYPE "signed char"
#define INT16_TYPE "short int"
#define INT32_TYPE "int"
#define INT64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
#define UINT32_TYPE "unsigned int"
#define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-#define INT_LEAST8_TYPE "char"
+#define INT_LEAST8_TYPE "signed char"
#define INT_LEAST16_TYPE "short int"
#define INT_LEAST32_TYPE "int"
#define INT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
#define UINT_LEAST32_TYPE "unsigned int"
#define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-#define INT_FAST8_TYPE "char"
+#define INT_FAST8_TYPE "signed char"
#define INT_FAST16_TYPE "int"
#define INT_FAST32_TYPE "int"
#define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")