[libc-commits] [PATCH] D71094: [libc] Add implementation of errno and define the other macros of errno.h.

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Dec 8 23:29:18 PST 2019


abrachet added inline comments.


================
Comment at: libc/config/linux/api.td:36
+    int *__errno_location();
+    #define errno (*__errno_location());
+  }];
----------------
Remove the `;`


================
Comment at: libc/config/linux/api.td:99
+    ErrnoMacro,
+    // We largely depend on the linux/errno.h to give us the
+    // definitions of various error macro definitions. However,
----------------
'depend on the linux/errno.h' -> 'depend on linux/errno.h'


================
Comment at: libc/include/errno.h.def:14
+
+%%public_api()
+
----------------
glibc has an ifdef block around the C definitions to exclude them if `ASSEMBLER` is defined so that only the E* macros are exposed to assembly files which want them. I would imagine no one is including C's `errno.h` instead of `linux/errno.h`in assembly source, but I figured I would bring it up. https://code.woboq.org/userspace/glibc/stdlib/errno.h.html#32



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71094/new/

https://reviews.llvm.org/D71094





More information about the libc-commits mailing list