URL:
https://svn.lrde.epita.fr/svn/argp/trunk
ChangeLog:
2007-02-02 SIGOURE Benoit <tsuna(a)lrde.epita.fr>
Fix the check for `restrict'.
* argp-fmtstream.h [!HAVE_UNISTD_H]: Don't use #define to change
ssize_t in int, use a typedef instead.
* argp.h [!__restrict]: Fix the conditional definition of __restrict
(remove a typo, use C99 features).
argp-fmtstream.h | 2 +-
argp.h | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
Index: trunk/argp.h
===================================================================
--- trunk/argp.h (revision 4)
+++ trunk/argp.h (revision 5)
@@ -43,14 +43,15 @@
# define __error_t_defined
#endif
-/* FIXME: What's the right way to check for __restrict? Sun's cc seems
- not to have it. Perhaps it's easiest to just delete the use of
- __restrict from the prototypes. */
#ifndef __restrict
-# ifndef __GNUC___
+# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __restrict restrict
+# else /* No C99: */
+# ifndef __GNUC__
# define __restrict
# endif
-#endif
+# endif /* C99 */
+#endif /* __restrict */
/* NOTE: We can't use the autoconf tests, since this is supposed to be
an installed header file and argp's config.h is of course not
Index: trunk/argp-fmtstream.h
===================================================================
--- trunk/argp-fmtstream.h (revision 4)
+++ trunk/argp-fmtstream.h (revision 5)
@@ -35,7 +35,7 @@
/* This is a kludge to make the code compile on windows. Perhaps it
would be better to just replace ssize_t with int through out the
code. */
-# define ssize_t int
+typedef ssize_t int;
#endif
#if _LIBC || (defined (HAVE_FLOCKFILE) && defined(HAVE_PUTC_UNLOCKED) \
--
SIGOURE Benoit aka Tsuna (SUSv3 compliant)
_____ "On a long enough timeline, the survival rate
/EPITA\ Promo 2008.CSI/ACU/YAKA for everyone drops to zero" -- Jack.