This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Don't unconditionally define _LARGEFILE_SOURCE


This patch

2014-08-01  Pascal Obry  <obry@adacore.com>

        * cstreams.c: Only enable large file support on know supported
        platforms. Add missing defines/includes.

broke Ada bootstrap on Solaris:

/vol/gcc/src/hg/trunk/local/gcc/ada/cstreams.c:34:0: error: "_LARGEFILE_SOURCE" redefined [-Werror]
 #define _LARGEFILE_SOURCE
 ^
<built-in>: note: this is the location of the previous definition

Fixed as follows, i386-pc-solaris2.10 bootstrap is past the failure now.

Ok for mainline?

	Rainer


2014-08-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/ada:
	* cstreams.c (_LARGEFILE_SOURCE): Guard definition.

diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
--- a/gcc/ada/cstreams.c
+++ b/gcc/ada/cstreams.c
@@ -31,7 +31,9 @@
 
 /* Routines required for implementing routines in Interfaces.C.Streams.  */
 
+#ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
+#endif
 #define _FILE_OFFSET_BITS 64
 /* the define above will make off_t a 64bit type on GNU/Linux */
 
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]