--- dietlibc/t.c 2014/04/04 11:25:37 1.218 +++ dietlibc/t.c 2014/10/10 14:54:29 1.219 @@ -47,6 +47,7 @@ #include #include #include +#include #ifdef __dietlibc__ #include #include @@ -108,12 +109,27 @@ extern char* strcpy2(char*a,char*b); #define malloc(x) ({typeof(x) y=x; (y<0 || (size_t)(y)!=y ? 0 : malloc(y));}) int main(int argc,char *argv[]) { + int n; + struct ucontext uc; + n=0; + getcontext(&uc); + puts("getcontext returned"); + if (n==0) { + ++n; + setcontext(&uc); + puts("should not get here"); + exit(1); + } + puts("all ok"); + return 0; #if 0 char* a=malloc(-3); char* b=malloc(0xffffffffull+1); printf("%p %p\n",a,b); #endif +#if 0 printf("%u\n",getpagesize()); +#endif #if 0 struct stat s; time_t t=time(0);