diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2002-04-08 18:56:39 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2002-04-08 18:56:39 +0000 |
commit | 384ece6125c1d7f941c9afdc5420c1e0f8c5eb3d (patch) | |
tree | ab9d0ce5c948d232b85404a93d2372a0eb6aa797 /lib/posix/regex.h | |
parent | 23447f11cd30a9146194535cd24dbfd326702ea6 (diff) | |
download | diffutils-384ece6125c1d7f941c9afdc5420c1e0f8c5eb3d.tar.gz |
(__restrict_arr): Define for GCC 3.1 and up.
Diffstat (limited to 'lib/posix/regex.h')
-rw-r--r-- | lib/posix/regex.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/posix/regex.h b/lib/posix/regex.h index 1e2efd9..29f8e32 100644 --- a/lib/posix/regex.h +++ b/lib/posix/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library, version 0.12. - Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1985,1989-93,1995-98,2000,2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -526,10 +526,14 @@ extern int re_exec _RE_ARGS ((const char *)); # endif # endif #endif -/* For now unconditionally define __restrict_arr to expand to nothing. - Ideally we would have a test for the compiler which allows defining - it to restrict. */ -#define __restrict_arr +/* gcc 3.1 and up support the [restrict] syntax. */ +#ifndef __restrict_arr +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +# define __restrict_arr __restrict +# else +# define __restrict_arr +# endif +#endif /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *__restrict __preg, |