Bug 703880 - Newline issue in configure.ac when checking minimum memory pointer alignment
Summary: Newline issue in configure.ac when checking minimum memory pointer alignment
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-25 08:11 UTC by Nick Gaya
Modified: 2021-05-25 18:04 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
configure.ac.patch (325 bytes, patch)
2021-05-25 08:11 UTC, Nick Gaya
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Gaya 2021-05-25 08:11:06 UTC
Created attachment 21017 [details]
configure.ac.patch

I noticed an unexpected warning in config.log when building ghostscript:

    configure:13760: checking minimum memory pointer alignment
    ...
    conftest.c:89:20: warning: extra tokens at end of #include directive [-Wextra-tokens]
    #include <stdio.h> #include <stdlib.h>
                       ^

The cause is this definition in configure.ac

    ALIGN_TEXT_PROG_INCS="\
    #include <stdio.h> \
    #include <stdlib.h>"

The trailing backslash on the second line causes the newline to be incorrectly omitted, leading to problems in the configure check.

The fix is to remove the backslash, thereby defining a multiline string (see patchfile).
Comment 1 Chris Liddell (chrisl) 2021-05-25 12:16:47 UTC
Fixed in:
https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=054255c6ad21


Apologies, for not crediting you in the commit message - I didn't use your patch directly because I did away with the line continuations in the code snippet, too, and I plain forgot to give you a shout out in the commit.

Thanks for reporting and supplying the patch, I appreciate it.
Comment 2 Chris Liddell (chrisl) 2021-05-25 18:04:24 UTC
Revised link:

https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=6e039df2621

(I'd accidentally included a work in progress earlier).