614 static void print_date_and_time(outputStream* st, char* buf, size_t buflen); |
614 static void print_date_and_time(outputStream* st, char* buf, size_t buflen); |
615 |
615 |
616 static void print_location(outputStream* st, intptr_t x, bool verbose = false); |
616 static void print_location(outputStream* st, intptr_t x, bool verbose = false); |
617 static size_t lasterror(char *buf, size_t len); |
617 static size_t lasterror(char *buf, size_t len); |
618 static int get_last_error(); |
618 static int get_last_error(); |
|
619 |
|
620 // Replacement for strerror(). |
|
621 // Will return the english description of the error (e.g. "File not found", as |
|
622 // suggested in the POSIX standard. |
|
623 // Will return "Unknown error" for an unknown errno value. |
|
624 // Will not attempt to localize the returned string. |
|
625 // Will always return a valid string which is a static constant. |
|
626 // Will not change the value of errno. |
|
627 static const char* strerror(int e); |
|
628 |
|
629 // Will return the literalized version of the given errno (e.g. "EINVAL" |
|
630 // for EINVAL). |
|
631 // Will return "Unknown error" for an unknown errno value. |
|
632 // Will always return a valid string which is a static constant. |
|
633 // Will not change the value of errno. |
|
634 static const char* errno_name(int e); |
619 |
635 |
620 // Determines whether the calling process is being debugged by a user-mode debugger. |
636 // Determines whether the calling process is being debugged by a user-mode debugger. |
621 static bool is_debugger_attached(); |
637 static bool is_debugger_attached(); |
622 |
638 |
623 // wait for a key press if PauseAtExit is set |
639 // wait for a key press if PauseAtExit is set |