This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [fastjar] implement `-u'
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: Matthias Klose <doko at cs dot tu-berlin dot de>
- Cc: Bryce McKinlay <mckinlay at redhat dot com>, Casey Marshall <csm at gnu dot org>, java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 09 Jul 2004 07:19:28 +0100
- Subject: Re: [PATCH] [fastjar] implement `-u'
- References: <8765arr5ub.fsf@gnu.org> <40E9BC1F.4000702@redhat.com><16619.7316.865830.301005@gargle.gargle.HOWL>
Matthias Klose <doko@cs.tu-berlin.de> writes:
> Updated the docs, regenerated Makefile.in, checked in.
> [...]
>> >2004-05-19 Casey Marshall <csm@gnu.org>
>> >
>> > * fastjar/Makefile.am
>> > (jar_SOURCES): added shift.c, shift.h.
>> > (jar_CPPFLAGS): define WITH_SHIFT_DOWN.
>> >
>> > * fastjar/compress.c
>> > Added FSF copyright.
>> > (write_data): new function.
>> > (compress_file): call write_data.
>> >
>> > * fastjar/jartool.c
>> > Updated copyright year.
>> > (progname): new variable.
>> > (end_of_entries): new variable.
>> > (main): open and read file when updating.
>> > (find_entry): new function.
>> > (looks_like_dir): new function.
>> > (read_entries): new function.
>> > (make_manifest): added parameter `updating'.
>> > Call `add_file_to_jar' with `updating'.
>> > (add_to_jar_with_dir): added parameter `updating'.
>> > Call `add_to_jar' with `updating'.
>> > (add_to_jar): added parameter `updating'.
>> > Call `add_file_to_jar' with `updating'.
>> > Don't add directories if they already exist.
>> > (add_file_to_jar): added parameter `updating'.
>> > Update entries if they already exist.
The use of 'static inline' for find_entry() and looks_like_dir() breaks
bootstrap on mips-sgi-irix6.5 when using the native compiler. The obvious
patch below fixes it, but how wedded are you to the inline thing? Should I
add an autoconf test instead?
Richard
PS. Minor nit, but when committing a patch, please use the check-in date
for the ChangeLog. It's very confusing to see an entry dated 2004-05-19
for something that was only really applied a few days ago. Began to wonder
how I'd failed to notice it for over a month...
* jartool.c (find_entry, looks_like_dir): Remove inline spec.
Index: jartool.c
===================================================================
RCS file: /cvs/gcc/gcc/fastjar/jartool.c,v
retrieving revision 1.26
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.26 jartool.c
--- jartool.c 6 Jul 2004 21:40:08 -0000 1.26
+++ jartool.c 9 Jul 2004 06:11:28 -0000
@@ -284,8 +284,8 @@ static void init_args(char **, int);
static char *get_next_arg (void);
static char *jt_strdup (char*);
static void expand_options (int *argcp, char ***argvp);
-static inline struct zipentry *find_entry (const char *);
-static inline int looks_like_dir (const char *);
+static struct zipentry *find_entry (const char *);
+static int looks_like_dir (const char *);
/* global variables */
ub1 file_header[30];
@@ -731,7 +731,7 @@ void add_entry(struct zipentry *ze){
number_of_entries++;
}
-static inline struct zipentry *
+static struct zipentry *
find_entry (const char *fname)
{
struct zipentry *ze;
@@ -745,7 +745,7 @@ find_entry (const char *fname)
}
-static inline int
+static int
looks_like_dir (const char *fname)
{
struct zipentry *ze;