> On Nov 29, 2007, at 9:19 PM, Mark Brown wrote:
> > I have finally tracked down a bug that has plagued by vxWorks  
> > port.  It
> > appears that our file system's implementation of ftruncate() does  
> > not like
> > to "truncate" a file larger than its current size, and returns  
> > EINVAL for
> > this operation.

This is interesting - ftruncate's behavior is not defined by POSIX
in this case.  SQLite shouldn't rely on the commonly implemented 
zero-fill extension.

 http://www.opengroup.org/onlinepubs/007908799/xsh/ftruncate.html

 "If the file previously was larger than length, the extra data is 
 discarded. If it was previously shorter than length, it is unspecified 
 whether the file is changed or its size increased."

One could easily write a wrapper function for ftruncate and use it
instead.




      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to