X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fapi%2Fsemaphore.c;h=292465a32b5734bd20c1f927836d1afd271af869;hb=54c15bc45a8721b8482552586a50b2548271a3b4;hp=700002a40cbd5934f96951d0dfda3543806107a4;hpb=056b010b1d5296266c0c61891d4ae896f9c9ba65;p=libc-test diff --git a/src/api/semaphore.c b/src/api/semaphore.c index 700002a..292465a 100644 --- a/src/api/semaphore.c +++ b/src/api/semaphore.c @@ -2,15 +2,18 @@ static void f() { {sem_t *x = SEM_FAILED;} -int(*p_sem_close)(sem_t*) = sem_close; -int(*p_sem_destroy)(sem_t*) = sem_destroy; -int(*p_sem_getvalue)(sem_t*restrict,int*restrict) = sem_getvalue; -int(*p_sem_init)(sem_t*,int,unsigned) = sem_init; -sem_t*(*p_sem_open)(const char*,int,...) = sem_open; -int(*p_sem_post)(sem_t*) = sem_post; -int(*p_sem_trywait)(sem_t*) = sem_trywait; -int(*p_sem_unlink)(const char*) = sem_unlink; -int(*p_sem_wait)(sem_t*) = sem_wait; +{int(*p)(sem_t*) = sem_close;} +{int(*p)(sem_t*) = sem_destroy;} +{int(*p)(sem_t*restrict,int*restrict) = sem_getvalue;} +{int(*p)(sem_t*,int,unsigned) = sem_init;} +{sem_t*(*p)(const char*,int,...) = sem_open;} +{int(*p)(sem_t*) = sem_post;} +{int(*p)(sem_t*) = sem_trywait;} +{int(*p)(const char*) = sem_unlink;} +{int(*p)(sem_t*) = sem_wait;} +} #include -int(*p_sem_timedwait)(sem_t*restrict,const struct timespec*restrict) = sem_timedwait; +static void g() +{ +{int(*p)(sem_t*restrict,const struct timespec*restrict) = sem_timedwait;} }