prjxray/lib
Christian Fibich 2e20e2e32f Workaround for g++ and glibc that define `minor` in `<sys/types.h>`.
Building prjxray using g++ 7.3.0 and glibc 2.27-3 produces the following warning that is treated as an error:

    In file included from [...]/prjxray/lib/include/prjxray/xilinx/xc7series/configuration_column.h:8:0,
                     from [...]/prjxray/lib/include/prjxray/xilinx/xc7series/configuration_bus.h:10,
                     from [...]/prjxray/lib/xilinx/xc7series/configuration_bus.cc:1:
    [...]/prjxray/lib/include/prjxray/xilinx/xc7series/frame_address.h:32:13: error: In the GNU C Library, "minor" is defined
     by <sys/sysmacros.h>. For historical compatibility, it is
     currently defined by <sys/types.h> as well, but we plan to
     remove this soon. To use "minor", include <sys/sysmacros.h>
     directly. If you did not intend to use a system-defined macro
     "minor", you should undefine it after including <sys/types.h>. [-Werror]
      uint8_t minor() const;
                 ^~~~~~~~~~~

This is related to these two bugs:

https://sourceware.org/bugzilla/show_bug.cgi?format=multiple&id=19239

https://bugzilla.redhat.com/show_bug.cgi?id=130601

This patch is a workaround that undefines `minor` if `_GNU_SOURCE` is defined.

Signed-off-by: Christian Fibich <fibich@technikum-wien.at>
2018-06-22 11:18:13 +02:00
..
include/prjxray Workaround for g++ and glibc that define `minor` in `<sys/types.h>`. 2018-06-22 11:18:13 +02:00
test_data lib: xc7series: verify bitstream variants parse to same configurations 2018-01-04 15:11:00 -08:00
xilinx/xc7series xc7series: Dynamically allocate config packets when writing bitstreams 2018-02-01 14:34:31 -08:00
CMakeLists.txt Code cleanup and additional comments 2018-01-31 18:48:01 -08:00
big_endian_span_test.cc lib: adapter to read big-endian words from a span<> containing bytes 2017-12-20 22:46:39 +01:00
bit_ops_test.cc Apply clang-format to all C++ files 2018-01-08 17:14:27 -08:00
database.cc Apply clang-format to all C++ files 2018-01-08 17:14:27 -08:00
memory_mapped_file.cc Apply clang-format to all C++ files 2018-01-08 17:14:27 -08:00
memory_mapped_file_test.cc lib: Return a valid MemoryMappedFile for zero-length files 2017-12-20 22:46:39 +01:00
segbits_file_reader.cc Apply clang-format to all C++ files 2018-01-08 17:14:27 -08:00
segbits_file_reader_test.cc Apply clang-format to all C++ files 2018-01-08 17:14:27 -08:00