V3 PATCH: Update Solaris defines

Mark Mitchell mark@codesourcery.com
Mon May 7 20:06:00 GMT 2001


On Solaris 2.8, eb39.C was failing.  This was a regression from GCC
2.95.x. 

The reason is that V3 was defining _LARGEFILE64_SOURCE, but not
_LARGEFILE_SOURCE.  This makes include <stdio.h> not work on Solaris
2.8 because off64_t does not get defined, but:

  extern int	fseeko64(FILE *, off64_t, int);

does get declared.  Because Solaris 2.7 and 2.8 share a configuration
file, I've changed Solaris 2.7 as well.  Hopefully that won't hurt
anything.

It may be that this patch is needed on Solaris 2.[56] as well, but I
don't have access to any such systems.

The symptom is that eb39 fails with a parse error.  And, near the top
of stdio.h, you have a definition of off64_t that is dependent on both
_LARGEFILE_SOURCE and _LARGEFILE64_SOURCE.

Tested on sparc-sun-solaris2.8, applied on the mainline and on the
branch.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2001-05-07  Mark Mitchell  <mark@codesourcery.com>

	* config/os/solaris/solaris2.7/bits/os_defines.h
	(_LARGEFILE_SOURCE): Define it.

Index: os_defines.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/solaris/solaris2.7/bits/os_defines.h,v
retrieving revision 1.5
diff -c -p -r1.5 os_defines.h
*** os_defines.h	2000/11/13 00:25:40	1.5
--- os_defines.h	2001/05/08 02:59:43
***************
*** 33,38 ****
--- 33,39 ----
  
  // Need these to get sane definitions, esp. of 64-bit types and typedefs.
  #define _XOPEN_SOURCE        500
+ #define _LARGEFILE_SOURCE    1
  #define _LARGEFILE64_SOURCE  1
  #define __EXTENSIONS__
  



More information about the Libstdc++ mailing list