diff options
author | Tom Tromey <tromey@redhat.com> | 2001-08-27 23:09:37 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-08-27 23:09:37 +0000 |
commit | c5bb59c118038f25b2479b2513c36626a8df6cb3 (patch) | |
tree | 47ab41cf167939df2b8beca6f770bb1b78324474 | |
parent | b7b59ff4ec28451337d241bf38dfdeb9bbcbd6b3 (diff) | |
download | gcc-c5bb59c118038f25b2479b2513c36626a8df6cb3.zip gcc-c5bb59c118038f25b2479b2513c36626a8df6cb3.tar.gz gcc-c5bb59c118038f25b2479b2513c36626a8df6cb3.tar.bz2 |
jartool.c (jarfile): Remove length limitation.
* jartool.c (jarfile): Remove length limitation.
(main): Use jt_strdup when initializing jarfile.
From-SVN: r45217
-rw-r--r-- | fastjar/ChangeLog | 5 | ||||
-rw-r--r-- | fastjar/jartool.c | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index d46ec26..684a0f2 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,8 @@ +2001-08-27 Tom Tromey <tromey@redhat.com> + + * jartool.c (jarfile): Remove length limitation. + (main): Use jt_strdup when initializing jarfile. + 2001-07-04 Tom Tromey <tromey@redhat.com> Modified from patch by Julian Hall <jules@acris.co.uk>: diff --git a/fastjar/jartool.c b/fastjar/jartool.c index 0f65d12..f2922bd 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -17,9 +17,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: jartool.c,v 1.5 2001/05/03 21:40:47 danglin Exp $ +/* $Id: jartool.c,v 1.6 2001/07/04 18:33:53 tromey Exp $ $Log: jartool.c,v $ + Revision 1.6 2001/07/04 18:33:53 tromey + Modified from patch by Julian Hall <jules@acris.co.uk>: + * jartool.c (errno): Conditionally declare. + (O_BINARY): Conditionally define. + (main): Use open, not creat. Use O_BINARY everywhere. + (make_manifest): Use O_BINARY. + (add_to_jar): Likewise. + Revision 1.5 2001/05/03 21:40:47 danglin * jartool.c (jt_strdup): New function. (get_next_arg): Use jt_strdup instead of strdup. @@ -241,7 +249,7 @@ ub1 data_descriptor[16]; int do_compress; int seekable; int verbose; -char jarfile[256]; +char *jarfile; /* If non zero, then don't recurse in directory. Instead, add the directory entry and relie on an explicit list of files to populate @@ -357,7 +365,7 @@ int main(int argc, char **argv){ if(i >= argc) usage(argv[0]); - strncpy(jarfile, argv[i++], 256); + jarfile = jt_strdup (argv[i++]); } if(manifest_file){ if(i >= argc) @@ -370,7 +378,7 @@ int main(int argc, char **argv){ if(i >= argc) usage(argv[0]); - strncpy(jarfile, argv[i++], 256); + jarfile = jt_strdup (argv[i++]); } /* create the jarfile */ |