limits.h missing constants

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

limits.h missing constants

Eric Blake-2
CVS gettext had a compilation warning due to a missing value
for CHARCLASS_NAME_MAX.  Cygwin regex currently only supports
char-class names of up to 6 characters (for example, "[:xdigit:]"),
but POSIX requires a minimum of 14 when locales are free to
define their own char-class names.  While I was at it, I
noticed that several of the limits.h constants that are required
to be the same across all platforms were missing or incorrect.
And we might as well publicize our limit for declaring ELOOP on
symlink chains, rather than keeping it hidden in path.h.

2006-04-15  Eric Blake  <[hidden email]>

        * include/limits.h (_POSIX_*, _POSIX2_*, _XOPEN_*): Define missing
        standard constants, and correct invalid ones.
        (CHARCLASS_NAME_MAX): Define.
        (SYMLOOP_MAX): Define.
        * path.h (MAX_LINK_DEPTH): Define in terms of SYMLOOP_MAX.
        * regex/regcomp.c (p_b_cclass): Limit length of char class name.

cygwin.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: limits.h missing constants

Eric Blake-2
> 2006-04-15  Eric Blake  <[hidden email]>
>
> * include/limits.h (_POSIX_*, _POSIX2_*, _XOPEN_*): Define missing
> standard constants, and correct invalid ones.
> (CHARCLASS_NAME_MAX): Define.
> (SYMLOOP_MAX): Define.
> * path.h (MAX_LINK_DEPTH): Define in terms of SYMLOOP_MAX.
> * regex/regcomp.c (p_b_cclass): Limit length of char class name.

Oops - wrong version of the patch (path.h needs to include limits.h
as in this corrected version, for SYMLOOP_MAX to work).

Also, if you want to double-check my limits.h values, see
http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html#tag_13_24

--
Eric Blake

cygwin.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: limits.h missing constants

Corinna Vinschen-2
On Apr 15 16:31, Eric Blake wrote:

> > 2006-04-15  Eric Blake  <[hidden email]>
> >
> > * include/limits.h (_POSIX_*, _POSIX2_*, _XOPEN_*): Define missing
> > standard constants, and correct invalid ones.
> > (CHARCLASS_NAME_MAX): Define.
> > (SYMLOOP_MAX): Define.
> > * path.h (MAX_LINK_DEPTH): Define in terms of SYMLOOP_MAX.
> > * regex/regcomp.c (p_b_cclass): Limit length of char class name.
>
> Oops - wrong version of the patch (path.h needs to include limits.h
> as in this corrected version, for SYMLOOP_MAX to work).
>
> Also, if you want to double-check my limits.h values, see
> http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html#tag_13_24

This patch is not covered under the trivial patch rule anymore.
Please consider to fill out a copyright assignment form as described
on http://cygwin.com/contrib.html


Thanks,
Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat