Skip to content

Instantly share code, notes, and snippets.

@joycemaferko
Created August 18, 2021 13:11
Show Gist options
  • Save joycemaferko/0523e529dcf51089ed3ae5cae407a1ea to your computer and use it in GitHub Desktop.
Save joycemaferko/0523e529dcf51089ed3ae5cae407a1ea to your computer and use it in GitHub Desktop.
sys/signal.h
/* Prototype added to Newlib/libc/include/sys/signal.h */
/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */
#if __MISC_VISIBLE
/* POSIX Issue 8 adds sig2str() and str2sig() */
#if __STDINT_EXP(INT_MAX) > 0x7fff
#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1)
#else
#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("65535") - 1)
#endif
int sig2str(int, char *);
int str2sig(const char *__restrict, int *__restrict);
#endif /* __MISC_VISIBLE */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment