mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-27 04:41:02 +08:00
Convert GCC extension initializer syntax to C99.
This commit is contained in:
parent
5a9c848490
commit
519d2b2e9f
@ -56,7 +56,7 @@ __setitimer (which, new, old)
|
|||||||
case -1: exit(-1);
|
case -1: exit(-1);
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
struct timespec ts ={tv_sec:(long int)new->it_value.tv_sec,tv_nsec:0};
|
struct timespec ts ={.tv_sec = (long int)new->it_value.tv_sec, .tv_nsec = 0};
|
||||||
__libc_nanosleep(&ts,&ts);
|
__libc_nanosleep(&ts,&ts);
|
||||||
__kill(getppid(), SIGALRM);
|
__kill(getppid(), SIGALRM);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -27,7 +27,7 @@ unsigned int
|
|||||||
__sleep (seconds)
|
__sleep (seconds)
|
||||||
unsigned int seconds;
|
unsigned int seconds;
|
||||||
{
|
{
|
||||||
struct timespec ts ={tv_sec:(long int)seconds,tv_nsec:0};
|
struct timespec ts ={.tv_sec = (long int)seconds, .tv_nsec = 0};
|
||||||
__libc_nanosleep(&ts,&ts);
|
__libc_nanosleep(&ts,&ts);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ int
|
|||||||
usleep (useconds)
|
usleep (useconds)
|
||||||
useconds_t useconds;
|
useconds_t useconds;
|
||||||
{
|
{
|
||||||
struct timespec ts ={tv_sec:0,tv_nsec:(long int)useconds * 1000};
|
struct timespec ts ={.tv_sec = 0, .tv_nsec = (long int)useconds * 1000};
|
||||||
__libc_nanosleep(&ts,&ts);
|
__libc_nanosleep(&ts,&ts);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user