ufairiya / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

BUFSIZ define get's replaced by BUFSIZ define in <stdio.h> #231

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

printf of BUFSIZ in mg_vsnprintf returns 8192

What is the expected output? What do you see instead?

Desired output would be 4096 as defined at the top of mongoose.c

Original issue reported on code.google.com by stijncle...@gmail.com on 16 Feb 2011 at 9:54

GoogleCodeExporter commented 9 years ago
BUFSIZ is defined only for WINCE environment. WINCE is not ISO  C compliant and 
does not provide BUFSIZ.
For other environments, mongoose gets BUFSIZ from the standard includes, which 
is right thing to do since should be optimal IO buffer size for the given 
environment.

Original comment by valenok on 16 Feb 2011 at 1:40

GoogleCodeExporter commented 9 years ago
BUFSIZ is defined only for WINCE environment. WINCE is not ISO  C compliant and 
does not provide BUFSIZ.
For other environments, mongoose gets BUFSIZ from the standard includes, which 
is right thing to do since should be optimal IO buffer size for the given 
environment.

Original comment by valenok on 16 Feb 2011 at 1:40