[M3commit] CVS Update: cm3

Tony Hosking hosking at cs.purdue.edu
Sun Jan 4 05:54:48 CET 2009


Why not just switch between 32-bit and 64-bit versions.

Antony Hosking | Associate Professor | Computer Science | Purdue  
University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484



On 4 Jan 2009, at 13:22, Jay wrote:

> But how about if we always #define _FILE_OFFSET_BITS 64 and use C  
> wrappers?
>   As I have done.
> Or externs with "64" appended, but that prevents me from using one  
> set of .i3 files.
>
> I mean, I know there are "modes" with 32 bit off_t, but we should  
> really strive not to use them, if given a choice, eh?
>
> You think there are any systems we will ever care about that don't  
> offer a 64 bit off_t (or off64_t, or whatever).
>
>  - Jay
>
>
> From: hosking@
> To: jkrell@
> Date: Sun, 4 Jan 2009 12:57:28 +1100
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
>
> On some platforms off_t is not 64 bits.  This from Solaris (see  
> off_t==long):
>
> #if defined(_LARGEFILE_SOURCE) || defined(_XPG5)
> #ifndef _OFF_T
> #define _OFF_T
> #if defined(_LP64) || _FILE_OFFSET_BITS == 32
> typedef long            off_t;
> #else
> typedef __longlong_t    off_t;
> #endif
> #ifdef  _LARGEFILE64_SOURCE
> #ifdef _LP64
> typedef off_t           off64_t;
> #else
> typedef __longlong_t    off64_t;
> #endif
> #endif /* _LARGEFILE64_SOURCE */
> #endif /* _OFF_T */
> #endif /* _LARGEFILE_SOURCE *
>
>
> Antony Hosking | Associate Professor | Computer Science | Purdue  
> University
> 305 N. University Street | West Lafayette | IN 47907 | USA
> Office +1 765 494 6001 | Mobile +1 765 427 5484
>
>
>
> On 4 Jan 2009, at 01:53, Jay Krell wrote:
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 09/01/04 01:53:03
>
> Modified files:
> cm3/m3-libs/m3core/src/unix/Common/: Unix.i3 Utypes.i3
> cm3/m3-libs/m3core/src/unix/cygwin/: Usysdep.i3
> cm3/m3-libs/m3core/src/unix/linux-common/: Usysdep.i3
> cm3/m3-libs/m3core/src/unix/openbsd-common/: Usysdep.i3
>
> Log message:
> significant reduction in sysdep content
>
> off_t is always 64 bits (or at least let's hope so)
> the dir/stat flags are mostly all the same,
> except for a few that are zero on cygwin
>
> M[RWX][OWNER GROUP OTHER]
> [FXWR]_OK
> F_SETFD, F_GETFL, F_SETFL
> FIONREAD
> ITIMER_REAL
> ITIMER_VIRTUAL
>
> Some of this might be by chance and not by-standard,
> so under review for new platforms, and probably should be verified
> during native builds.
>
> note that OS/2 has a different S_IFMT but not quite relevant here
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20090104/008342e2/attachment-0002.html>


More information about the M3commit mailing list