This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: fix fastjar -C


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]