From fa89f7636484be70750a8e818f9959f9abe21849 Mon Sep 17 00:00:00 2001 From: Fons Rademakers <Fons.Rademakers@cern.ch> Date: Mon, 19 Jan 2004 22:42:07 +0000 Subject: [PATCH] add large file support for gcc 2.95 and 2.96 (was not supported before). git-svn-id: http://root.cern.ch/svn/root/trunk@7949 27541ba8-7e3a-0410-8455-c3a389f83636 --- base/inc/RConfig.h | 9 +++++---- base/src/TFile.cxx | 9 ++++++--- io/src/TFile.cxx | 9 ++++++--- net/src/TFTP.cxx | 4 +++- rootd/src/rootd.cxx | 3 ++- unix/src/TUnixSystem.cxx | 3 ++- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/base/inc/RConfig.h b/base/inc/RConfig.h index 1af49d40408..1e8136ff595 100644 --- a/base/inc/RConfig.h +++ b/base/inc/RConfig.h @@ -1,4 +1,4 @@ -/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.60 2004/01/10 10:52:29 brun Exp $ */ +/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.61 2004/01/19 18:26:13 rdm Exp $ */ /************************************************************************* * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * @@ -152,6 +152,9 @@ #endif #if defined(linux) +# ifndef _LARGEFILE64_SOURCE +# define _LARGEFILE64_SOURCE +# endif # include <features.h> # if __GNU_LIBRARY__ == 6 # ifndef R__GLIBC @@ -161,6 +164,7 @@ # if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 # define R__NONSCALARFPOS2 # define R__USESTHROW +# define R__SEEK64 # endif #endif @@ -172,9 +176,6 @@ # define __i486__ /* turn off if you really want to run on an i386 */ # endif # define NEED_SIGJMP -# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 -# define R__SEEK64 -# endif #endif #if defined(linux) && defined(__ia64__) diff --git a/base/src/TFile.cxx b/base/src/TFile.cxx index 7b385cb5f3c..4b4486c6f95 100644 --- a/base/src/TFile.cxx +++ b/base/src/TFile.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TFile.cxx,v 1.112 2004/01/19 18:55:29 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TFile.cxx,v 1.113 2004/01/19 18:58:22 brun Exp $ // Author: Rene Brun 28/11/94 /************************************************************************* @@ -8,6 +8,9 @@ * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ + +#include "RConfig.h" + #include <fcntl.h> #include <errno.h> #include <sys/stat.h> @@ -224,13 +227,12 @@ TFile::TFile(const char *fname1, Option_t *option, const char *ftitle, Int_t com Bool_t recreate = (fOption == "RECREATE") ? kTRUE : kFALSE; Bool_t update = (fOption == "UPDATE") ? kTRUE : kFALSE; Bool_t read = (fOption == "READ") ? kTRUE : kFALSE; - Bool_t devnull = kFALSE; if (!create && !recreate && !update && !read) { read = kTRUE; fOption = "READ"; } - const char *fname; + Bool_t devnull = kFALSE; if (!fname1 || !strlen(fname1)) { Error("TFile", "file name is not specified"); @@ -249,6 +251,7 @@ TFile::TFile(const char *fname1, Option_t *option, const char *ftitle, Int_t com SetBit(kDevNull); } + const char *fname; if ((fname = gSystem->ExpandPathName(fname1))) { SetName(fname); delete [] (char*)fname; diff --git a/io/src/TFile.cxx b/io/src/TFile.cxx index 7b385cb5f3c..4b4486c6f95 100644 --- a/io/src/TFile.cxx +++ b/io/src/TFile.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TFile.cxx,v 1.112 2004/01/19 18:55:29 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TFile.cxx,v 1.113 2004/01/19 18:58:22 brun Exp $ // Author: Rene Brun 28/11/94 /************************************************************************* @@ -8,6 +8,9 @@ * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ + +#include "RConfig.h" + #include <fcntl.h> #include <errno.h> #include <sys/stat.h> @@ -224,13 +227,12 @@ TFile::TFile(const char *fname1, Option_t *option, const char *ftitle, Int_t com Bool_t recreate = (fOption == "RECREATE") ? kTRUE : kFALSE; Bool_t update = (fOption == "UPDATE") ? kTRUE : kFALSE; Bool_t read = (fOption == "READ") ? kTRUE : kFALSE; - Bool_t devnull = kFALSE; if (!create && !recreate && !update && !read) { read = kTRUE; fOption = "READ"; } - const char *fname; + Bool_t devnull = kFALSE; if (!fname1 || !strlen(fname1)) { Error("TFile", "file name is not specified"); @@ -249,6 +251,7 @@ TFile::TFile(const char *fname1, Option_t *option, const char *ftitle, Int_t com SetBit(kDevNull); } + const char *fname; if ((fname = gSystem->ExpandPathName(fname1))) { SetName(fname); delete [] (char*)fname; diff --git a/net/src/TFTP.cxx b/net/src/TFTP.cxx index 0c53690b41c..e0e757081f5 100644 --- a/net/src/TFTP.cxx +++ b/net/src/TFTP.cxx @@ -1,4 +1,4 @@ -// @(#)root/net:$Name: $:$Id: TFTP.cxx,v 1.18 2003/12/30 13:16:51 brun Exp $ +// @(#)root/net:$Name: $:$Id: TFTP.cxx,v 1.19 2004/01/19 18:31:13 rdm Exp $ // Author: Fons Rademakers 13/02/2001 /************************************************************************* @@ -19,6 +19,8 @@ // // ////////////////////////////////////////////////////////////////////////// +#include "RConfig.h" + #include <fcntl.h> #include <errno.h> #include <sys/stat.h> diff --git a/rootd/src/rootd.cxx b/rootd/src/rootd.cxx index 57339224d11..0332bfbd720 100644 --- a/rootd/src/rootd.cxx +++ b/rootd/src/rootd.cxx @@ -1,4 +1,4 @@ -// @(#)root/rootd:$Name: $:$Id: rootd.cxx,v 1.75 2003/12/11 11:23:07 rdm Exp $ +// @(#)root/rootd:$Name: $:$Id: rootd.cxx,v 1.76 2004/01/19 18:31:13 rdm Exp $ // Author: Fons Rademakers 11/08/97 /************************************************************************* @@ -204,6 +204,7 @@ // 8 -> 9: change in Kerberos authentication protocol #include "config.h" +#include "RConfig.h" #include <ctype.h> #include <fcntl.h> diff --git a/unix/src/TUnixSystem.cxx b/unix/src/TUnixSystem.cxx index c6a8b3a893a..9e01b42691b 100644 --- a/unix/src/TUnixSystem.cxx +++ b/unix/src/TUnixSystem.cxx @@ -1,4 +1,4 @@ -// @(#)root/unix:$Name: $:$Id: TUnixSystem.cxx,v 1.85 2004/01/05 17:50:40 brun Exp $ +// @(#)root/unix:$Name: $:$Id: TUnixSystem.cxx,v 1.86 2004/01/19 18:31:13 rdm Exp $ // Author: Fons Rademakers 15/09/95 /************************************************************************* @@ -21,6 +21,7 @@ #include "config.h" #endif +#include "RConfig.h" #include "TUnixSystem.h" #include "TROOT.h" #include "TError.h" -- GitLab