This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: fix fastjar -C
- From: Anthony Green <green at redhat dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: Anthony Green <green at cygnus dot com>, gcc-patches at gcc dot gnu dot org, tromey at redhat dot com
- Date: 23 Feb 2002 13:24:26 -0800
- Subject: Re: Patch: fix fastjar -C
- References: <200202232104.NAA16405@makita.cygnus.com> <3C78070E.7080107@bothner.com>
On Sat, 2002-02-23 at 13:18, Per Bothner wrote:
> The difference is that my patch handles '-C DIR' as a unit, rather
> than just handling '-C'. Either should work, as long as DIR doesn't
> start with a '-'. I think the way I did it is probably cleaner, though.
I'll use your patch, except...
> +#if 0
> + ze = (zipentry*)xmalloc(sizeof(zipentry));
> + ze->mod_time = UNPACK_UB2(file_header, LOC_COMP);
> + ze->crc = UNPACK_UB4(cen_header, CEN_CRC);
> + ze->mod_time = UNPACK_UB2(cen_header, CEN_MODTIME);
> + ze->mod_date = UNPACK_UB2(cen_header, CEN_MODDATE);
> + ze->csize = UNPACK_UB4(cen_header, CEN_CSIZE);
> + ze->usize = UNPACK_UB4(cen_header, CEN_USIZE);
> + ze->offset = UNPACK_UB4(cen_header, CEN_OFFSET);
> + ze->compressed = UNPACK_UB2(cen_header, CEN_COMP) != 0;
> +#endif
...what's this?
> +static void *
> +xmalloc (size_t nbytes)
> +{
We're linking against libiberty already, so we probably don't need this.
AG