summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-03-17 07:33:40 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-03-17 07:33:40 +0000
commitd01c74cabd34e60c1eb8f448dd6ca564bf0bcb8b (patch)
treed2191125141cb62b5405e940c2b6efc3c3a32cfb
parentf7bc3c2bfc3874a1fba2fc7deb2298057451130f (diff)
downloadcoreutils-d01c74cabd34e60c1eb8f448dd6ca564bf0bcb8b.tar.xz
(regoff_t) [defined _REGEX_LARGE_OFFSETS]:
Typedef to long int, not to off_t, as POSIX will likely change in that direction.
-rw-r--r--lib/regex.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/regex.h b/lib/regex.h
index c06a062c4..22384df1f 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005
+ Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -53,11 +53,13 @@ extern "C" {
/* The type of the offset of a byte within a string.
For historical reasons POSIX 1003.1-2004 requires that regoff_t be
- at least as wide as off_t. This is a bit odd (and many common
- POSIX platforms set it to the more-sensible ssize_t) but we might
- as well conform. We don't know of any hosts where ssize_t is wider
- than off_t, so off_t is safe. */
-typedef off_t regoff_t;
+ at least as wide as off_t. However, many common POSIX platforms set
+ regoff_t to the more-sensible ssize_t and the Open Group has
+ signalled its intention to change the requirement to be that
+ regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
+ 60 (2005-08-25). We don't know of any hosts where ssize_t or
+ ptrdiff_t is wider than long int, so long int is safe. */
+typedef long int regoff_t;
/* The type of nonnegative object indexes. Traditionally, GNU regex
uses 'int' for these. Code that uses __re_idx_t should work