Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44995

lookup table of errno macro names for logging

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      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:
            backlog-server-devtools DO NOT USE - Backlog - Dev Tools
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: