 +        AT(M1_METALLIVORE, "FlMetallivore");
 +#undef AT
 +#define AT(a, b) if (pm->mflags2 & a) fprintf(f, ", %s", b);
++#ifdef M2_NOPOLY
 +        AT(M2_NOPOLY, "FlNoPoly");
++#endif
 +        AT(M2_UNDEAD, "FlUndead");
 +        AT(M2_WERE, "FlWere");
 +        AT(M2_HUMAN, "FlHuman");

+
+/*** EXTRACTOR STUFF ***/
+
+static void extract_monsterdata_to_haskell(FILE* f);
+static void extract_itemdata_to_haskell(FILE* f);
+
+static int extract_data(int argc, char* argv[])
+{
+    FILE* f;
+
+    if (argc <= 1)
+    {
+        printf("Usage:\n");
+        printf("%s [language]\n\n", argv[0]);
+        printf("Where language is one of: \n");
+        printf("  haskell [monster-data-file] [item-data-file]\n\n");
+        printf("Monster data file defaults to MonsterData.hs and \n");
+        printf("item data file defaults to ItemData.hs.\n\n");
+        return 0;
+    }
+
+    if (argc >= 2 && !strcmp(argv[1], "haskell"))
+    {
+        if (argc >= 3)
+            f = fopen(argv[2], "wb");
+        else
+            f = fopen("MonsterData.hs", "wb");
+        if (!f)
+        {
+            perror("fopen");
+            return -1;
+        }
+        extract_monsterdata_to_haskell(f);
+        fclose(f);
+
+        if (argc >= 4)
+            f = fopen(argv[3], "wb");
+        else
+            f = fopen("ItemData.hs", "wb");
+
+        if (!f)
+        {
+            perror("fopen");
+            return -1;
+        }
+
+        extract_itemdata_to_haskell(f);
+        fclose(f);
+    }
+    else
+    {

--- /home/shannon/gitjutut/nethack-3.4.3/sys/unix/unixmain.c	2003-12-08 01:39:13.000000000 +0200
+++ unixmain.c	2013-05-13 18:18:59.100622410 +0300
@@ -44,11 +44,15 @@
 static boolean wiz_error_flag = FALSE;
 #endif
