glibc 2.2.5 support for restrict
"madhvesh" <[email protected]> Fri, 21 Nov 2003 20:22:10 +0530
| Newsgroups | gmane.comp.lib.phil,gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am referring to glibc-2.2.5 and linxu kernel-2.4.20. I came across the POSIX-2001.1 standard which says that "restrict" keyword has to be used for function prototypes. Also i noticed that, the gcc compiler option --std=c99 enables this support. In glibc-v2.2.5, i came across following code which enables "__restirct" for gcc compiler versions less than 2.96. Code==>posix/regex.h #ifndef __restrict #if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) # if defined restrict || 199901L <= __STDC_VERSION__ # define __restrict restrict # else # define __restrict # endif #endif #endif So glibc-v2.2.5 will not support restrict pointer types for gcc versions above 2.95? To support this in glibc-v2.2.5 with linux-kernel2.4.20, what needs to be modified? Since some of the signals related function prototypes are to be supported with "restrict" keyword, how is it supported in NPTL as part of pthreads? Also to support this at library level say glibc-v2.2.5, linux-kernel source has to provide proper implementation for restrict pointers? I mean does it take care of not modifying the argument pointer types of restrict internally while manipulating the user passed arguments? Is this issue addressed in linux-kernel-v2.4.20? Any help in this will be very helpful to me Thanks in advance -MS