diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-10 21:04:24 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-10 21:04:24 +0000 |
commit | d36bda007ad84778419c06c811063e4a72e2b6f0 (patch) | |
tree | 966808eadf9ac78e77fba387240bea0f69dbb012 /fastjar | |
parent | 5d6ce59028948ed805198f10b85973ebe9053eda (diff) | |
download | gcc-d36bda007ad84778419c06c811063e4a72e2b6f0.tar.gz |
* jartool.c (add_to_jar): Only compare file to jarfile if jarfile is
non-NULL.
* configure.in (AC_CHECK_HEADERS): Add limits.h.
* configure, config.h.in: Rebuilt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fastjar')
-rw-r--r-- | fastjar/ChangeLog | 8 | ||||
-rw-r--r-- | fastjar/config.h.in | 3 | ||||
-rwxr-xr-x | fastjar/configure | 2 | ||||
-rw-r--r-- | fastjar/configure.in | 2 | ||||
-rw-r--r-- | fastjar/jartool.c | 5 |
5 files changed, 16 insertions, 4 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index 9ca8ac821a8..3cf963b1b45 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,11 @@ +2002-10-10 Jakub Jelinek <jakub@redhat.com> + + * jartool.c (add_to_jar): Only compare file to jarfile if jarfile is + non-NULL. + + * configure.in (AC_CHECK_HEADERS): Add limits.h. + * configure, config.h.in: Rebuilt. + 2002-11-07 Tom Tromey <tromey@redhat.com> * dostime.c: Rewrote from scratch. diff --git a/fastjar/config.h.in b/fastjar/config.h.in index ae4fb96c5cb..05d0c6ec1f5 100644 --- a/fastjar/config.h.in +++ b/fastjar/config.h.in @@ -21,6 +21,9 @@ /* Define if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + /* Define if you have the <sys/dir.h> header file. */ #undef HAVE_SYS_DIR_H diff --git a/fastjar/configure b/fastjar/configure index 719d3e32b05..4cc1b926a70 100755 --- a/fastjar/configure +++ b/fastjar/configure @@ -1691,7 +1691,7 @@ EOF fi -for ac_hdr in fcntl.h unistd.h sys/param.h stdlib.h +for ac_hdr in fcntl.h unistd.h sys/param.h stdlib.h limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 diff --git a/fastjar/configure.in b/fastjar/configure.in index c2e686e0f8c..a1e4676a7dc 100644 --- a/fastjar/configure.in +++ b/fastjar/configure.in @@ -24,7 +24,7 @@ dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_STRUCT_TM -AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h) +AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_OFF_T diff --git a/fastjar/jartool.c b/fastjar/jartool.c index 3048ee9c213..cd2efcb109f 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -843,7 +843,7 @@ int add_to_jar(int fd, const char *new_dir, const char *file){ } } - if(!strcmp(file, jarfile)){ + if(jarfile && !strcmp(file, jarfile)){ if(verbose) printf("skipping: %s\n", file); return 0; /* we don't want to add ourselves.. */ @@ -924,7 +924,8 @@ int add_to_jar(int fd, const char *new_dir, const char *file){ while(!use_explicit_list_only && (de = readdir(dir)) != NULL){ if(de->d_name[0] == '.') continue; - if(!strcmp(de->d_name, jarfile)){ /* we don't want to add ourselves. Believe me */ + if(jarfile && !strcmp(de->d_name, jarfile)){ + /* we don't want to add ourselves. Believe me */ if(verbose) printf("skipping: %s\n", de->d_name); continue; |