Derek Price <[EMAIL PROTECTED]> writes:

> Paul's recent change to getdelim.c breaks the build on at least NetBSD
> 1.6.1:
>
> 2005-10-03  Paul Eggert  <[EMAIL PROTECTED]>
>
>         * getdelim.c: Include getdelim.h first.  Include <limits.h>.
>         (SSIZE_MAX): New macro, if not already defined.
>         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
>         than 2 GiB.
>
> The problem is that the new SSIZE_MAX macro depends on SIZE_MAX, which
> may not be defined.  I've installed the attached patch, ripped verbatim
> from serveral other modules.

Shouldn't we use the size_max module instead?

> 2005-10-05  Derek Price  <[EMAIL PROTECTED]>
>
>     * getdelim.c (SIZE_MAX): New macro, if not already defined.
>
>
> Regards,
>
> Derek
>
> -- 
> Derek R. Price
> CVS Solutions Architect
> Ximbiot <http://ximbiot.com>
> v: +1 717.579.6168
> f: +1 717.234.3125
> <mailto:[EMAIL PROTECTED]>
>
> Index: lib/getdelim.c
> ===================================================================
> RCS file: /cvsroot/gnulib/gnulib/lib/getdelim.c,v
> retrieving revision 1.5
> diff -u -p -r1.5 getdelim.c
> --- lib/getdelim.c    3 Oct 2005 19:44:05 -0000       1.5
> +++ lib/getdelim.c    5 Oct 2005 18:05:05 -0000
> @@ -29,6 +29,9 @@
>  #include <stdlib.h>
>  #include <errno.h>
>  
> +#ifndef SIZE_MAX
> +# define SIZE_MAX ((size_t) -1)
> +#endif
>  #ifndef SSIZE_MAX
>  # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
>  #endif
> _______________________________________________
> bug-gnulib mailing list
> bug-gnulib@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-gnulib


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to