News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

about the function "gzFile" from libz / zlib update.

Started by darkbill, March 19, 2012, 12:25:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkbill

I try to git the codes for GIT server and compile it. But I failed with the message below.


===> CXX dataobj/loadsave.cc
dataobj/loadsave.cc: In member function 'bool loadsave_t::rd_open(const char*)':
dataobj/loadsave.cc:87:21: error: cannot convert 'FILE* {aka _IO_FILE*}' to 'gzFile' for argument '1' to 'char* gzgets(gzFile, char*, int)'
dataobj/loadsave.cc: In member function 'const char* loadsave_t::close()':
.......
dataobj/loadsave.cc: In member function 'bool loadsave_t::is_eof()':
......
dataobj/loadsave.cc: In member function 'int loadsave_t::lsgetc()':
dataobj/loadsave.cc:358:10: error: 'FILE' has no member named 'have'
.....


My computer is Archlinux x86_64, and I tried to google the problem and get the nearly message below from bbs.archlinux.org from another pack.

Hello

its due to zlib-1.2.6....

There is a change in zlib.h

-   typedef voidp gzFile;       /* opaque gzip file descriptor */
+ typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */

since gzFile is changed from void * to gzFile_s *, implicit casting from FILE * to gzFile_s * will not work

https://bbs.archlinux.org/viewtopic.php?id=136269

Now I am not sure whether it will lead a bug to the executable binaries with zlib-1.2.6 installed. I will test it later.

Dwachs

this was fixed in simutrans standard some time ago, but obviously not merged into the branch you are compiling.
Parsley, sage, rosemary, and maggikraut.