91172b8
From 1dceab6c75ce7bad309da9114d9e7f518291a955 Mon Sep 17 00:00:00 2001
91172b8
From: Shawn Routhier <sar@isc.org>
91172b8
Date: Wed, 10 Sep 2014 20:26:40 -0700
91172b8
Subject: [PATCH] [master] Remove unneeded defines for errors
91172b8
91172b8
As part of 4.2.0 we renamed a number of errors but continued
91172b8
to include the old ones in case somebody was building something
91172b8
using our libraries.  This #ifdefs them and by defaults removes them
91172b8
from the compile.
91172b8
---
91172b8
diff --git a/includes/omapip/result.h b/includes/omapip/result.h
91172b8
index 3e4cf6a..ae5f7d6 100644
91172b8
--- a/includes/omapip/result.h
91172b8
+++ b/includes/omapip/result.h
91172b8
@@ -80,13 +80,13 @@
91172b8
 
91172b8
 // Included for historical reasons, these should be removed as
91172b8
 // soon as reasonable
91172b8
+#ifdef INCLUDE_OLD_DHCP_ISC_ERROR_CODES
91172b8
 #define ISC_R_HOSTUNKNOWN	DHCP_R_HOSTUNKNOWN
91172b8
 #define ISC_R_VERSIONMISMATCH	DHCP_R_VERSIONMISMATCH
91172b8
 #define ISC_R_PROTOCOLERROR	DHCP_R_PROTOCOLERROR	
91172b8
 #define ISC_R_INVALIDARG	DHCP_R_INVALIDARG	
91172b8
 #define ISC_R_NOTYET		DHCP_R_NOTYET		
91172b8
 #define ISC_R_UNCHANGED		DHCP_R_UNCHANGED		
91172b8
-#define ISC_R_MULTIPLE		DHCP_R_MULTIPLE
91172b8
 #define ISC_R_KEYCONFLICT	DHCP_R_KEYCONFLICT	
91172b8
 #define ISC_R_BADPARSE		DHCP_R_BADPARSE		
91172b8
 #define ISC_R_NOKEYS		DHCP_R_NOKEYS		
91172b8
@@ -113,6 +113,7 @@
91172b8
 #define ISC_R_NOT_EQUAL		DHCP_R_NOT_EQUAL		
91172b8
 #define ISC_R_CONNRESET		DHCP_R_CONNRESET		
91172b8
 #define ISC_R_UNKNOWNATTRIBUTE	DHCP_R_UNKNOWNATTRIBUTE	
91172b8
+#endif
91172b8
 
91172b8
 isc_result_t
91172b8
 dhcp_result_register(void);
91172b8
diff --git a/includes/site.h b/includes/site.h
91172b8
index d87b309..19a2e11 100644
91172b8
--- a/includes/site.h
91172b8
+++ b/includes/site.h
91172b8
@@ -304,6 +304,14 @@
91172b8
    removal of this define.  Use at your own risk.  */
91172b8
 /* #define ENABLE_GENTLE_SHUTDOWN */
91172b8
 
91172b8
+/* Include old error codes.  This is provided in case you
91172b8
+   are building an external program similar to omshell for
91172b8
+   which you need the ISC_R_* error codes.  You should switch
91172b8
+   to DHCP_R_* error codes for those that have been defined
91172b8
+   (see includes/omapip/result.h).  The extra defines and
91172b8
+   this option will be removed at some time. */
91172b8
+/* #define INCLUDE_OLD_DHCP_ISC_ERROR_CODES */
91172b8
+
91172b8
 /* Include definitions for various options.  In general these
91172b8
    should be left as is, but if you have already defined one
91172b8
    of these and prefer your definition you can comment the 
91172b8
-- 
91172b8
2.1.0
91172b8