aboutsummaryrefslogtreecommitdiff
path: root/fastjar/jargrep.c
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@gcc.gnu.org>2002-01-03 04:57:56 +0000
committerCraig Rodrigues <rodrigc@gcc.gnu.org>2002-01-03 04:57:56 +0000
commit798010914efad2e7b17c61307de2cd1444c2fc66 (patch)
tree409560be27bbc2506bdd4af973f083ffec2f785c /fastjar/jargrep.c
parentbf7edb60c8fb5aada12dd870c029aaac488a042b (diff)
downloadgcc-798010914efad2e7b17c61307de2cd1444c2fc66.zip
gcc-798010914efad2e7b17c61307de2cd1444c2fc66.tar.gz
gcc-798010914efad2e7b17c61307de2cd1444c2fc66.tar.bz2
re PR bootstrap/5117 (irix6.5 bootstrap failure when using SGI's compiler)
2001-01-02 Craig Rodrigues <rodrigc@gcc.gnu.org> PR bootstrap/5117 * configure.in (AC_CHECK_HEADERS): Check for stdlib.h. * Makefile.am: Move grepjar to bin_PROGRAMS. * config.h.in: Regenerated. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * jargrep.c: Eliminate some signed/unsigned and default uninitialized warnings. Use HAVE_STDLIB_H instead of STDC_HEADERS macro. * jartool.c: Likewise. * compress.c: Likewise. From-SVN: r48493
Diffstat (limited to 'fastjar/jargrep.c')
-rw-r--r--fastjar/jargrep.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fastjar/jargrep.c b/fastjar/jargrep.c
index ef3baf0..a1ea4bf 100644
--- a/fastjar/jargrep.c
+++ b/fastjar/jargrep.c
@@ -21,9 +21,15 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/* $Id: jargrep.c,v 1.3 2000/12/14 18:45:35 ghazi Exp $
+/* $Id: jargrep.c,v 1.4 2000/12/15 18:45:09 tromey Exp $
$Log: jargrep.c,v $
+Revision 1.4 2000/12/15 18:45:09 tromey
+ * jargrep.c: Include getopt.h if it exists.
+ (optind): Declare.
+ * configure, config.h: Rebuilt.
+ * configure.in: Check for getopt.h.
+
Revision 1.3 2000/12/14 18:45:35 ghazi
Warning fixes:
@@ -90,7 +96,7 @@ will test some other platforms later.
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "jargrep.h"
@@ -440,7 +446,7 @@ purpose: Verify the CRC matches that as what is stored in the jar file.
*/
static void check_crc(pb_file *pbf, const char *stream, ub4 usize) {
- ub4 crc;
+ ub4 crc=0;
ub4 lcrc;
ub1 scratch[16];
@@ -550,7 +556,7 @@ static int cont_grep(regex_t *exp, regex_t *nl_exp, int fd, pb_file *pbf, int op
char *filename;
char *str_stream;
regmatch_t *match_array;
- regmatch_t *nl_offsets;
+ regmatch_t *nl_offsets=0;
if(pb_read(pbf, (file_header + 4), 26) != 26) {
perror("read");