[exim-cvs] Portability fix for Solaris without xpg4 utilitie…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] Portability fix for Solaris without xpg4 utilities
Gitweb: http://git.exim.org/exim.git/commitdiff/7245734e71c1a30f1c25a2af279242de7d00c3b2
Commit:     7245734e71c1a30f1c25a2af279242de7d00c3b2
Parent:     af548e04066be00accef8adda14086b893f41128
Author:     Tony Finch <dot@???>
AuthorDate: Thu Nov 7 16:26:33 2013 +0000
Committer:  Tony Finch <dot@???>
CommitDate: Thu Nov 7 16:26:33 2013 +0000


    Portability fix for Solaris without xpg4 utilities
---
 doc/doc-txt/ChangeLog        |    3 +++
 src/scripts/lookups-Makefile |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 85c5625..6b8405d 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -14,6 +14,9 @@ TF/01 Correctly close the server side of TLS when forking for delivery.
       connection previously had. Exim would try to use TLS and fail, logging
       a "Bad file descriptor" error.


+TF/02 Portability fix for building lookup modules on Solaris when the xpg4
+      utilities have not been installed.
+


 Exim version 4.82
 -----------------
diff --git a/src/scripts/lookups-Makefile b/src/scripts/lookups-Makefile
index 51fbd94..d2caf70 100755
--- a/src/scripts/lookups-Makefile
+++ b/src/scripts/lookups-Makefile
@@ -95,7 +95,10 @@ emit_module_rule() {
   local mod_name pkgconf
   if [ "${lookup_name%:*}" = "$lookup_name" ]
   then
-    mod_name=$(echo $lookup_name | tr A-Z a-z)
+    # Square brackets are redundant but benign for POSIX compliant tr,
+    # however Solaris /usr/bin/tr requires them. Sometimes Solaris
+    # gets installed without a complete set of xpg4 tools, sigh.
+    mod_name=$(echo $lookup_name | tr [A-Z] [a-z])
   else
     mod_name="${lookup_name#*:}"
     lookup_name="${lookup_name%:*}"