[libc-commits] [libc] [libc]: Clean up unnecessary function pointers in scanf (PR #121215)

Vinay Deshmukh via libc-commits libc-commits at lists.llvm.org
Sat Jan 18 15:47:12 PST 2025


================
@@ -62,6 +62,7 @@ add_object_library(
     reader.h
   DEPENDS
     libc.src.__support.macros.attributes
+    libc.hdr.types.FILE
----------------
vinay-deshmukh wrote:

>  like what vfscanf_internal has.

So, I think there's a bug / typo in the CMake call there.

Instead of:

```
  add_header_library(
    vfscanf_internal
    HDRS
      vfscanf_internal.h
    DEPENDS
      .reader
      .scanf_main
      libc.include.stdio
      libc.src.__support.File.file
      libc.src.__support.arg_list
    ${use_system_file}
  )
```

it should be:

```
  add_header_library(
    vfscanf_internal
    HDRS
      vfscanf_internal.h
    DEPENDS
      .reader
      .scanf_main
      libc.include.stdio
      libc.src.__support.File.file
      libc.src.__support.arg_list
    COMPILE_OPTIONS
      ${use_system_file}
  )
```

I think is what caused my build to have the bugs with macOS' system stdio.h macros

https://github.com/llvm/llvm-project/pull/121215


More information about the libc-commits mailing list