fastjar: Small _chsize/ftruncate fix

Andreas Schwab schwab@suse.de
Wed Jul 21 16:59:00 GMT 2004


Bryce McKinlay <mckinlay@redhat.com> writes:

> Andreas Schwab wrote:
>
>>Bryce McKinlay <mckinlay@redhat.com> writes:
>>
>>  
>>
>>>--- jartool.c   19 Jul 2004 20:08:20 -0000      1.28
>>>+++ jartool.c   19 Jul 2004 20:36:14 -0000
>>>@@ -580,8 +580,7 @@
>>>     if (action == ACTION_UPDATE)
>>> #if HAVE_FTRUNCATE
>>>       ftruncate (jarfd, lseek (jarfd, 0, SEEK_CUR));
>>>-#endif
>>>-#if HAVE__CHSIZE
>>>+#else
>>>       _chsize (jarfd, lseek (jarfd, 0, SEEK_CUR));
>>> #endif
>>>    
>>>
>>
>>What if neither ftruncate nor _chsize is supported?
>>  
>>
> You'll get an error.

Ah, I didn't notice the three lines befor that.  But how about catching
that earlier, like during the configure run?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Java-patches mailing list