summaryrefslogtreecommitdiff
path: root/debian/patches/40_boolean_redefine_protect.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/40_boolean_redefine_protect.dpatch')
-rw-r--r--debian/patches/40_boolean_redefine_protect.dpatch46
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches/40_boolean_redefine_protect.dpatch b/debian/patches/40_boolean_redefine_protect.dpatch
new file mode 100644
index 0000000..3dd3c1d
--- /dev/null
+++ b/debian/patches/40_boolean_redefine_protect.dpatch
@@ -0,0 +1,46 @@
+#! /bin/sh -e
+## 40_boolean_redefine_protect.dpatch by Steve Haslam
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: boolean_redefine_protect
+## DP: [src/mytypes.h]
+## DP: Surround the definition of TRUE and FALSE macros with #ifndef
+## DP: /#endif, in case some other header defines them (from mixing
+## DP: Perl and Exim, istr)
+## DP: http://www.arise.demon.co.uk/exim-patches/
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -urNad 40.tmp/src/mytypes.h 40/src/mytypes.h
+--- 40.tmp/src/mytypes.h Sun Dec 29 14:31:27 2002
++++ 40/src/mytypes.h Sun Dec 29 14:40:41 2002
+@@ -14,9 +14,17 @@
+ #define MYTYPES_H
+
+
++#ifndef FALSE
+ #define FALSE 0
++#endif
++
++#ifndef TRUE
+ #define TRUE 1
++#endif
++
++#ifndef TRUE_UNSET
+ #define TRUE_UNSET 2
++#endif
+
+
+ /* If gcc is being used to compile Exim, we can use its facility for checking