On Monday 28 December 2009 12:32:01, Vincent Torri wrote:
> 
> On Mon, 28 Dec 2009, Pedro Alves wrote:
> 
> > On Monday 28 December 2009 10:35:40, Vincent Torri wrote:
> >>
> >> Hey,
> >
> > Hello!
> >
> >> The maitainer of zlib wants to release a new version. I plan to integrate
> >> the patches (a bit modified, though) for the compilation with mingw32ce
> >> (cegcc version is not needed).
> >
> > (I don't know much about upstream zlib, but,)
> > Are you saying that you plan to push the patches to zlib before the release
> > is out so that the official sources have them included already?
> 
> that's the plan, and Mark Adler agrees

Awesome!

> 
> >
> >> the last version (maybe without my patches, i didn't look at it)
> >>
> >> http://zlib.net/current/beta/zlib-1.2.3.4.tar.gz
> >
> > (are your patches available somewhere, BTW?)
> 
> ported packages in the File Release on SF

( damn, our site sucks rocks :-) )  Found it.

> 
> btw, feel free to mention any improvements about the port (see the README 
> file, about the optimization flags, for example)

>From said README:

> 7) Compilation
> 
>  * Version: svn 22-Jul-2008
>  * Architecture: mingw32ce
>  * CPPFLAGS: -D_WIN32_WCE=0x0400 -DNO_ERRNO_H
>  * CFLAGS: -O3 -Wall -mms-bitfields

Is the explicit "-mms-bitfields" really needed?  I
thought mingw32ce defaulted to -ms-bitfields?

Any reason -D_WIN32_WCE=0x0400 (or -D_WIN32_WCE=0x0300, I think
it builds fine) isn't set in zutil.h instead of
on the command line?

>  * LDFLAGS: --enable-auto-import -s

Same for --enable-auto-import.


Any reason you don't use win32/Makefile.gcc instead of heavily patching the
top Makefile?  BTW, I think used to just run:

 make CC=arm-mingw32ce-gcc AR="arm-mingw32ce-ar rc" 
RANLIB="arm-mingw32ce-ranlib" CFLAGS="-DNO_ERRNO_H -g3 -O0"

on the top Makefile.

I also see that you set -D_WIN32_IE=0x0400 in the Makefile.  I wish
people would stop doing that.  _WIN32_IE is not meant for CE
usage.  If you do need it, it's a bug in the w32api headers that
needs fixing (to expose functions/macros under _WIN32_WCE).

>  * Porting issues:

>   - does not use the errno system, but zlib implement some dummy
>     errno variable for the compilation on Windows CE.

Hmmm.  Is there any plan to use GetLastError instead?  dummy errno
variables are evil.  IMO, the need for NO_ERRNO_H should be cleaned
away.

I spotted one thing extra thing should be tweaked:

 >grep "fd < 0" *
 gzio.c:    s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
 gzio.c:    if (fd < 0) return (gzFile)Z_NULL;

Should be changed to check for explicit -1, like:

 s->file = fd == -1 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);

This is because file descriptors in Windows CE are really
handles in desguise, and they can really end up negative
without that being an error.

>   - gzio.c and zutil.h have been modified accordingly
> 
> Note that there is a patch that needs to be improved in order to be in the 
> next release of zlib. It is known.

Let me know if I can help with that.  (What needs improving specifically?)

> >> I plan to do a new ported package after the (happy) new year. It would be
> >> nice if some people can test the ported package once i build it.
> >
> > Or are you announcing that you'll post an updated release out with
> > your patches on top of the official release?
> 
> i'll post the same kind of package (source + bin + dev), but there will be 
> no more patch (I hope).

-- 
Pedro Alves

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to