+#define PLATFORM_BSD
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "FreeBSD"
+#endif
+
+#if defined(__NetBSD__)
+#define PLATFORM_NETBSD
+#define PLATFORM_BSD
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "NetBSD"
+#endif
+
+#if defined(__bsdi__)
+#define PLATFORM_BSDI
+#define PLATFORM_BSD
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "BSDI"
+#endif
+
+#if defined(sparc) && defined(sun)
+#define PLATFORM_SUNOS
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "Solaris"
+#endif
+
+#if defined(__APPLE__) && defined(__MACH__)
+#define PLATFORM_MACOSX
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "Mac OS X"
+#endif
+
+#if defined(NeXT)
+#define PLATFORM_NEXT
+#undef PLATFORM_STRING
+#define PLATFORM_STRING "NeXT"