Re: R: [PATCH] replace RFC2181 magic numbers with POSIX definitions

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 21 Nov 2009 23:15:43 +1300

Guido Serassio wrote:
> Hi Amos,
>
> If I remember right, MAXHOSTNAMELEN and MAXPATHLEN are not definend on
> Windows and some _POSIX defines are available only building in POSIX
> mode (Squid is build in native mode because win32 API are not exposed in
> POSIX mode).
>
> From limits.h:
>
> #ifdef _POSIX_
>
> #define _POSIX_ARG_MAX 4096
> #define _POSIX_CHILD_MAX 6
> #define _POSIX_LINK_MAX 8
> #define _POSIX_MAX_CANON 255
> #define _POSIX_MAX_INPUT 255
> #define _POSIX_NAME_MAX 14
> #define _POSIX_NGROUPS_MAX 0
> #define _POSIX_OPEN_MAX 16
> #define _POSIX_PATH_MAX 255
> #define _POSIX_PIPE_BUF 512
> #define _POSIX_SSIZE_MAX 32767
> #define _POSIX_STREAM_MAX 8
> #define _POSIX_TZNAME_MAX 3
>
> #define ARG_MAX 14500 /* 16k heap, minus overhead */
> #define LINK_MAX 1024
> #define MAX_CANON _POSIX_MAX_CANON
> #define MAX_INPUT _POSIX_MAX_INPUT
> #define NAME_MAX 255
> #define NGROUPS_MAX 16
> #define OPEN_MAX 32
> #define PATH_MAX 512
> #define PIPE_BUF _POSIX_PIPE_BUF
> #define SSIZE_MAX _POSIX_SSIZE_MAX
> #define STREAM_MAX 20
> #define TZNAME_MAX 10
>
> #endif /* POSIX */
>
> Regards
>
> Guido
>
> Guido Serassio
> Acme Consulting S.r.l.
> Microsoft Gold Certified Partner
> Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
> Tel. : +39.011.9530135 Fax. : +39.011.9781115
> Email: guido.serassio_at_acmeconsulting.it
> WWW: http://www.acmeconsulting.it
>

Ah, okay thanks for the heads-up.
Version 2 coming shortly...

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
   Current Beta Squid 3.1.0.14
Received on Sat Nov 21 2009 - 10:16:06 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 22 2009 - 12:00:06 MST