From 62519bfe059251af2914199f284c736553ff0489 Mon Sep 17 00:00:00 2001
From: Yang Tse <yangsita@gmail.com>
Date: Fri, 5 Sep 2008 01:27:24 +0000
Subject: [PATCH] somewhat protect Mac OS X users from using Mac OS 9 config
 file

---
 lib/config-mac.h | 11 +++++++++++
 lib/setup.h      |  4 ++--
 src/config-mac.h | 11 +++++++++++
 src/setup.h      |  4 ++--
 4 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/lib/config-mac.h b/lib/config-mac.h
index e6d2130a55..0cb6840649 100644
--- a/lib/config-mac.h
+++ b/lib/config-mac.h
@@ -1,3 +1,12 @@
+#ifndef __LIB_CONFIG_MAC_H
+#define __LIB_CONFIG_MAC_H
+
+/* ================================================================ */
+/*    lib/config-mac.h - Hand crafted config file for Mac OS 9      */
+/* ================================================================ */
+/*   On Mac OS X you must run configure to generate config.h file   */
+/* ================================================================ */
+
 #define OS "mac"
 
 #define HAVE_NETINET_IN_H       1
@@ -83,3 +92,5 @@
 
 #define HAVE_EXTRA_STRICMP_H 1
 #define HAVE_EXTRA_STRDUP_H  1
+
+#endif /* __LIB_CONFIG_MAC_H */
diff --git a/lib/setup.h b/lib/setup.h
index 864896118c..59da0e0d34 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -48,8 +48,8 @@
 #endif
 #endif
 
-#ifdef macintosh
-#include "config-mac.h"
+#if defined(macintosh) && defined(__MRC__)
+#  include "config-mac.h"
 #endif
 
 #ifdef __AMIGA__
diff --git a/src/config-mac.h b/src/config-mac.h
index 2697afe0e2..a3a57c2623 100644
--- a/src/config-mac.h
+++ b/src/config-mac.h
@@ -1,3 +1,12 @@
+#ifndef __SRC_CONFIG_MAC_H
+#define __SRC_CONFIG_MAC_H
+
+/* ================================================================ */
+/*    src/config-mac.h - Hand crafted config file for Mac OS 9      */
+/* ================================================================ */
+/*   On Mac OS X you must run configure to generate config.h file   */
+/* ================================================================ */
+
 /* Define to 1 if you want the built-in manual */
 #define USE_MANUAL 1
 
@@ -19,3 +28,5 @@
 
 /* we provide our own strdup prototype */
 char *strdup(char *s1);
+
+#endif /* __SRC_CONFIG_MAC_H */
diff --git a/src/setup.h b/src/setup.h
index 4f0835e3c8..b56407c644 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -46,8 +46,8 @@
 #include "config-win32.h"
 #endif
 
-#ifdef macintosh
-#include "config-mac.h"
+#if defined(macintosh) && defined(__MRC__)
+#  include "config-mac.h"
 #endif
 
 #ifdef __riscos__
-- 
GitLab