Commit 6bd1914e by Tom Tromey Committed by Tom Tromey

jargrep.c: Include getopt.h if it exists.

	* jargrep.c: Include getopt.h if it exists.
	(optind): Declare.
	* configure, config.h: Rebuilt.
	* configure.in: Check for getopt.h.

Co-Authored-By: Kelley Cook <kelleycook@home.com>

From-SVN: r38294
parent e35990c4
2000-12-15 Tom Tromey <tromey@redhat.com>
Kelley Cook <kelleycook@home.com>
* jargrep.c: Include getopt.h if it exists.
(optind): Declare.
* configure, config.h: Rebuilt.
* configure.in: Check for getopt.h.
2000-12-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in (fastjar_warn_cflags): Set when using gcc.
......
......@@ -76,7 +76,40 @@ ZINCS = @ZINCS@
ZLIBS = @ZLIBS@
fastjar_warn_cflags = @fastjar_warn_cflags@
AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "JC1FLAGS=$(JC1FLAGS)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "prefix=$(prefix)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "NM=$(NM)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "DESTDIR=$(DESTDIR)"
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"JC1FLAGS=$(JC1FLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"prefix=$(prefix)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"NM=$(NM)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"DESTDIR=$(DESTDIR)"
INCLUDES = -I. -I$(top_srcdir) $(ZINCS)
......@@ -116,7 +149,7 @@ configure.in install-defs.sh.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gnutar
TAR = tar
GZIP_ENV = --best
SOURCES = $(fastjar_SOURCES) $(grepjar_SOURCES)
OBJECTS = $(fastjar_OBJECTS) $(grepjar_OBJECTS)
......
......@@ -34,6 +34,9 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
......
......@@ -21,7 +21,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)
AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h getopt.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_OFF_T
......
/*
jargrep.c - main functions for jargrep utility
Copyright (C) 1999 Bryan Burns
Copyright (C) 1999, 2000 Bryan Burns
Copyright (C) 2000 Cory Hollingsworth
Parts of this program are base on Bryan Burns work with fastjar
......@@ -21,9 +21,37 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: jargrep.c,v 1.2 2000/12/11 02:59:55 apbianco Exp $
/* $Id: jargrep.c,v 1.3 2000/12/14 18:45:35 ghazi Exp $
$Log: jargrep.c,v $
Revision 1.3 2000/12/14 18:45:35 ghazi
Warning fixes:
* compress.c: Include stdlib.h and compress.h.
(rcsid): Delete.
(report_str_error): Make static.
(ez_inflate_str): Delete unused variable. Add parens in if-stmt.
(hrd_inflate_str): Likewise.
* compress.h (init_compression, end_compression, init_inflation,
end_inflation): Prototype void arguments.
* dostime.c (rcsid): Delete.
* jargrep.c: Include ctype.h, stdlib.h, zlib.h and compress.h.
Make functions static. Cast ctype function argument to `unsigned
char'. Add parens in if-stmts. Constify.
(Usage): Change into a macro.
(jargrep): Remove unused parameter.
* jartool.c: Constify. Add parens in if-stmts. Align
signed/unsigned char pointers in functions calls using casts.
(rcsid): Delete.
(list_jar): Fix printf format specifier.
(usage): Chop long string into bits. Reformat.
* pushback.c (rcsid): Delete.
Revision 1.2 2000/12/11 02:59:55 apbianco
2000-12-10 Robert Lipe <robertlipe@usa.net>
......@@ -71,10 +99,14 @@ will test some other platforms later.
#include "zipfile.h"
#include "zlib.h"
#include "compress.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#define Usage "Usage: %s [-bcinsw] <-e regexp | regexp> file(s)\n"
extern char *optarg;
extern int optind;
/*
Function name: opt_valid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment