View | Details | Raw Unified
Collapse All | Expand All

(-) rzip-2.0/Makefile.in (-3 / +4 lines)
 Lines 3-10    Link Here 
prefix=@prefix@
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix=@exec_prefix@
INSTALL_BIN=$(exec_prefix)/bin
INSTALL_BIN=$(DESTDIR)/$(exec_prefix)/bin
INSTALL_MAN=$(prefix)/man
INSTALL_MAN=$(DESTDIR)/$(prefix)/man
LIBS=@LIBS@
LIBS=@LIBS@
CC=@CC@
CC=@CC@
 Lines 20-26    Link Here 
.SUFFIXES:
.SUFFIXES:
.SUFFIXES: .c .o
.SUFFIXES: .c .o
OBJS= rzip.o runzip.o main.o stream.o util.o crc32.o
OBJS= rzip.o runzip.o strutils.o main.o stream.o util.o crc32.o
# note that the -I. is needed to handle config.h when using VPATH
# note that the -I. is needed to handle config.h when using VPATH
.c.o:
.c.o:
 Lines 35-40    Link Here 
	${INSTALLCMD} -m 755 rzip ${INSTALL_BIN}
	${INSTALLCMD} -m 755 rzip ${INSTALL_BIN}
	-mkdir -p ${INSTALL_MAN}/man1
	-mkdir -p ${INSTALL_MAN}/man1
	${INSTALLCMD} -m 644 $(srcdir)/rzip.1 ${INSTALL_MAN}/man1/
	${INSTALLCMD} -m 644 $(srcdir)/rzip.1 ${INSTALL_MAN}/man1/
	-ln -s ${INSTALL_BIN}/rzip runzip
rzip: $(OBJS)
rzip: $(OBJS)
	$(CC) $(CFLAGS) -o rzip $(OBJS) $(LIBS)
	$(CC) $(CFLAGS) -o rzip $(OBJS) $(LIBS)
(-) rzip-2.0/configure.in (-20 / +10 lines)
 Lines 2-7    Link Here 
AC_INIT(main.c)
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(config.h)
# test prior to AC_PROG_CC, since it sets cflags on it's own.
if test x"CFLAGS" = x
then
	DEFAULT_CFLAGS="-g -Wall -O3"
fi
dnl Checks for programs.
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_INSTALL
 Lines 9-18    Link Here 
AC_SYS_LARGEFILE
AC_SYS_LARGEFILE
# Thanks to Martin Pool
# Thanks to Martin Pool
if test x"$GCC" = xyes 
if test x"$GCC" = xyes && test x"$DEFAULT_CFLAGS" != x
then
then
    CFLAGS="-g -Wall -O3"
    CFLAGS="-g -Wall -O3"
    AC_MSG_NOTICE([Setting gcc options: $CFLAGS])
    AC_MSG_RESULT([Setting default cflags: $CFLAGS])
fi
fi
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/unistd.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/time.h sys/unistd.h unistd.h)
 Lines 26-56    Link Here 
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(short)
AC_CACHE_CHECK([for large file support],rzip_cv_HAVE_LARGE_FILES,[
AC_SYS_LARGEFILE
AC_TRY_RUN([
#include <stdio.h>
#include <sys/types.h>
main() { return (sizeof(off_t) == 4); }],
rzip_cv_HAVE_LARGE_FILES=yes,
rzip_cv_HAVE_LARGE_FILES=no,
rzip_cv_HAVE_LARGE_FILES=cross)])
if test x"$rzip_cv_HAVE_LARGE_FILES" = x"yes"; then
    AC_DEFINE(HAVE_LARGE_FILES, 1, [ ])
fi
AC_C_INLINE
AC_C_INLINE
AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, , 
AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, , 
        AC_MSG_ERROR([Could not find bz2 library - please install libbz2-devel]))
        AC_MSG_ERROR([Could not find bz2 library - please install libbz2-devel]))
echo $ac_n "checking for errno in errno.h... $ac_c"
AC_TRY_COMPILE([#include <errno.h>],[int i = errno],
echo yes; AC_DEFINE(HAVE_ERRNO_DECL),
echo no)
AC_CHECK_FUNCS(mmap strerror)
AC_CHECK_FUNCS(mmap strerror)
AC_CHECK_FUNCS(getopt_long)
AC_CHECK_FUNCS(getopt_long)
AC_CHECK_FUNCS(strndup)
AC_OUTPUT(Makefile)
AC_OUTPUT(Makefile)
(-) rzip-2.0/main.c (-1 / +2 lines)
 Lines 18-23    Link Here 
/* rzip compression - main program */
/* rzip compression - main program */
#include "rzip.h"
#include "rzip.h"
#include "strutils.h"
static void usage(void)
static void usage(void)
{
{
 Lines 58-64    Link Here 
		fatal("bad magic file descriptor!?\n");
		fatal("bad magic file descriptor!?\n");
	}
	}
#if HAVE_LARGE_FILES
#if _LARGE_FILES
	v = htonl(st.st_size & 0xFFFFFFFF);
	v = htonl(st.st_size & 0xFFFFFFFF);
	memcpy(&magic[6], &v, 4);
	memcpy(&magic[6], &v, 4);
	v = htonl(st.st_size >> 32);
	v = htonl(st.st_size >> 32);
(-) rzip-2.0/rzip.h (-1 / +1 lines)
 Lines 94-100    Link Here 
#define strerror(i) sys_errlist[i]
#define strerror(i) sys_errlist[i]
#endif
#endif
#ifndef HAVE_ERRNO_DECL
#if !defined(errno)
extern int errno;
extern int errno;
#endif
#endif
(-) rzip-2.0/strutils.c (+29 lines)
Line 0    Link Here 
/* 
   Copyright (C) 2005 Gentoo Foundation
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* string utilities that may be missing on various platforms */
#include "strutils.h"
#ifndef HAVE_STRNDUP
char* strndup(const char* s, size_t n) {
	char* ret = malloc(n + 1);
	if (ret == NULL) return(ret);
	ret[n] = '\0';
	return(memcpy(ret, s, n));
}
#endif
(-) rzip-2.0/strutils.h (+31 lines)
Line 0    Link Here 
/* 
   Copyright (C) 2005 Gentoo Foundation
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* string utilities that may be missing on various platforms */
#ifndef _HEADER_STRUTIL
#define _HEADER_STRUTIL 1
#include <stdlib.h>
#include <string.h>
#include "config.h"
# ifndef HAVE_STRNDUP
char* strndup(const char* s, size_t n);
# endif
#endif