bug-groff
[Top][All Lists]
Advanced

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

[bug #59276] [PATCH] #include "config.h" before <stdio.h>


From: Ingo Schwarze
Subject: [bug #59276] [PATCH] #include "config.h" before <stdio.h>
Date: Thu, 15 Oct 2020 09:27:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:81.0) Gecko/20100101 Firefox/81.0

URL:
  <https://savannah.gnu.org/bugs/?59276>

                 Summary: [PATCH] #include "config.h" before <stdio.h>
                 Project: GNU troff
            Submitted by: schwarze
            Submitted on: Thu 15 Oct 2020 01:27:04 PM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Build/Installation
                  Status: None
                 Privacy: Public
             Assigned to: schwarze
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Since the gnulib commit 182afcba2635cbff91240656c7fb3742dd23ab6f
  Author: Bruno Haible <bruno@clisp.org>
  Date: Sat Feb 22 20:57:30 2020 +0100
gnulib/lib/stdio.in.h uses the "restrict" keyword.

For example with GCC 4.2.1, this may cause the build to fail with a message
like this:

  In file included from ../src/libs/libgroff/assert.cpp:19:
  ./lib/stdio.h:851: error: expected ',' or '...' before 'fp'
  ./lib/stdio.h:851: error: format string argument not a string type
  ./lib/stdio.h:851: error: nonnull argument with out-of-range operand number
(argument 1, operand 2)
  ./lib/stdio.h: In function 'void assertion_failed(int, const char*, const
char*, const char*)':
  ./lib/stdio.h:851: error: too many arguments to function 'int
rpl_fprintf(FILE*)'
  ../src/libs/libgroff/assert.cpp:29: error: at this point in file
  ./lib/stdio.h:851: error: too many arguments to function 'int
rpl_fprintf(FILE*)'
  ../src/libs/libgroff/assert.cpp:31: error: at this point in file
  *** Error 1 in . (Makefile:6874 'src/libs/libgroff/libgroff_aassert.o':
@echo "  CXX     " src/libs/libgroff /libgroff_a-assert.o;g++ -DHAVE...)
  *** Error 2 in /co/groff/build (Makefile:5317 'all')

The attached patch fixes the build failure by making sure "restict" is
appropriately #defined (if needed) before the gnulib version of <stdio.h> is
included.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 15 Oct 2020 01:27:04 PM UTC  Name: stdio-config.patch  Size: 3KiB  
By: schwarze

<http://savannah.gnu.org/bugs/download.php?file_id=49983>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59276>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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