From: Christos Zoulas Date: Tue, 11 Jun 2002 17:15:52 +0000 (+0000) Subject: Large file support for linux. X-Git-Tag: FILE3_39~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dea27c95960376dbd016c304f88cdad98835dab3;p=file Large file support for linux. --- diff --git a/Makefile.in b/Makefile.in index 0ad0b672..e65f44fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -416,7 +416,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/src/file.c b/src/file.c index 10dc8fe5..5dc64a16 100644 --- a/src/file.c +++ b/src/file.c @@ -24,8 +24,8 @@ * * 4. This notice may not be removed or altered. */ -#include "file.h" +#include "file.h" #include #include #include @@ -61,7 +61,7 @@ #include "patchlevel.h" #ifndef lint -FILE_RCSID("@(#)$Id: file.c,v 1.62 2002/05/16 18:45:56 christos Exp $") +FILE_RCSID("@(#)$Id: file.c,v 1.63 2002/06/11 17:15:52 christos Exp $") #endif /* lint */ diff --git a/src/file.h b/src/file.h index 1c673315..2e875895 100644 --- a/src/file.h +++ b/src/file.h @@ -1,6 +1,6 @@ /* * file.h - definitions for file(1) program - * @(#)$Id: file.h,v 1.39 2002/05/16 18:45:56 christos Exp $ + * @(#)$Id: file.h,v 1.40 2002/06/11 17:15:52 christos Exp $ * * Copyright (c) Ian F. Darwin, 1987. * Written by Ian F. Darwin. @@ -29,6 +29,12 @@ #ifndef __file_h__ #define __file_h__ +#ifndef __linux__ +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#define _FILE_OFFSET_BITS 64 +#endif + #ifdef HAVE_CONFIG_H #include #endif diff --git a/src/is_tar.c b/src/is_tar.c index d6651fb3..2c84ca4a 100644 --- a/src/is_tar.c +++ b/src/is_tar.c @@ -5,23 +5,20 @@ * Public Domain version written 26 Aug 1985 John Gilmore (ihnp4!hoptoad!gnu). * * @(#)list.c 1.18 9/23/86 Public Domain - gnu - * $Id: is_tar.c,v 1.14 2002/05/16 18:45:56 christos Exp $ + * $Id: is_tar.c,v 1.15 2002/06/11 17:15:52 christos Exp $ * * Comments changed and some code/comments reformatted * for file command by Ian Darwin. */ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "file.h" #include #include #include #include "tar.h" -#include "file.h" #ifndef lint -FILE_RCSID("@(#)$Id: is_tar.c,v 1.14 2002/05/16 18:45:56 christos Exp $") +FILE_RCSID("@(#)$Id: is_tar.c,v 1.15 2002/06/11 17:15:52 christos Exp $") #endif #define isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) diff --git a/src/softmagic.c b/src/softmagic.c index dd3d9835..be042c93 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -25,6 +25,7 @@ * 4. This notice may not be removed or altered. */ +#include "file.h" #include #include #include @@ -33,10 +34,9 @@ #include #include -#include "file.h" #ifndef lint -FILE_RCSID("@(#)$Id: softmagic.c,v 1.48 2002/05/16 18:45:56 christos Exp $") +FILE_RCSID("@(#)$Id: softmagic.c,v 1.49 2002/06/11 17:15:52 christos Exp $") #endif /* lint */ static int match __P((struct magic *, uint32, unsigned char *, int));