Bugzilla bug #4761: define _LARGEFILE64_SOURCE explicitly if we are
authorwtc%netscape.com
Wed, 19 May 1999 00:40:28 +0000
changeset 616 ffebdef4fafe3ff5b3366c455be2bbbed6ccdc98
parent 615 0747057e2cab51d05d96695d4b42d840777c23c4
child 617 c8d426520b310d68732e9066699f702934b0745a
push idunknown
push userunknown
push dateunknown
bugs4761
Bugzilla bug #4761: define _LARGEFILE64_SOURCE explicitly if we are on Solaris 2.6 or 2.7 and using gcc. Thanks to vdemarco@novazen.com and mcafee@netscape.com for reporting this problem.
config/SunOS5.mk
--- a/config/SunOS5.mk
+++ b/config/SunOS5.mk
@@ -101,16 +101,26 @@ CPU_ARCH_TAG		= _$(CPU_ARCH)
 
 ifeq (5.5,$(findstring 5.5,$(OS_RELEASE)))
 OS_DEFINES		+= -DSOLARIS2_5
 else
 ifeq (,$(filter-out 5.3 5.4,$(OS_RELEASE)))
 OS_DEFINES		+= -D_PR_NO_LARGE_FILES
 else
 OS_DEFINES		+= -D_PR_HAVE_OFF64_T
+# The lfcompile64(5) man page on Solaris 2.6 says:
+#     For applications that do not wish to conform to the POSIX or
+#     X/Open  specifications,  the  64-bit transitional interfaces
+#     are available by default.  No compile-time flags need to  be
+#     set.
+# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
+# The native compiler, gcc 2.8.x, and egcs don't have this problem.
+ifdef NS_USE_GCC
+OS_DEFINES		+= -D_LARGEFILE64_SOURCE
+endif
 endif
 endif
 
 ifneq ($(LOCAL_THREADS_ONLY),1)
 OS_DEFINES		+= -D_REENTRANT -DHAVE_POINTER_LOCALTIME_R
 endif
 
 # Purify doesn't like -MDupdate