helpAutoconf - Support: sr #110571, Autoconf-2.71 misconverts new-line...

 
 

sr #110571: Autoconf-2.71 misconverts new-line escapes in AC_CHECK_FUNCS() argument

Submitter:  Petr Pisar <petrp>
Submitted:  Fri 26 Nov 2021 02:09:14 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sat 27 Nov 2021 08:01:49 PM UTC, comment #3: 

For future reference, with Autoconf 2.70 or later it is not necessary to use backslash-newline in the argument to AC_CHECK_FUNCS. You can instead write

AC_CHECK_FUNCS([
  strcpy
  strdup
  strchr
  strlen
  strcat
  strtok
])

Zack Weinberg <zackw>
Project Administrator
Fri 26 Nov 2021 02:37:13 PM UTC, comment #2: 

You can close this report as invalid.

Petr Pisar <petrp>
Fri 26 Nov 2021 02:36:04 PM UTC, comment #1: 

It's not a bug in Autoconf. "git diff --check" revealed there were stray spaces after some backslashes since strchr line (marked with an underscore):

AC_CHECK_FUNCS( \
  strcpy \
  strdup \
  strchr \_
  strlen \_
  strcat \_
  strtok \_
)

That correlates with the backslashes in 2.71 output. So actually it's an improvement.

Petr Pisar <petrp>
Fri 26 Nov 2021 02:09:14 PM UTC, original submission:  

This piece of autoconf.ac:

AC_CHECK_FUNCS( \
  strcpy \
  strdup \
  strchr \
  strlen \
  strcat \
  strtok \
)

autoconf-2.69 converts to:

for ac_func in \
  strcpy \
  strdup \
  strchr \
  strlen \
  strcat \
  strtok \

do :

autoconf-2.71 into:

  for ac_func in strcpy strdup strchr \ strlen \ strcat \ strtok \
do :

As a result bash reports a syntax error on the for-loop because it does not recognizes "do" as a keyword.

See <https://bugzilla.redhat.com/show_bug.cgi?id=1999491> for more details.

Petr Pisar <petrp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by eggert (Updated the item)
  • -email is unavailable- added by petrp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-27 eggert StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9