lookup table of errno macro names for logging

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      strerror(EINTR) gives us "Interrupted system call", but sometimes we really want "EINTR".

      This is how the `errno` tool (from moreutils) generates the list of errno values.
      They use $(CC) to scrape <errno.h> to generate their own header table.
      The -dD flag is a debug switch to make gcc retain macro definitions in the -E source.
      errnos.h:

      echo "#include <errno.h>" > dump.c ;
      gcc -E -dD dump.c | awk '/^#define E/ { printf "{\"%s\",%s},\n", $2, $2 }'
      

       

        1. errnos-linux.h
          3 kB
        2. errnos-mac.h
          2 kB

            Assignee:
            DO NOT USE - Backlog - Dev Tools
            Reporter:
            Billy Donahue
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: