Cleanups.

committer: mfx <mfx> 978636047 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2001-01-04 19:20:47 +00:00
parent 0979848bdc
commit 266d992017
4 changed files with 9 additions and 4 deletions
+1
View File
@@ -7,6 +7,7 @@ Changes in 1.12 beta (XX Jan 2001):
* implemented several new options for finer compression control: * implemented several new options for finer compression control:
`--all-methods', `--all-filters' and `--brute' `--all-methods', `--all-filters' and `--brute'
* linux/386: added the option `--force-execve' * linux/386: added the option `--force-execve'
* documentation updates
Changes in 1.11 beta (20 Dec 2000): Changes in 1.11 beta (20 Dec 2000):
* UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING * UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING
+6 -2
View File
@@ -957,9 +957,13 @@ void upx_sanity_check(void)
COMPILE_TIME_ASSERT(sizeof(long) >= 4); COMPILE_TIME_ASSERT(sizeof(long) >= 4);
COMPILE_TIME_ASSERT(sizeof(void *) >= 4); COMPILE_TIME_ASSERT(sizeof(void *) >= 4);
COMPILE_TIME_ASSERT(sizeof(long) >= sizeof(void *)); COMPILE_TIME_ASSERT(sizeof(long) >= sizeof(void *));
COMPILE_TIME_ASSERT(((size_t) -1) > 0);
COMPILE_TIME_ASSERT(((ptrdiff_t) -1) < 0); COMPILE_TIME_ASSERT(sizeof(off_t) >= sizeof(long));
COMPILE_TIME_ASSERT(((off_t) -1) < 0); COMPILE_TIME_ASSERT(((off_t) -1) < 0);
COMPILE_TIME_ASSERT(sizeof(ptrdiff_t) >= sizeof(int));
COMPILE_TIME_ASSERT(((ptrdiff_t) -1) < 0);
COMPILE_TIME_ASSERT(sizeof(size_t) >= sizeof(int));
COMPILE_TIME_ASSERT(((size_t) -1) > 0);
COMPILE_TIME_ASSERT(sizeof(BE16) == 2); COMPILE_TIME_ASSERT(sizeof(BE16) == 2);
COMPILE_TIME_ASSERT(sizeof(BE32) == 4); COMPILE_TIME_ASSERT(sizeof(BE32) == 4);
+1 -1
View File
@@ -67,7 +67,7 @@ bool PackUnix::canPack()
// info: currently the header is 36 (32+4) bytes before EOF // info: currently the header is 36 (32+4) bytes before EOF
unsigned char buf[256]; unsigned char buf[256];
fi->seek(-(long)sizeof(buf), SEEK_END); fi->seek(-(off_t)sizeof(buf), SEEK_END);
fi->readx(buf, sizeof(buf)); fi->readx(buf, sizeof(buf));
checkAlreadyPacked(buf, sizeof(buf)); checkAlreadyPacked(buf, sizeof(buf));
+1 -1
View File
@@ -497,7 +497,7 @@ void Packer::copyOverlay(OutputFile *fo, unsigned overlay,
} }
info("Copying overlay: %d bytes", overlay); info("Copying overlay: %d bytes", overlay);
if (do_seek) if (do_seek)
fi->seek(-(long)overlay, SEEK_END); fi->seek(-(off_t)overlay, SEEK_END);
// get buffer size, align to improve i/o speed // get buffer size, align to improve i/o speed
unsigned buf_size = buf->getSize(); unsigned buf_size = buf->getSize();