[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #108092] AC_PROG_GREP can select /usr/xpg4/bin/grep under Solaris 9

From: Yann Rouillard
Subject: [sr #108092] AC_PROG_GREP can select /usr/xpg4/bin/grep under Solaris 9 but it doesn't support long lines
Date: Sun, 22 Jul 2012 00:14:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11


                 Summary: AC_PROG_GREP can select /usr/xpg4/bin/grep under
Solaris 9 but it doesn't support long lines
                 Project: Autoconf
            Submitted by: yann
            Submitted on: dim. 22 juil. 2012 00:14:05 GMT
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None




According to the autoconf manual page, AC_PROG_GREP should select an grep
binary that accepts the longest input lines possible, but it is not explained
what "longest lines" means.

During the compilation of netsnmp under Solaris 9, I fought with a difficult
bug caused by the fact that AC_PROG_GREP selected /usr/xpg4/bin/grep but this
one doesn't work realiably when the length of lines exceed 2048 bytes.

(According to the man page:
"The results are unspecified if input files contain lines
longer than LINE_MAX bytes or contain binary data. LINE_MAX
is defined in /usr/include/limits.h.")

After having a look at the manual
, I understand that we can't rely on $GREP to process long lines as it was
already mentioned that AIX truncates lines.

So I wonder if "longest lines" is misleading here because:
 - there seems to be no test about the length of lines supported, 
 - anyway, if we want to be portable, we should only count on $GREP supporting
the minimum length supported among all architectures.

Maybe some numbers about the length of lines supported could be added in the
manual ?



Reply to this item at:


  Message posté via/par Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]