[all-commits] [llvm/llvm-project] 9beb8d: [libc] move errno out of file internals

michaelrj-google via All-commits all-commits at lists.llvm.org
Mon Dec 12 13:11:58 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9beb8d1109c00575c9a30df5f931804cd81ad891
      https://github.com/llvm/llvm-project/commit/9beb8d1109c00575c9a30df5f931804cd81ad891
  Author: Michael Jones <michaelrj at google.com>
  Date:   2022-12-12 (Mon, 12 Dec 2022)

  Changed paths:
    M libc/src/__support/CMakeLists.txt
    M libc/src/__support/CPP/CMakeLists.txt
    R libc/src/__support/CPP/error.h
    A libc/src/__support/CPP/expected.h
    M libc/src/__support/File/CMakeLists.txt
    M libc/src/__support/File/file.cpp
    M libc/src/__support/File/file.h
    M libc/src/__support/File/linux_file.cpp
    A libc/src/__support/error_or.h
    M libc/src/__support/threads/linux/CMakeLists.txt
    M libc/src/__support/threads/linux/thread.cpp
    M libc/src/pthread/pthread_setname_np.cpp
    M libc/src/stdio/CMakeLists.txt
    M libc/src/stdio/fclose.cpp
    M libc/src/stdio/fflush.cpp
    M libc/src/stdio/fgetc.cpp
    M libc/src/stdio/fgetc_unlocked.cpp
    M libc/src/stdio/fgets.cpp
    M libc/src/stdio/fopen.cpp
    M libc/src/stdio/fopencookie.cpp
    M libc/src/stdio/fputc.cpp
    M libc/src/stdio/fputs.cpp
    M libc/src/stdio/fread.cpp
    M libc/src/stdio/fread_unlocked.cpp
    M libc/src/stdio/fseek.cpp
    M libc/src/stdio/ftell.cpp
    M libc/src/stdio/fwrite.cpp
    M libc/src/stdio/fwrite_unlocked.cpp
    M libc/src/stdio/getc.cpp
    M libc/src/stdio/getc_unlocked.cpp
    M libc/src/stdio/printf_core/file_writer.cpp
    M libc/src/stdio/putc.cpp
    M libc/src/stdio/putchar.cpp
    M libc/src/stdio/puts.cpp
    M libc/src/stdio/scanf_core/file_reader.cpp
    M libc/test/src/__support/File/file_test.cpp
    M libc/test/src/__support/File/platform_file_test.cpp
    M libc/test/src/stdio/fileop_test.cpp
    M libc/test/src/stdio/ftell_test.cpp

  Log Message:
  -----------
  [libc] move errno out of file internals

Now errno is only set by the terminal entrypoints, and not the internal
implementations. This patch is part of the larger effort to not set
errno in libc internal code: https://github.com/llvm/llvm-project/issues/59278

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D139576




More information about the All-commits mailing list