* [Bug bzip2/27756] New: BZ_NO_STDIO causes ERROR 1 bzip2.c:332:4: error: unknown type name ‘BZFILE’
@ 2021-04-20 3:17 kangus at aaes dot us
0 siblings, 0 replies; only message in thread
From: kangus at aaes dot us @ 2021-04-20 3:17 UTC (permalink / raw)
To: bzip2-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27756
Bug ID: 27756
Summary: BZ_NO_STDIO causes ERROR 1 bzip2.c:332:4: error:
unknown type name ‘BZFILE’
Product: bzip2
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: bzip2
Assignee: nobody at sourceware dot org
Reporter: kangus at aaes dot us
CC: bzip2-devel at sourceware dot org
Target Milestone: ---
Without touching anything bzip2 compiled and installed
Ubuntu 20.04 make 4.2.1 gcc 9.3.0
in the top of bzip2.c added #define BZ_NO_STDIO 1
kevin@Aorus:~/bzip2-1.0.8$ make
If compilation produces errors, or a large number of warnings,
please read README.COMPILATION.PROBLEMS -- you might be able to
adjust the flags in this Makefile to improve matters.
Also in README.COMPILATION.PROBLEMS are some hints that may help
if your build produces an executable which is unable to correctly
handle so-called 'large files' -- files of size 2GB or more.
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c blocksort.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c huffman.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c crctable.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c randtable.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c compress.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c decompress.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c bzlib.c
rm -f libbz2.a
ar cq libbz2.a blocksort.o huffman.o crctable.o randtable.o compress.o
decompress.o bzlib.o
ranlib libbz2.a
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c bzip2.c
bzip2.c: In function ‘compressStream’:
bzip2.c:332:4: error: unknown type name ‘BZFILE’; did you mean ‘FILE’?
332 | BZFILE* bzf = NULL;
| ^~~~~~
| FILE
bzip2.c:345:10: warning: implicit declaration of function ‘BZ2_bzWriteOpen’
[-Wimplicit-function-declaration]
345 | bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
| ^~~~~~~~~~~~~~~
bzip2.c:345:8: warning: assignment to ‘int *’ from ‘int’ makes pointer from
integer without a cast [-Wint-conversion]
345 | bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
| ^
bzip2.c:356:22: warning: implicit declaration of function ‘BZ2_bzWrite’
[-Wimplicit-function-declaration]
356 | if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
| ^~~~~~~~~~~
bzip2.c:361:4: warning: implicit declaration of function ‘BZ2_bzWriteClose64’
[-Wimplicit-function-declaration]
361 | BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
| ^~~~~~~~~~~~~~~~~~
bzip2.c: In function ‘uncompressStream’:
bzip2.c:436:4: error: unknown type name ‘BZFILE’; did you mean ‘FILE’?
436 | BZFILE* bzf = NULL;
| ^~~~~~
| FILE
bzip2.c:439:19: error: ‘BZ_MAX_UNUSED’ undeclared (first use in this function)
439 | UChar unused[BZ_MAX_UNUSED];
| ^~~~~~~~~~~~~
bzip2.c:439:19: note: each undeclared identifier is reported only once for each
function it appears in
bzip2.c:455:13: warning: implicit declaration of function ‘BZ2_bzReadOpen’
[-Wimplicit-function-declaration]
455 | bzf = BZ2_bzReadOpen (
| ^~~~~~~~~~~~~~
bzip2.c:463:18: warning: implicit declaration of function ‘BZ2_bzRead’
[-Wimplicit-function-declaration]
463 | nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
| ^~~~~~~~~~
bzip2.c:471:7: warning: implicit declaration of function ‘BZ2_bzReadGetUnused’
[-Wimplicit-function-declaration]
471 | BZ2_bzReadGetUnused ( &bzerr, bzf, &unusedTmpV, &nUnused );
| ^~~~~~~~~~~~~~~~~~~
bzip2.c:477:7: warning: implicit declaration of function ‘BZ2_bzReadClose’
[-Wimplicit-function-declaration]
477 | BZ2_bzReadClose ( &bzerr, bzf );
| ^~~~~~~~~~~~~~~
bzip2.c:439:12: warning: unused variable ‘unused’ [-Wunused-variable]
439 | UChar unused[BZ_MAX_UNUSED];
| ^~~~~~
bzip2.c: In function ‘testStream’:
bzip2.c:557:4: error: unknown type name ‘BZFILE’; did you mean ‘FILE’?
557 | BZFILE* bzf = NULL;
| ^~~~~~
| FILE
bzip2.c:560:19: error: ‘BZ_MAX_UNUSED’ undeclared (first use in this function)
560 | UChar unused[BZ_MAX_UNUSED];
| ^~~~~~~~~~~~~
bzip2.c:560:12: warning: unused variable ‘unused’ [-Wunused-variable]
560 | UChar unused[BZ_MAX_UNUSED];
| ^~~~~~
bzip2.c: In function ‘applySavedFileAttrToOutputFile’:
bzip2.c:1074:11: warning: ignoring return value of ‘fchown’, declared with
attribute warn_unused_result [-Wunused-result]
1074 | (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:132: bzip2.o] Error 1
kevin@Aorus:~/bzip2-1.0.8$
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-20 3:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 3:17 [Bug bzip2/27756] New: BZ_NO_STDIO causes ERROR 1 bzip2.c:332:4: error: unknown type name ‘BZFILE’ kangus at aaes dot us
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).