From hin-tak.leung at cimr.cam.ac.uk  Tue Dec 19 12:35:51 2006
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Tue, 19 Dec 2006 11:35:51 +0000
Subject: [Rd] Error compiling on HP-UX
In-Reply-To: <200612191213.30590.pascal.niklaus@ipw.agrl.ethz.ch>
References: <200612181434.17135.pascal.niklaus@ipw.agrl.ethz.ch>
	<4586C4E2.2050903@cimr.cam.ac.uk>
	<200612191202.21114.pascal.niklaus@ipw.agrl.ethz.ch>
	<200612191213.30590.pascal.niklaus@ipw.agrl.ethz.ch>
Message-ID: <4587CE97.3040109@cimr.cam.ac.uk>

Hmm, HP-UX on IA64 is 64-bit or not? It looks as if it can operate
in 32-bit mode or run 32-bit binaries. It would be useful if you run
this:

gcc -E -dM - < /dev/null > /tmp/macrolist

and post the compiler's internal macro list.

Pascal A. Niklaus wrote:
>> _APP32_64BIT_OFF_T gets defined in sys/stdsyms.h:
>> (I've put the file at http://azug.minpet.unibas.ch/~pascal/R/stdsyms.h)
>>
>> # ifdef _FILE_OFFSET_BITS
>> #  if _FILE_OFFSET_BITS == 64
>> #    define _FILE64		/* _FILE64 is obsolescent; don't use it */
>> #    define __64BIT_OFF_T
>> #    if !defined(__LP64__)
>> #       define _APP32_64BIT_OFF_T
>> #    endif
>> #  else
>> #    if _FILE_OFFSET_BITS != 32
>> 	#error "_FILE_OFFSET_BITS defined to invalid number!!"
>> #    endif
>> #  endif/* _FILE_OFFSET_BITS == 64 */
>> # endif /* _FILE_OFFSET_BITS */
>>
>> Does that mean that the platform include files are broken or is this a
>> problem with the way they are included in R? I fear I have no means to
>> change the /usr/include/... files on that machine.
> 
> Hmm, I probably did not show the relevant #ifdef into which this is nested:
> 
> /* Large (64-bit) Files symbols */
> 
> #if defined(__STDC_EXT__) || !defined(__STDC__) || defined(__LP64__)
> 
> # ifdef __LP64__
> #   ifndef _FILE_OFFSET_BITS
> #     define _FILE_OFFSET_BITS 64 
> #   else
> #    if _FILE_OFFSET_BITS != 64
>       #error "_FILE_OFFSET_BITS definition incompatible with __LP64__."
> #    endif
> #   endif /* _FILE_OFFSET_BITS */
> 
> #   ifndef _PSTAT64
> #     define _PSTAT64 
> #   endif /* _PSTAT64 */
> 
> #   ifndef _KI64
> #     define _KI64
> #   endif /* _KI64 */
> 
> # endif /* __LP64__ */
> 
> # ifdef _FILE_OFFSET_BITS
> #  if _FILE_OFFSET_BITS == 64
> #    define _FILE64		/* _FILE64 is obsolescent; don't use it */
> #    define __64BIT_OFF_T
> #    if !defined(__LP64__)
> #       define _APP32_64BIT_OFF_T
> #    endif 
> #  else
> #    if _FILE_OFFSET_BITS != 32
> 	#error "_FILE_OFFSET_BITS defined to invalid number!!"
> #    endif
> #  endif/* _FILE_OFFSET_BITS == 64 */
> # endif /* _FILE_OFFSET_BITS */
> 
> # define _LFS_LARGEFILE   1
> # define _LFS64_LARGEFILE 1
> 
> # ifdef _LARGEFILE64_SOURCE
> #  ifndef _LARGEFILE_SOURCE
> #    define _LARGEFILE_SOURCE
> #  endif
> # endif
> 
> #else  /* strict ANSI */
> 
> # ifdef  _FILE_OFFSET_BITS
> #  if !defined(__LP64__) && _FILE_OFFSET_BITS == 64
>     #error "Large Files (ILP32) not supported in strict ANSI mode."
> #  endif
> # endif
> 
> # ifdef _LARGEFILE64_SOURCE
>     #error "Large File interfaces not supported in strict ANSI mode."
> # endif
> 
> # ifdef _PSTAT64
>     #error "wide mode pstat interfaces not supported in strict ANSI mode."
> # endif
> 
> #endif /* __STDC_EXT__ || ! __STDC__  || __LP64__ */
>



[Rd] Error compiling on HP-UX
Hin-Tak Leung