Changeset 65c3dca4 in rtems


Ignore:
Timestamp:
Dec 2, 2009, 11:00:17 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
086442b7
Parents:
46e483b8
Message:

2009-12-02 Ralf Corsépius <ralf.corsepius@…>

  • shttpd/def.h: Shrink default URI_MAX to 32767. Add special cases for sizeof(size_t) < 2.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r46e483b8 r65c3dca4  
     12009-12-02      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * shttpd/def.h: Shrink default URI_MAX to 32767.
     4        Add special cases for sizeof(size_t) < 2.
     5
    162009-12-01      Joel Sherrill <joel.sherrill@OARcorp.com>
    27
  • cpukit/shttpd/defs.h

    r46e483b8 r65c3dca4  
    3535#define ENV_MAX         4096            /* Size of environment block    */
    3636#define CGI_ENV_VARS    64              /* Maximum vars passed to CGI   */
     37#ifdef __rtems__
     38#if defined(__SIZEOF_SIZE_T__) && (__SIZEOF_SIZE_T__ <= 2)
     39/* HACK: Reduce the array size on targets with 16bit size_t */
     40# if defined(__AVR__)
     41/* FIXME: 1500 is sufficient to avoid compilation breakdown. */
     42# define URI_MAX                (32767-1500)
     43# elif defined(__M32C__)
     44/* FIXME: 1500 is sufficient to avoid compilation breakdown. */
     45# define URI_MAX                (32767-1500)
     46# else
     47/* Theoretically, this should work on all targets with 16bit size_t
     48 * In practice, it trips over other compiler limitations. */
     49# define URI_MAX         32767
     50# endif
     51#else // __SIZEOF_SIZE_T__ > 2
     52/* HACK: 32768 is 1 too much to fit into 16bit array indices. */
     53#define URI_MAX         32767           /* Maximum URI size             */
     54#endif
     55#else // __rtems__
    3756#define URI_MAX         32768           /* Maximum URI size             */
     57#endif
    3858#define MIN_REQ_LEN     16              /* "GET / HTTP/1.1\n\n"         */
    3959
Note: See TracChangeset for help on using the changeset viewer.