-int stricmp (const char *s1, const char *s2)
-{
- if (s1 == NULL) return s2 == NULL ? 0 : -(*s2);
- if (s2 == NULL) return *s1;
- char c1, c2;
- while ((c1 = tolower (*s1)) == (c2 = tolower (*s2)))
- {
- if (*s1 == '\0') break;
- ++s1; ++s2;
- }
- return c1 - c2;
-}
+#define STRINGIFY_(x) #x
+#define STRINGIFY(x) STRINGIFY_(x)
+
+#if defined(__GNUC__)
+#if defined(__GNUC_PATCHLEVEL__)
+#define COMPILER "GCC" " " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__) "." STRINGIFY(__GNUC_PATCHLEVEL__)
+#else
+#define COMPILER "GCC" " " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__)
+#endif
+#elif defined (__IMAGECRAFT__)
+#define COMPILER "ICCAVR"
+#else
+#define COMPILER "Unknown"
+#endif