X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fstdlib.h;h=43225dd4d66d47e6d2dcba692cc621383d3a79fd;hp=27784c61d0844c1c645854077352127b3c4acc9b;hb=d4045a1683d402dd4e53b3ae388d8794d7238c7e;hpb=a5323c57686340d3a8a6b0d6b3e6faab2a22ce8d diff --git a/include/stdlib.h b/include/stdlib.h index 27784c61..43225dd4 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -81,7 +81,14 @@ size_t wcstombs (char *, const wchar_t *, size_t); || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) #ifndef WEXITSTATUS -#include +#define WEXITSTATUS(s) (((s) & 0xff00) >> 8) +#define WTERMSIG(s) ((s) & 0x7f) +#define WSTOPSIG(s) WEXITSTATUS(s) +#define WCOREDUMP(s) ((s) & 0x80) +#define WIFEXITED(s) (!WTERMSIG(s)) +#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f) +#define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0) +#define WIFCONTINUED(s) ((s) == 0xffff) #endif int posix_memalign (void **, size_t, size_t); @@ -121,10 +128,12 @@ void lcong48 (unsigned short [7]); #endif #if defined(_GNU_SOURCE) +void *alloca(size_t); char *mktemp (char *); void *valloc (size_t); void *memalign(size_t, size_t); int clearenv(void); +int ptsname_r(int, char *, size_t); #endif