Index: ossp-pkg/sio/al.c RCS File: /v/ossp/cvs/ossp-pkg/sio/Attic/al.c,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/sio/Attic/al.c,v' 2>/dev/null --- al.c 2002/10/16 12:37:08 1.14 +++ al.c 2002/10/17 10:17:54 1.15 @@ -236,7 +236,11 @@ ((n) > AL_CHUNK_LEN(alc) - (off) ? \ AL_CHUNK_LEN(alc) - (off) : (n)) -/* number of bytes a chunk can be grown to the end */ +/* + * number of bytes a chunk can be grown to the end + * we must not grow a chunk in a shared buffer since + * we do not track other chunks sharing the buffer + */ #define AL_CHUNK_RESERVE(alc) \ ((alc) \ ? (alc)->buf->usecount > 1 ? 0 : (alc)->buf->size - (alc)->end \ @@ -246,7 +250,11 @@ #define AL_RESIZE(al, alc, n) \ do { (alc)->end += n; (al)->bytes += (n); } while (0) -/* number of bytes a chunk can be grown to the beginning */ +/* + * number of bytes a chunk can be grown to the beginning + * we must not grow a chunk in a shared buffer since + * we do not track other chunks sharing the buffer + */ #define AL_CHUNK_PRESERVE(alc) \ ((alc) \ ? (alc)->buf->usecount > 1 ? 0 : (alc)->begin \