Skip to content

compile issue on Cygwin #2710

@phlptp

Description

@phlptp

I am getting a compile error on cygwin 3.3.3

/fmtlib/src/os.cc:207:27: error: ‘::fileno’ has not been declared; did you mean ‘file’?
  207 |   int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_));
      |                           ^~~~~~
fmtlib/include/fmt/os.h:58:36: note: in definition of macro ‘FMT_POSIX_CALL’
   58 | #    define FMT_POSIX_CALL(call) ::call
      |                                    ^~~~
fmtlib/src/os.cc: In member function ‘fmt::v8::buffered_file fmt::v8::file::fdopen(const char*)’:
fmtlib/src/os.cc:335:28: error: ‘::fdopen’ has not been declared; did you mean ‘fopen’?
  335 |   FILE* f = FMT_POSIX_CALL(fdopen(fd_, mode));
      |                            ^~~~~~
fmtlib/include/fmt/os.h:58:36: note: in definition of macro ‘FMT_POSIX_CALL’
   58 | #    define FMT_POSIX_CALL(call) ::call
      |                                    ^~~~

fmt is compiled as part of a CMake subproject. It compiles fine in other contexts including same compiler on different platforms.
C++17 gcc 11.2

This is Cygwin 64 bit with the latest release of fmt. Not sure if I should be supplying additional arguments or something else is going on here or where to look to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions