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]

Patch to libf2c/libU77 to fix irix6.2 compilation W/_XOPEN_SOURCE


The recent change to libU77/configure.in to always define
_XOPEN_SOURCE seems to cause a build failure on irix6.2 because that
macro definition prevents "struct timeval" from being declared when
compiling libU77/datetime_.c.

To fix it, we also need _XOPEN_SOURCE_EXTENDED set to 1.

In addition, I moved the definitions to the top of configure.in
because they may affect the results of later autoconf tests.

Bootstrapped on Irix6.2.  Okay to install?

		--Kaveh


2001-07-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* libU77/configure.in (_XOPEN_SOURCE, _FILE_OFFSET_BITS): Move
	these defines before tests which might be affected by them.
	(_XOPEN_SOURCE_EXTENDED): Define.

	* libU77/configure, libU77/config.hin: Regenerate.

diff -rup orig/egcs-CVS20010711/libf2c/libU77/configure.in egcs-CVS20010711/libf2c/libU77/configure.in
--- orig/egcs-CVS20010711/libf2c/libU77/configure.in	Sun Jul  8 07:30:41 2001
+++ egcs-CVS20010711/libf2c/libU77/configure.in	Thu Jul 12 10:58:32 2001
@@ -23,6 +23,13 @@ AC_PREREQ(2.12.1)
 AC_INIT(access_.c)
 AC_CONFIG_HEADER(config.h:config.hin)
 
+# These defines are necessary to get 64-bit file size support.
+
+AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics])
+# The following is needed by irix6.2 so that struct timeval is declared.
+AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics])
+AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
+
 dnl Checks for programs.
 
 dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
@@ -107,10 +114,5 @@ AC_SUBST(MAYBES)
 AC_SUBST(CROSS)
 AC_SUBST(RANLIB)
 AC_SUBST(RANLIB_TEST)
-
-# These defines are necessary to get 64-bit file size support.
-
-AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics])
-AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
 
 AC_OUTPUT(Makefile)


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