]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Portability problem on Solaris 8 and 9.
authorBruno Haible <bruno@clisp.org>
Thu, 13 Mar 2003 11:49:01 +0000 (11:49 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:15 +0000 (12:10 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msggrep.c

index bf4ed38f959b9c6f6e36b241529280133448c790..f76f461f2084881e97c929374bc40723d429f8dd 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-13  Bruno Haible  <bruno@clisp.org>
+
+       * msggrep.c (main): On Solaris, prefer /usr/xpg4/bin/grep to
+       /usr/bin/grep. Needed for Solaris 2.8 and 2.9.
+       Reported by Sven Utcke <utcke@informatik.uni-hamburg.de>.
+
 2003-03-03  Bruno Haible  <bruno@clisp.org>
 
        * msgen.c (usage): Don't say that the entries are marked fuzzy.
index 1c5975b546d276a1f0ae29ab7207d94116199adf..81e1465778f77891d512cea54f9229ad3e6d68d9 100644 (file)
@@ -329,6 +329,15 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
         This is an optimization, to avoid that spawn/exec searches the PATH
         on every call.  */
       grep_path = find_in_path ("grep");
+
+      /* On Solaris >= 2.8, we need to use /usr/xpg4/bin/grep instead of
+        /usr/bin/grep, because /usr/bin/grep doesn't understand the options
+        -q and -e.  */
+#if (defined (sun) || defined (__sun)) && defined (__SVR4)
+      if (strcmp (grep_path, "/usr/bin/grep") == 0
+         && access ("/usr/xpg4/bin/grep", X_OK) == 0)
+       grep_path = "/usr/xpg4/bin/grep";
+#endif
     }
 
   /* Build argument lists for the 'grep' program.  */