<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY>
On Sun, 2011-11-13 at 18:45 +0200, Martin-&#201;ric Racine wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
2011/11/13 Gaetan Nadon &lt;<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>&gt;:
&gt; On Sun, 2011-11-13 at 16:09 +0200, Martin-&#201;ric Racine wrote:
&gt;
&gt; 2011/11/13 Mart Raudsepp &lt;<A HREF="mailto:leio@gentoo.org">leio@gentoo.org</A>&gt;:
&gt;&gt; I don't have any particular idea about the FreeBSD side of things (does
&gt;&gt; BSD really not have separate 64bit largefile offset handling routines?).
&gt;
&gt; Apparently not. 64-bit variants of everything seem to be defined via
&gt; sys/types.h, but neither lseek or off_t seem to have any defined.
</PRE>
</BLOCKQUOTE>
I don't fully understand, but the issue is explained here:<BR>
<A HREF="http://freecode.com/articles/largefile-support-problems">http://freecode.com/articles/largefile-support-problems</A><BR>
<BR>
FreeBSD has dropped 32bit support unlike Linux. So off_t is always 64 bit.<BR>
<BR>
Who ever wants to port the code to FreeBSD should look at the X server code which runs on several platforms. It does not use lseek64 or off64_t. It does use AC_SYS_LARGEFILE in configure.ac which provides some support that I don't really understand. It will probably affect the z4l.c file as well.<BR>
<BR>
So what we did with __FreeBSD__ is just plain wrong.<BR>
<BR>
One question that pops to my mind is what happens to the 32 bit AMD assembler code in durango.c? I recall seeing places where the code makes assumptions that the size is 32 when it turns out to be 64 on AMD64. I think there will be some 32/64 sanitizing done. Perhaps a good place to start would be to get a clean compile on AMD64. I am assuming here that FreeBSD is a 64 bit OS. I don't have real answers, just raising relevant questions!
<BLOCKQUOTE TYPE=CITE>
<PRE>
&gt;
&gt;&gt; But seeing as all this patch really does, is disable z4l code if host is
&gt;&gt; bsd, then we could very easily go one step further and provide a
&gt;&gt; AC_ARG_ENABLE or AC_ARG_WITH (whichever is more appropriate here) option
&gt;
&gt; I was going to propose that next. Even if it &quot;can be built&quot;, it does not
&gt; &quot;have to be built&quot;. So --enable-z4l (or ztv if more descriptive) would be
&gt; added on the command line for system builders who do wish to have this
&gt; feature. Based on your comments, it looks like it would be disabled by
&gt; default.

Please note that the 64-bit function equivalents are needed to compile
the Geode driver on FreeBSD, regardless of whether ztv is included or
not. At this much I understood from Arrigo's mail, last time he tried
submitting a patch.

&gt; Unrelated here, just my opinion. Having done a bit of googling, it looks
&gt; like there are more OS or linux flavors where Geode is used. I saw this
&gt; board used in the industry as an embedded PC. I noticed Gentoo builds on
&gt; Geode. More users is always good. That means writing more portable code and
&gt; revisiting some assumptions.

It has mostly been used on Linux, but there was demand also on the BSD
side. AFAIK they got around implementing platform device support in
their kernels, but I never heard of any patch for the X driver.

Martin-&#201;ric
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>