]> granicus.if.org Git - nethack/commitdiff
MacOS 9 vs MacOS 10 bit
authorkeni <keni>
Mon, 18 Jan 2010 02:02:45 +0000 (02:02 +0000)
committerkeni <keni>
Mon, 18 Jan 2010 02:02:45 +0000 (02:02 +0000)
MAC is defined for MacOS 9 but not for 10 (and it shouldn't be).  Add a MACOSX
define and use it in eat.c to pick up the joke meant for all Mac systems.

include/config1.h
src/eat.c

index a74b09bf887b57c7bba8ec3185e641e3f9dd752f..55da5ced3044eab42dc3c569fb3cf36cd1312f69 100644 (file)
 /*
  * Mac Stuff.
  */
-#ifdef macintosh       /*      Auto-defined symbol for MPW compilers (sc and mrc) */
+#if defined(__APPLE__) && defined(__MACH__)
+# define MACOSX
+#endif
+
+#ifdef macintosh       /* Auto-defined symbol for MPW compilers (sc and mrc) */
 # define MAC
 #endif
 
index 976e539251ff39a8fe5d4ea94203ade2a46e2ee6..3b07630f86ba4cf51d534c8172dc9ed2be3d8ccf 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1768,7 +1768,7 @@ struct obj *otmp;
                    }
                } else
 #endif
-#ifdef MAC     /* KMH -- Why should Unix have all the fun? */
+#if defined(MAC) || defined(MACOSX)    /* KMH -- Why should Unix have all the fun? */
                if (otmp->otyp == APPLE) {
                        pline("Delicious!  Must be a Macintosh!");
                } else