From: Martin K. <mar...@in...> - 2002-01-10 06:49:41
|
Hi Brian, On Wed, Jan 09, 2002 at 03:42:35PM -0600, Henning, Brian wrote: > Hello, > I am trying to truncate a binary file. I was looking into the function > truncate(). There is an undefined reference to it when i try to use it in my > program. I looked through the include files under mingw and did not find a > prototype. Is this a unix specific function or is there another function > that works in place of it under mingw? any suggestions? I had a similar problem some time ago and the Window's way of doing that seems to be to 1. _open the file 2. use _chsize(fd, newlen) 3. close it. This works o.k. for me, up to now. Hope that helps, Martin. -- The early bird catches the worm. If you want something else for breakfast, get up later. |