<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<DIV>But how about if we always #define _FILE_OFFSET_BITS 64 and use C wrappers?</DIV>
<DIV>  As I have done. </DIV>
<DIV>Or externs with "64" appended, but that prevents me from using one set of .i3 files.</DIV>
<DIV> </DIV>
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>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).</DIV>
<DIV> </DIV>
<DIV> - Jay<BR><BR><BR>
<HR id=stopSpelling>
From: hosking@<BR>To: jkrell@<BR>Date: Sun, 4 Jan 2009 12:57:28 +1100<BR>CC: m3commit@elegosoft.com<BR>Subject: Re: [M3commit] CVS Update: cm3<BR><BR>On some platforms off_t is not 64 bits.  This from Solaris (see off_t==long):</DIV>
<DIV><BR></DIV>
<DIV>#if defined(_LARGEFILE_SOURCE) || defined(_XPG5)</DIV>
<DIV>#ifndef _OFF_T</DIV>
<DIV>#define _OFF_T</DIV>
<DIV>#if defined(_LP64) || _FILE_OFFSET_BITS == 32</DIV>
<DIV>typedef long            off_t;</DIV>
<DIV>#else</DIV>
<DIV>typedef __longlong_t    off_t;</DIV>
<DIV>#endif</DIV>
<DIV>#ifdef  _LARGEFILE64_SOURCE</DIV>
<DIV>#ifdef _LP64</DIV>
<DIV>typedef off_t           off64_t;</DIV>
<DIV>#else</DIV>
<DIV>typedef __longlong_t    off64_t;</DIV>
<DIV>#endif</DIV>
<DIV>#endif /* _LARGEFILE64_SOURCE */</DIV>
<DIV>#endif /* _OFF_T */</DIV>
<DIV>#endif /* _LARGEFILE_SOURCE * </DIV>
<DIV>
<DIV><BR class=EC_webkit-block-placeholder></DIV>
<DIV><BR class=EC_webkit-block-placeholder></DIV>
<DIV><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV><FONT class=EC_Apple-style-span color=#0000ff><FONT class=EC_Apple-style-span face="Gill Sans"><SPAN class=EC_Apple-style-span style="COLOR: rgb(0,0,255); FONT-FAMILY: Gill Sans"><SPAN class=EC_Apple-style-span style="COLOR: rgb(0,0,255); FONT-FAMILY: Gill Sans">Antony Hosking</SPAN></SPAN></FONT></FONT><FONT class=EC_Apple-style-span face="Gill Sans"><SPAN class=EC_Apple-style-span style="FONT-FAMILY: Gill Sans"><SPAN class=EC_Apple-style-span style="FONT-FAMILY: Gill Sans"> | </SPAN></SPAN><SPAN class=EC_Apple-style-span style="FONT-FAMILY: Gill Sans"><SPAN class=EC_Apple-style-span style="FONT-FAMILY: Gill Sans">Associate Professor</SPAN></SPAN><SPAN class=EC_Apple-style-span style="FONT-FAMILY: Gill Sans"><SPAN class=EC_Apple-style-span style="FONT-FAMILY: Gill Sans"> | Computer Science | Purdue University</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=EC_Apple-style-span face=GillSans-Light><SPAN class=EC_Apple-style-span style="FONT-FAMILY: GillSans-Light">305 N. University Street | West Lafayette | IN 47907 | USA</SPAN></FONT></DIV>
<DIV><FONT class=EC_Apple-style-span face="Gill Sans" color=#0000ff><SPAN class=EC_Apple-style-span style="COLOR: rgb(0,0,255); FONT-FAMILY: Gill Sans"><SPAN class=EC_Apple-style-span style="COLOR: rgb(0,0,255); FONT-FAMILY: Gill Sans">Office</SPAN></SPAN></FONT><FONT class=EC_Apple-style-span face=GillSans-Light><SPAN class=EC_Apple-style-span style="FONT-FAMILY: GillSans-Light"><SPAN class=EC_Apple-style-span style="FONT-FAMILY: GillSans-Light"> +1 765 494 6001 | </SPAN></SPAN></FONT><FONT class=EC_Apple-style-span face="Gill Sans" color=#0000ff><SPAN class=EC_Apple-style-span style="COLOR: rgb(0,0,255); FONT-FAMILY: Gill Sans"><SPAN class=EC_Apple-style-span style="COLOR: rgb(0,0,255); FONT-FAMILY: Gill Sans">Mobile</SPAN></SPAN></FONT><FONT class=EC_Apple-style-span face=GillSans-Light><SPAN class=EC_Apple-style-span style="FONT-FAMILY: GillSans-Light"><SPAN class=EC_Apple-style-span style="FONT-FAMILY: GillSans-Light"> +1 765 427 5484</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=EC_Apple-style-span face=GillSans-Light><BR class=EC_khtml-block-placeholder></FONT></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN><BR class=EC_Apple-interchange-newline></SPAN></DIV></SPAN></DIV><BR>
<DIV>
<DIV>On 4 Jan 2009, at 01:53, Jay Krell wrote:</DIV><BR class=EC_Apple-interchange-newline>
<BLOCKQUOTE>
<DIV>CVSROOT:<SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"> </SPAN>/usr/cvs<BR>Changes by:<SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"> </SPAN>jkrell@birch.<SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"> </SPAN>09/01/04 01:53:03<BR><BR>Modified files:<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>cm3/m3-libs/m3core/src/unix/Common/: Unix.i3 Utypes.i3 <BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>cm3/m3-libs/m3core/src/unix/cygwin/: Usysdep.i3 <BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>cm3/m3-libs/m3core/src/unix/linux-common/: Usysdep.i3 <BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>cm3/m3-libs/m3core/src/unix/openbsd-common/: Usysdep.i3 <BR><BR>Log message:<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>significant reduction in sysdep content<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN><BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>off_t is always 64 bits (or at least let's hope so)<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>the dir/stat flags are mostly all the same,<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>except for a few that are zero on cygwin<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN><BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>M[RWX][OWNER GROUP OTHER]<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>[FXWR]_OK<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>F_SETFD, F_GETFL, F_SETFL<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>FIONREAD<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>ITIMER_REAL<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>ITIMER_VIRTUAL<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN><BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>Some of this might be by chance and not by-standard,<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>so under review for new platforms, and probably should be verified<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>during native builds.<BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN><BR><SPAN class=EC_Apple-tab-span style="WHITE-SPACE: pre"></SPAN>note that OS/2 has a different S_IFMT but not quite relevant here<BR></DIV></BLOCKQUOTE></DIV><BR></DIV></body>
</html>