https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120147

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't see how that commit can cause this.

The native_handle_type is determined by:

#ifdef _GLIBCXX_USE_STDIO_PURE
      using native_handle_type = __c_file*; // FILE*
#elif _GLIBCXX_USE__GET_OSFHANDLE
      using native_handle_type = void*;     // HANDLE
#else
      using native_handle_type = int;       // POSIX file descriptor
#endif


And the _GLIBCXX_USE__GET_OSFHANDLE macro should be defined on Windows, as
decided by this autoconf test:

  AC_TRY_COMPILE([
  #if defined(_WIN32) && !defined(__CYGWIN__)
  # include <stdint.h>
  # include <stdio.h>
  # include <io.h>
  #endif
  ],[
    FILE* file = 0;
    int fd = fileno(file);
    intptr_t crt_handle = _get_osfhandle(fd);
    void* win32_handle = reinterpret_cast<void*>(crt_handle);
  ], [ac_get_osfhandle=yes], [ac_get_osfhandle=no])
  if test "$ac_get_osfhandle" = yes; then
    AC_DEFINE_UNQUOTED(_GLIBCXX_USE__GET_OSFHANDLE, 1,
      [Define if _get_osfhandle should be used for filebuf::native_handle().])
  fi


This has nothing to do with atomic builtins.

Reply via email to