This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] various C99 conversion for files in sysdeps


On Mon, Dec 16, 2002 at 11:28:34AM -0800, Ulrich Drepper wrote:
> Art Haas wrote:
> 
> 
> Everything with /bits/ in the name is an installed header and must *not*
> be changed due to the use in C++.  Please revise your patch.
> 

Alright. Here are four patches for various sysdeps files.

2002-12-16  Art Haas  <ahaas@airmail.net>

	* sysdeps/generic/bp-semctl.h: Convert GCC extension initializer
	syntax to C99
	* sysdeps/unix/sysv/aix/settimer.c: Same.
	* sysdeps/unix/sysv/aix/sleep.c: Same.
	* sysdeps/unix/sysv/aix/usleep.c: Same.

Index: sysdeps/generic/bp-semctl.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/bp-semctl.h,v
retrieving revision 1.4
diff -u -r1.4 bp-semctl.h
--- sysdeps/generic/bp-semctl.h	6 Jul 2001 04:55:48 -0000	1.4
+++ sysdeps/generic/bp-semctl.h	16 Dec 2002 15:33:39 -0000
@@ -41,7 +41,7 @@
     case SETALL:
       {
 	struct semid_ds ds;
-	union semun un = { buf: &ds };
+	union semun un = { .buf = &ds };
 	unsigned int length = ~0;
 
 	/* It's unfortunate that we need to make a recursive
Index: sysdeps/unix/sysv/aix/setitimer.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/aix/setitimer.c,v
retrieving revision 1.2
diff -u -r1.2 setitimer.c
--- sysdeps/unix/sysv/aix/setitimer.c	6 Jul 2001 04:56:11 -0000	1.2
+++ sysdeps/unix/sysv/aix/setitimer.c	16 Dec 2002 15:33:59 -0000
@@ -56,7 +56,7 @@
     case -1: exit(-1);
     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);
 	__kill(getppid(), SIGALRM);
 	exit(0);
Index: sysdeps/unix/sysv/aix/sleep.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/aix/sleep.c,v
retrieving revision 1.2
diff -u -r1.2 sleep.c
--- sysdeps/unix/sysv/aix/sleep.c	6 Jul 2001 04:56:11 -0000	1.2
+++ sysdeps/unix/sysv/aix/sleep.c	16 Dec 2002 15:33:59 -0000
@@ -27,7 +27,7 @@
 __sleep (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);
   return 0;
 }
Index: sysdeps/unix/sysv/aix/usleep.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/aix/usleep.c,v
retrieving revision 1.2
diff -u -r1.2 usleep.c
--- sysdeps/unix/sysv/aix/usleep.c	6 Jul 2001 04:56:11 -0000	1.2
+++ sysdeps/unix/sysv/aix/usleep.c	16 Dec 2002 15:33:59 -0000
@@ -28,7 +28,7 @@
 usleep (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);
   return 0;
 }

-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]