URL:
  <http://savannah.gnu.org/support/?108092>

                 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

    _______________________________________________________

Details:

Hi,

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.
(see
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3476141&group_id=12694
)

(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
http://www.gnu.org/software/autoconf/manual/autoconf.html#grep
, 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 ?

Yann





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?108092>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/


Reply via email to