unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: bug-guile@gnu.org
Subject: Re: guile-1.8.3 Intel Mac Leopard compilation fails due to no off64_t
Date: Wed, 30 Jan 2008 23:10:12 +0000	[thread overview]
Message-ID: <87hcguucyz.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87lk66ud26.fsf@ossau.uklinux.net> (Neil Jerram's message of "Wed, 30 Jan 2008 23:08:17 +0000")

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

Neil Jerram <neil@ossau.uklinux.net> writes:

> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> In that light, and also because a Guile without LARGEFILE64 support is
>> surely better than no Guile at all, I think we should address this
>> problem for the Mac OSes (and also HP-UX, per [1]), by adding a
>> --disable-64-calls option to ./configure, whose effect will be to
>> prevent Guile from trying to use xxx64() sys and library calls.
>
> OK, attached is the patch that I propose for this.  Note that the
> option will actually be --without-64-calls, not --disable..., because
> --disable is supposed to be for optional features provided by the
> package being built.
>
> Any comments?
>
> Thanks,
>       Neil

Er... and here is that attachment. :-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: without-64-calls.patch --]
[-- Type: text/x-diff, Size: 3424 bytes --]

Index: configure.in
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/configure.in,v
retrieving revision 1.268.2.35
diff -u -r1.268.2.35 configure.in
--- configure.in	10 Oct 2007 16:58:56 -0000	1.268.2.35
+++ configure.in	30 Jan 2008 23:02:34 -0000
@@ -173,6 +173,47 @@
   [  --disable-elisp         omit Emacs Lisp support],,
   enable_elisp=yes)
 
+dnl  Added the following configure option in January 2008 following
+dnl  investigation of problems with "64" system and library calls on
+dnl  Darwin (MacOS X).  The libguile code (_scm.h) assumes that if a
+dnl  system has stat64, it will have all the other 64 APIs too; but on
+dnl  Darwin, stat64 is there but other APIs are missing.
+dnl 
+dnl  It also appears, from the Darwin docs, that most system call APIs
+dnl  there (i.e. the traditional ones _without_ "64" in their names) have
+dnl  been 64-bit-capable for a long time now, so it isn't necessary to
+dnl  use "64" versions anyway.  For example, Darwin's off_t is 64-bit.
+dnl 
+dnl  A similar problem has been reported for HP-UX:
+dnl  http://www.nabble.com/Building-guile-1.8.2-on-hpux-td13106681.html
+dnl 
+dnl  Therefore, and also because a Guile without LARGEFILE64 support is
+dnl  better than no Guile at all, we provide this option to suppress
+dnl  trying to use "64" calls.
+dnl 
+dnl  It may be that for some 64-bit function on Darwin/HP-UX we do need
+dnl  to use a "64" call, and hence that by using --without-64-calls we're
+dnl  missing out on that.  If so, someone can work on that in the future.
+dnl  For now, --without-64-calls allows Guile to build on OSs where it
+dnl  wasn't building before.
+AC_ARG_WITH([64-calls],
+  AC_HELP_STRING([--without-64-calls],
+                 [don't attempt to use system and library calls with "64" in their names]),
+  [use_64_calls=$withval],
+  [use_64_calls=yes
+   case $host in
+     *-apple-darwin* )
+       use_64_calls=no
+       ;;
+   esac])
+echo "use_64_calls=$use_64_calls"
+case "$use_64_calls" in
+  y* )
+    AC_DEFINE(GUILE_USE_64_CALLS, 1,
+      [Define to 1 in order to try to use "64" versions of system and library calls.])
+    ;;
+esac
+
 #--------------------------------------------------------------------
 
 dnl Check for dynamic linking
Index: libguile/_scm.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/_scm.h,v
retrieving revision 1.34.2.7
diff -u -r1.34.2.7 _scm.h
--- libguile/_scm.h	22 Jan 2008 21:12:05 -0000	1.34.2.7
+++ libguile/_scm.h	30 Jan 2008 23:02:35 -0000
@@ -114,7 +114,7 @@
 
 
 
-#if HAVE_STAT64
+#if GUILE_USE_64_CALLS && HAVE_STAT64
 #define CHOOSE_LARGEFILE(foo,foo64)     foo64
 #else
 #define CHOOSE_LARGEFILE(foo,foo64)     foo
Index: libguile/fports.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/fports.c,v
retrieving revision 1.137.2.6
diff -u -r1.137.2.6 fports.c
--- libguile/fports.c	28 Sep 2006 01:03:51 -0000	1.137.2.6
+++ libguile/fports.c	30 Jan 2008 23:02:35 -0000
@@ -670,7 +670,7 @@
    case on NetBSD apparently), then fport_seek_or_seek64 is right to be
    fport_seek already.  */
 
-#if HAVE_STAT64 && SIZEOF_OFF_T != SIZEOF_OFF64_T
+#if GUILE_USE_64_CALLS && HAVE_STAT64 && SIZEOF_OFF_T != SIZEOF_OFF64_T
 static off_t
 fport_seek (SCM port, off_t offset, int whence)
 {

      reply	other threads:[~2008-01-30 23:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  3:00 guile-1.8.3 Intel Mac Leopard compilation fails due to no off64_t Roger Mc Murtrie
2008-01-09  3:09 ` Roger Mc Murtrie
2008-01-10 18:40   ` Neil Jerram
2008-01-10 18:30 ` Neil Jerram
     [not found]   ` <881AD488-9F97-4F0D-B078-BEBD5BB684B8@iinet.net.au>
2008-01-10 22:53     ` Neil Jerram
2008-01-10 23:53       ` Roger Mc Murtrie
2008-01-10 23:59       ` Roger Mc Murtrie
     [not found]         ` <Pine.LNX.4.62.0801110725270.6071@ashmore.csail.mit.edu>
     [not found]           ` <Pine.LNX.4.62.0801110754040.6071@ashmore.csail.mit.edu>
2008-01-11 19:26             ` Make problem Mac OS X Roger Mc Murtrie
     [not found]               ` <Pine.LNX.4.62.0801120948290.23339@ashmore.csail.mit.edu>
2008-01-12 23:18                 ` Roger Mc Murtrie
2008-01-21 22:47               ` Neil Jerram
2008-01-22 22:10         ` guile-1.8.3 Intel Mac Leopard compilation fails due to no off64_t Neil Jerram
2008-01-22 22:57           ` Roger Mc Murtrie
2008-01-22 23:09             ` Neil Jerram
2008-01-22 23:42               ` Roger Mc Murtrie
2008-01-30 23:08           ` Neil Jerram
2008-01-30 23:10             ` Neil Jerram [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hcguucyz.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).