unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* (fcntl fd F_GETLK ...) from Guile
@ 2007-08-31 12:58 Kaloian Doganov
  2007-08-31 23:50 ` Kevin Ryde
  2007-09-02  3:34 ` Mike Gran
  0 siblings, 2 replies; 12+ messages in thread
From: Kaloian Doganov @ 2007-08-31 12:58 UTC (permalink / raw)
  To: guile-user

Is there a way to use fcntl's F_GETLK command from Guile?  According
to the docs [1], only the following commands are available:

    F_DUPFD
    F_GETFD
    F_SETFD
    F_GETFL
    F_SETFL
    F_GETOWN
    F_SETOWN
    FD_CLOEXEC

Neighter F_GETLK nor F_SETLK is there.  Am I missing something?  May
be the file locking mechanism is available elsewhere in the Guile
libs?

[1] http://www.gnu.org/software/guile/manual/html_node/Ports-and-File-Descriptors.html#index-fcntl-2899

-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
@ 2007-08-31 14:19 dsmich
  0 siblings, 0 replies; 12+ messages in thread
From: dsmich @ 2007-08-31 14:19 UTC (permalink / raw)
  To: Kaloian Doganov; +Cc: guile-user


---- Kaloian Doganov <kaloian@doganov.org> wrote: 
> Is there a way to use fcntl's F_GETLK command from Guile?  According
> to the docs [1], only the following commands are available:
> 
>     F_DUPFD
>     F_GETFD
>     F_SETFD
>     F_GETFL
>     F_SETFL
>     F_GETOWN
>     F_SETOWN
>     FD_CLOEXEC
> 
> Neighter F_GETLK nor F_SETLK is there.  Am I missing something?


Yes, Guile seems to be missing those.  These are just numbers, so you can probably just:

  (define F_GETLK 5)
  (define F_SETLK 6)

or whatever the proper values are on your platform.

Here is a patch for libguile/filesys.c to add them.  Untested.

--- filesys.c.old       2006-10-03 23:35:07.000000000 -0400
+++ filesys.c   2007-08-31 10:14:01.118281135 -0400
@@ -1732,6 +1732,12 @@
 #ifdef F_SETFL  
   scm_c_define ("F_SETFL", scm_from_long (F_SETFL));
 #endif 
+#ifdef F_GETLK
+  scm_c_define ("F_GETLK", scm_from_long (F_GETLK));
+#endif 
+#ifdef F_SETLK
+  scm_c_define ("F_SETLK", scm_from_long (F_SETLK));
+#endif 
 #ifdef F_GETOWN  
   scm_c_define ("F_GETOWN", scm_from_long (F_GETOWN));
 #endif 


--Dale


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-08-31 12:58 (fcntl fd F_GETLK ...) from Guile Kaloian Doganov
@ 2007-08-31 23:50 ` Kevin Ryde
  2007-09-01  9:53   ` Kaloian Doganov
  2007-09-02  3:34 ` Mike Gran
  1 sibling, 1 reply; 12+ messages in thread
From: Kevin Ryde @ 2007-08-31 23:50 UTC (permalink / raw)
  To: guile-user

Kaloian Doganov <kaloian@doganov.org> writes:
>
> Neighter F_GETLK nor F_SETLK is there.

Yep, not there.  It'd need something for "struct flock" (and "struct
flock64" when available), they're not plain integers like the other
fcntl commands.

There's `flock' already for whole-file, if that's enough.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-08-31 23:50 ` Kevin Ryde
@ 2007-09-01  9:53   ` Kaloian Doganov
  2007-09-02  0:30     ` Kevin Ryde
  0 siblings, 1 reply; 12+ messages in thread
From: Kaloian Doganov @ 2007-09-01  9:53 UTC (permalink / raw)
  To: guile-user

Kevin Ryde <user42@zip.com.au> writes:

    It'd need something for "struct flock" (and "struct flock64" when
    available), they're not plain integers like the other fcntl
    commands.

Yes, currently I don't know how to represent this structure in Guile,
even with those define's suggested by dsmich:

    (define F_GETLK 5)
    (define F_SETLK 6)

Kevin Ryde <user42@zip.com.au> writes:
    
    There's `flock' already for whole-file, if that's enough.

I need to do record (range) locking, not whole-file locking, and I
hoped to do it with Guile.

-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
@ 2007-09-01 17:58 dsmich
  0 siblings, 0 replies; 12+ messages in thread
From: dsmich @ 2007-09-01 17:58 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: guile-user


---- Kevin Ryde <user42@zip.com.au> wrote: 
> Kaloian Doganov <kaloian@doganov.org> writes:
> >
> > Neighter F_GETLK nor F_SETLK is there.
> 
> Yep, not there.  It'd need something for "struct flock" (and "struct
> flock64" when available), they're not plain integers like the other
> fcntl commands.

Oops!  Sorry about that.  Just ignore my previous post.

-Dale



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-09-01  9:53   ` Kaloian Doganov
@ 2007-09-02  0:30     ` Kevin Ryde
  2007-09-03  8:10       ` Kaloian Doganov
  0 siblings, 1 reply; 12+ messages in thread
From: Kevin Ryde @ 2007-09-02  0:30 UTC (permalink / raw)
  To: guile-user

Kaloian Doganov <kaloian@doganov.org> writes:
>
> I need to do record (range) locking, not whole-file locking, and I
> hoped to do it with Guile.

If you don't mind breaking out a little C code it shouldn't be too hard.

(I can never remember which types of locks are voluntary or mandatory,
and which work over NFS or not, etc.  Myself I've only been using flock
on a lockfile to get whole-directory locking.)


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-08-31 12:58 (fcntl fd F_GETLK ...) from Guile Kaloian Doganov
  2007-08-31 23:50 ` Kevin Ryde
@ 2007-09-02  3:34 ` Mike Gran
  2007-09-03  8:08   ` Kaloian Doganov
  1 sibling, 1 reply; 12+ messages in thread
From: Mike Gran @ 2007-09-02  3:34 UTC (permalink / raw)
  To: Kaloian Doganov, guile-user

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

Kaloian-

--- Kaloian Doganov <kaloian@doganov.org> wrote:

> Is there a way to use fcntl's F_GETLK command from Guile?  According
> to the docs [1], only the following commands are available:
> 

I put together something.  I've attached the more important source
files here for reference, but, the buildable files are in 
http://lonelycactus.com/getlk-0.0.tar.gz

For me, it does "./configure && make && make install" on Linux, but
fails on Cygwin.  Cygwin fails because I don't know how to do DLLs.

Here's what it does on my machine.  Your mileage may vary.

bash-3.1$ guile
guile> (use-modules (getlk))
guile> (define fd (open-output-file "blammo"))
guile> (define lk (fcntl-lk fd F_SETLKW (list F_WRLCK SEEK_SET 0 0
(getpid))))
guile> lk
(1 0 0 0 11415)
guile> (set! lk (fcntl-lk fd F_SETLK (list F_UNLCK SEEK_SET 0 0
(getpid))))
guile> lk
(2 0 0 0 11415)
guile>
  
Good luck.

-- Mike Gran




[-- Attachment #2: 1659791818-getlk.c --]
[-- Type: text/plain, Size: 2993 bytes --]

#include <config.h>

#include <fcntl.h>
#include <libguile.h>
#include <stdio.h>
#include <unistd.h>

#ifdef DLL_EXPORT
#define API __attribute__ ((dllexport, cdecl))
#else
#define API
#endif

SCM getlk_fcntl_lk_fdes (SCM s_fdes, SCM s_cmd, SCM s_list) API;
void getlk_init_getlk (void) API;

SCM s_f_getlk;
SCM s_f_setlk;
SCM s_f_setlkw;

SCM s_f_rdlck;
SCM s_f_wrlck;
SCM s_f_unlck;

SCM getlk_fcntl_lk_fdes(SCM s_fdes, SCM s_cmd, SCM s_list)
{
  int rv;
  int fdes;
  struct flock lock;
  SCM l_type;
  SCM l_whence;
  SCM l_start;
  SCM l_len;
  SCM l_pid;

  SCM_ASSERT (scm_is_integer(s_fdes),
	      s_fdes, SCM_ARG1, "fcntl-lk-fdes");
  SCM_ASSERT ( scm_is_integer (s_cmd), s_cmd, SCM_ARG2, 
	       "fcntl-lk-fdes");
  SCM_ASSERT ( scm_is_true (scm_list_p (s_list)), s_list, SCM_ARG3, 
	       "fcntl-lk-fdes");

  fdes = scm_to_int (s_fdes);
  
  l_type = scm_list_ref (s_list, scm_from_int (0));
  l_whence = scm_list_ref (s_list, scm_from_int (1));
  l_start = scm_list_ref (s_list, scm_from_int (2));
  l_len = scm_list_ref (s_list, scm_from_int (3));
  l_pid = scm_list_ref (s_list, scm_from_int (4));
  
  lock.l_type = scm_to_short (l_type);
  lock.l_whence = scm_to_short (l_whence);
  if (SIZEOF_OFF_T == 4)
    {
      lock.l_start = scm_to_int32 (l_start);
      lock.l_len = scm_to_int32 (l_len);
    }
  else if (SIZEOF_OFF_T == 8)
    {
      lock.l_start = scm_to_int64 (l_start);
      lock.l_len = scm_to_int64 (l_len);
    }
  else
    abort ();
  if (SIZEOF_PID_T == 4)
    {
      lock.l_pid = scm_to_int32 (l_pid);
    }
  else
    abort ();

  
  rv = fcntl (fdes, scm_to_int (s_cmd), &lock);
  if (rv == -1)
    {
      scm_syserror ("fcntl-lk-fdes");
    }

  l_type = scm_from_short (lock.l_type);
  l_whence = scm_from_short (lock.l_whence);
  if (SIZEOF_OFF_T == 4)
    {
      l_start = scm_from_int32 (lock.l_start);
      l_len = scm_from_int32 (lock.l_len);
    }
  else if (SIZEOF_OFF_T == 8)
    {
      l_start = scm_from_int64 (lock.l_start);
      l_len = scm_from_int64 (lock.l_len);
    }
  else
    {
      printf ("aborting at %s %d", __FILE__, __LINE__);
      abort ();
    }

  if (SIZEOF_PID_T == 4)
    {
      l_pid = scm_from_int32 (lock.l_pid);
    }
  else 
    {
      printf ("aborting at %s %d", __FILE__, __LINE__);
      abort ();
    }

  return scm_list_5 (l_type, l_whence, l_start, l_len, l_pid);
}

void
getlk_init_getlk ()
{
  scm_c_define_gsubr ("fcntl-lk-fdes", 3, 0, 0, getlk_fcntl_lk_fdes);
  s_f_getlk = scm_permanent_object (scm_c_define ("F_GETLK", scm_from_int (F_GETLK)));
  s_f_setlk = scm_permanent_object (scm_c_define ("F_SETLK", scm_from_int (F_SETLK)));
  s_f_setlkw = scm_permanent_object (scm_c_define ("F_SETLKW", scm_from_int (F_SETLKW)));

  s_f_rdlck = scm_permanent_object (scm_c_define ("F_RDLCK", scm_from_int (F_RDLCK)));
  s_f_wrlck = scm_permanent_object (scm_c_define ("F_WRLCK", scm_from_int (F_WRLCK)));
  s_f_unlck = scm_permanent_object (scm_c_define ("F_UNLCK", scm_from_int (F_UNLCK)));

}

[-- Attachment #3: 1271041479-getlk.scm.in --]
[-- Type: application/octet-stream, Size: 356 bytes --]

;; -*- Mode: scheme -*-

(define-module (getlk)
  #:export (fcntl-lk
	    F_GETLK
	    F_SETLK
	    F_SETLKW
	    F_RDLCK
	    F_WRLCK
	    F_UNLCK))


(define (fcntl-lk fdes cmd list)
  (if (port? fdes)
      (fcntl-lk-fdes (port->fdes fdes) cmd list)
      (fcntl-lk-fdes fdes cmd list)))


(load-extension "XXlibdirXX/libguile-getlk" "getlk_init_getlk")

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-09-02  3:34 ` Mike Gran
@ 2007-09-03  8:08   ` Kaloian Doganov
  2007-09-03 13:41     ` Mike Gran
  0 siblings, 1 reply; 12+ messages in thread
From: Kaloian Doganov @ 2007-09-03  8:08 UTC (permalink / raw)
  To: guile-user

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

Mike Gran <spk121@yahoo.com> writes:

    I put together something.  I've attached the more important source
    files here for reference, but, the buildable files are in
    http://lonelycactus.com/getlk-0.0.tar.gz

Mike, I really appreciate your help.
    
    For me, it does "./configure && make && make install" on Linux, but
    fails on Cygwin.

I guess by "Linux" you actually mean GNU/Linux, since the make program
can not run on the bare kernel.  Unfortunately, the configure script
fails on my system (gNewSense):


[-- Attachment #2: configure.output --]
[-- Type: text/plain, Size: 5326 bytes --]

Script started on  3.09.2007 (пн) 10,55,52 EEST
checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking for a sed that does not truncate output... /bin/sed

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ld used by gcc... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for /usr/bin/ld option to reload object files... -r

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking how to recognize dependent libraries... pass_all

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking dlfcn.h usability... yes

checking dlfcn.h presence... yes

checking for dlfcn.h... yes

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking how to run the C++ preprocessor... g++ -E

checking for g77... no

checking for xlf... no

checking for f77... no

checking for frt... no

checking for pgf77... no

checking for cf77... no

checking for fort77... no

checking for fl32... no

checking for af77... no

checking for xlf90... no

checking for f90... no

checking for pgf90... no

checking for pghpf... no

checking for epcf90... no

checking for gfortran... no

checking for g95... no

checking for xlf95... no

checking for f95... no

checking for fort... no

checking for ifort... no

checking for ifc... no

checking for efc... no

checking for pgf95... no

checking for lf95... no

checking for ftn... no

checking whether we are using the GNU Fortran 77 compiler... no

checking whether  accepts -g... no

checking the maximum length of command line arguments... 98304

checking command to parse /usr/bin/nm -B output from gcc object... ok

checking for objdir... .libs

checking for ar... ar

checking for ranlib... ranlib

checking for strip... strip

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc static flag -static works... yes

checking if gcc supports -c -o file.o... yes

checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

configure: creating libtool

appending configuration tag "CXX" to libtool

checking for ld used by g++... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fPIC

checking if g++ PIC flag -fPIC works... yes

checking if g++ static flag -static works... yes

checking if g++ supports -c -o file.o... yes

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

appending configuration tag "F77" to libtool

checking for a BSD-compatible install... /usr/bin/install -c

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for guile... /usr/bin/guile

checking for guile-config... /usr/bin/guile-config

checking for guile-tools... /usr/bin/guile-tools

checking fcntl.h usability... yes

checking fcntl.h presence... yes

checking for fcntl.h... yes

checking for unistd.h... (cached) yes

checking libguile.h usability... yes

checking libguile.h presence... yes

checking for libguile.h... yes

checking libguile compile flags... 

checking libguile link flags... -lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm

checking for Guile site directory... /usr/share/guile/site

checking for off_t... yes

checking for pid_t... yes

checking for off_t... (cached) yes

checking size of off_t... configure: error: cannot compute sizeof (off_t)

See `config.log' for more details.


Script done on  3.09.2007 (пн) 10,56,18 EEST

[-- Attachment #3: Type: text/plain, Size: 26 bytes --]


Here is the config.log:


[-- Attachment #4: config.log --]
[-- Type: text/plain, Size: 28217 bytes --]

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by getlk configure 0.0, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = millenium-falcon
uname -m = i686
uname -r = 2.6.15-29-386
uname -s = Linux
uname -v = #1 PREEMPT Fri Aug 31 01:19:09 UTC 2007

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/kaloian/bin
PATH: /home/kaloian/bin
PATH: /home/kaloian/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/bin/X11
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1983: checking for a BSD-compatible install
configure:2039: result: /usr/bin/install -c
configure:2050: checking whether build environment is sane
configure:2093: result: yes
configure:2158: checking for gawk
configure:2174: found /usr/bin/gawk
configure:2185: result: gawk
configure:2196: checking whether make sets $(MAKE)
configure:2217: result: yes
configure:2454: checking for gcc
configure:2470: found /usr/bin/gcc
configure:2481: result: gcc
configure:2719: checking for C compiler version
configure:2726: gcc --version >&5
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2729: $? = 0
configure:2736: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
configure:2739: $? = 0
configure:2746: gcc -V >&5
gcc: '-V' option must have argument
configure:2749: $? = 1
configure:2772: checking for C compiler default output file name
configure:2799: gcc    conftest.c  >&5
configure:2802: $? = 0
configure:2840: result: a.out
configure:2857: checking whether the C compiler works
configure:2867: ./a.out
configure:2870: $? = 0
configure:2887: result: yes
configure:2894: checking whether we are cross compiling
configure:2896: result: no
configure:2899: checking for suffix of executables
configure:2906: gcc -o conftest    conftest.c  >&5
configure:2909: $? = 0
configure:2933: result: 
configure:2939: checking for suffix of object files
configure:2965: gcc -c   conftest.c >&5
configure:2968: $? = 0
configure:2991: result: o
configure:2995: checking whether we are using the GNU C compiler
configure:3024: gcc -c   conftest.c >&5
configure:3030: $? = 0
configure:3047: result: yes
configure:3052: checking whether gcc accepts -g
configure:3082: gcc -c -g  conftest.c >&5
configure:3088: $? = 0
configure:3187: result: yes
configure:3204: checking for gcc option to accept ISO C89
configure:3278: gcc  -c -g -O2  conftest.c >&5
configure:3284: $? = 0
configure:3307: result: none needed
configure:3336: checking for style of include used by make
configure:3364: result: GNU
configure:3392: checking dependency style of gcc
configure:3482: result: gcc3
configure:3577: checking build system type
configure:3595: result: i686-pc-linux-gnu
configure:3617: checking host system type
configure:3632: result: i686-pc-linux-gnu
configure:3654: checking for a sed that does not truncate output
configure:3710: result: /bin/sed
configure:3713: checking for grep that handles long lines and -e
configure:3787: result: /bin/grep
configure:3792: checking for egrep
configure:3870: result: /bin/grep -E
configure:3886: checking for ld used by gcc
configure:3953: result: /usr/bin/ld
configure:3962: checking if the linker (/usr/bin/ld) is GNU ld
configure:3977: result: yes
configure:3982: checking for /usr/bin/ld option to reload object files
configure:3989: result: -r
configure:4007: checking for BSD-compatible nm
configure:4056: result: /usr/bin/nm -B
configure:4060: checking whether ln -s works
configure:4064: result: yes
configure:4071: checking how to recognize dependent libraries
configure:4257: result: pass_all
configure:4498: checking how to run the C preprocessor
configure:4538: gcc -E  conftest.c
configure:4544: $? = 0
configure:4575: gcc -E  conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
configure:4581: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "getlk"
| #define PACKAGE_TARNAME "getlk"
| #define PACKAGE_VERSION "0.0"
| #define PACKAGE_STRING "getlk 0.0"
| #define PACKAGE_BUGREPORT "spk121@yahoo.com"
| #define PACKAGE "getlk"
| #define VERSION "0.0"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:4614: result: gcc -E
configure:4643: gcc -E  conftest.c
configure:4649: $? = 0
configure:4680: gcc -E  conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
configure:4686: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "getlk"
| #define PACKAGE_TARNAME "getlk"
| #define PACKAGE_VERSION "0.0"
| #define PACKAGE_STRING "getlk 0.0"
| #define PACKAGE_BUGREPORT "spk121@yahoo.com"
| #define PACKAGE "getlk"
| #define VERSION "0.0"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:4724: checking for ANSI C header files
configure:4754: gcc -c -g -O2  conftest.c >&5
configure:4760: $? = 0
configure:4859: gcc -o conftest -g -O2   conftest.c  >&5
configure:4862: $? = 0
configure:4868: ./conftest
configure:4871: $? = 0
configure:4888: result: yes
configure:4912: checking for sys/types.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for sys/stat.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for stdlib.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for string.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for memory.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for strings.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for inttypes.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for stdint.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4912: checking for unistd.h
configure:4933: gcc -c -g -O2  conftest.c >&5
configure:4939: $? = 0
configure:4955: result: yes
configure:4982: checking dlfcn.h usability
configure:4999: gcc -c -g -O2  conftest.c >&5
configure:5005: $? = 0
configure:5019: result: yes
configure:5023: checking dlfcn.h presence
configure:5038: gcc -E  conftest.c
configure:5044: $? = 0
configure:5058: result: yes
configure:5091: checking for dlfcn.h
configure:5099: result: yes
configure:5170: checking for g++
configure:5186: found /usr/bin/g++
configure:5197: result: g++
configure:5228: checking for C++ compiler version
configure:5235: g++ --version >&5
g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:5238: $? = 0
configure:5245: g++ -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
configure:5248: $? = 0
configure:5255: g++ -V >&5
g++: '-V' option must have argument
configure:5258: $? = 1
configure:5261: checking whether we are using the GNU C++ compiler
configure:5290: g++ -c   conftest.cpp >&5
configure:5296: $? = 0
configure:5313: result: yes
configure:5318: checking whether g++ accepts -g
configure:5348: g++ -c -g  conftest.cpp >&5
configure:5354: $? = 0
configure:5453: result: yes
configure:5478: checking dependency style of g++
configure:5568: result: gcc3
configure:5595: checking how to run the C++ preprocessor
configure:5631: g++ -E  conftest.cpp
configure:5637: $? = 0
configure:5668: g++ -E  conftest.cpp
conftest.cpp:21:28: error: ac_nonexistent.h: No such file or directory
configure:5674: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "getlk"
| #define PACKAGE_TARNAME "getlk"
| #define PACKAGE_VERSION "0.0"
| #define PACKAGE_STRING "getlk 0.0"
| #define PACKAGE_BUGREPORT "spk121@yahoo.com"
| #define PACKAGE "getlk"
| #define VERSION "0.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:5707: result: g++ -E
configure:5736: g++ -E  conftest.cpp
configure:5742: $? = 0
configure:5773: g++ -E  conftest.cpp
conftest.cpp:21:28: error: ac_nonexistent.h: No such file or directory
configure:5779: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "getlk"
| #define PACKAGE_TARNAME "getlk"
| #define PACKAGE_VERSION "0.0"
| #define PACKAGE_STRING "getlk 0.0"
| #define PACKAGE_BUGREPORT "spk121@yahoo.com"
| #define PACKAGE "getlk"
| #define VERSION "0.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:5872: checking for g77
configure:5902: result: no
configure:5872: checking for xlf
configure:5902: result: no
configure:5872: checking for f77
configure:5902: result: no
configure:5872: checking for frt
configure:5902: result: no
configure:5872: checking for pgf77
configure:5902: result: no
configure:5872: checking for cf77
configure:5902: result: no
configure:5872: checking for fort77
configure:5902: result: no
configure:5872: checking for fl32
configure:5902: result: no
configure:5872: checking for af77
configure:5902: result: no
configure:5872: checking for xlf90
configure:5902: result: no
configure:5872: checking for f90
configure:5902: result: no
configure:5872: checking for pgf90
configure:5902: result: no
configure:5872: checking for pghpf
configure:5902: result: no
configure:5872: checking for epcf90
configure:5902: result: no
configure:5872: checking for gfortran
configure:5902: result: no
configure:5872: checking for g95
configure:5902: result: no
configure:5872: checking for xlf95
configure:5902: result: no
configure:5872: checking for f95
configure:5902: result: no
configure:5872: checking for fort
configure:5902: result: no
configure:5872: checking for ifort
configure:5902: result: no
configure:5872: checking for ifc
configure:5902: result: no
configure:5872: checking for efc
configure:5902: result: no
configure:5872: checking for pgf95
configure:5902: result: no
configure:5872: checking for lf95
configure:5902: result: no
configure:5872: checking for ftn
configure:5902: result: no
configure:5929: checking for Fortran 77 compiler version
configure:5936:  --version >&5
./configure: line 5937: --version: command not found
configure:5939: $? = 127
configure:5946:  -v >&5
./configure: line 5947: -v: command not found
configure:5949: $? = 127
configure:5956:  -V >&5
./configure: line 5957: -V: command not found
configure:5959: $? = 127
configure:5967: checking whether we are using the GNU Fortran 77 compiler
configure:5986:  -c  conftest.F >&5
./configure: line 5987: -c: command not found
configure:5992: $? = 127
configure: failed program was:
|       program main
| #ifndef __GNUC__
|        choke me
| #endif
| 
|       end
configure:6009: result: no
configure:6015: checking whether  accepts -g
configure:6032:  -c -g conftest.f >&5
./configure: line 6033: -c: command not found
configure:6038: $? = 127
configure: failed program was:
|       program main
| 
|       end
configure:6054: result: no
configure:6084: checking the maximum length of command line arguments
configure:6196: result: 98304
configure:6208: checking command to parse /usr/bin/nm -B output from gcc object
configure:6313: gcc -c -g -O2  conftest.c >&5
configure:6316: $? = 0
configure:6320: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ 	]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ 	][ 	]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm
configure:6323: $? = 0
configure:6375: gcc -o conftest -g -O2   conftest.c conftstm.o >&5
configure:6378: $? = 0
configure:6416: result: ok
configure:6420: checking for objdir
configure:6435: result: .libs
configure:6527: checking for ar
configure:6543: found /usr/bin/ar
configure:6554: result: ar
configure:6623: checking for ranlib
configure:6639: found /usr/bin/ranlib
configure:6650: result: ranlib
configure:6719: checking for strip
configure:6735: found /usr/bin/strip
configure:6746: result: strip
configure:7032: checking if gcc supports -fno-rtti -fno-exceptions
configure:7050: gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
configure:7054: $? = 0
configure:7067: result: no
configure:7082: checking for gcc option to produce PIC
configure:7314: result: -fPIC
configure:7322: checking if gcc PIC flag -fPIC works
configure:7340: gcc -c -g -O2  -fPIC -DPIC conftest.c >&5
configure:7344: $? = 0
configure:7357: result: yes
configure:7385: checking if gcc static flag -static works
configure:7413: result: yes
configure:7423: checking if gcc supports -c -o file.o
configure:7444: gcc -c -g -O2  -o out/conftest2.o conftest.c >&5
configure:7448: $? = 0
configure:7470: result: yes
configure:7496: checking whether the gcc linker (/usr/bin/ld) supports shared libraries
configure:8476: result: yes
configure:8497: checking whether -lc should be explicitly linked in
configure:8502: gcc -c -g -O2  conftest.c >&5
configure:8505: $? = 0
configure:8520: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| grep  -lc  \>/dev/null 2\>\&1
configure:8523: $? = 0
configure:8535: result: no
configure:8543: checking dynamic linker characteristics
configure:9145: result: GNU/Linux ld.so
configure:9154: checking how to hardcode library paths into programs
configure:9179: result: immediate
configure:9193: checking whether stripping libraries is possible
configure:9198: result: yes
configure:10000: checking if libtool supports shared libraries
configure:10002: result: yes
configure:10005: checking whether to build shared libraries
configure:10026: result: yes
configure:10029: checking whether to build static libraries
configure:10033: result: yes
configure:10126: creating libtool
configure:10714: checking for ld used by g++
configure:10781: result: /usr/bin/ld
configure:10790: checking if the linker (/usr/bin/ld) is GNU ld
configure:10805: result: yes
configure:10856: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
configure:11830: result: yes
configure:11848: g++ -c -g -O2  conftest.cpp >&5
configure:11851: $? = 0
configure:12003: checking for g++ option to produce PIC
configure:12287: result: -fPIC
configure:12295: checking if g++ PIC flag -fPIC works
configure:12313: g++ -c -g -O2  -fPIC -DPIC conftest.cpp >&5
configure:12317: $? = 0
configure:12330: result: yes
configure:12358: checking if g++ static flag -static works
configure:12386: result: yes
configure:12396: checking if g++ supports -c -o file.o
configure:12417: g++ -c -g -O2  -o out/conftest2.o conftest.cpp >&5
configure:12421: $? = 0
configure:12443: result: yes
configure:12469: checking whether the g++ linker (/usr/bin/ld) supports shared libraries
configure:12494: result: yes
configure:12561: checking dynamic linker characteristics
configure:13111: result: GNU/Linux ld.so
configure:13120: checking how to hardcode library paths into programs
configure:13145: result: immediate
configure:19329: checking for a BSD-compatible install
configure:19385: result: /usr/bin/install -c
configure:19396: checking for a thread-safe mkdir -p
configure:19435: result: /bin/mkdir -p
configure:19440: checking for guile
configure:19458: found /usr/bin/guile
configure:19470: result: /usr/bin/guile
configure:19486: checking for guile-config
configure:19504: found /usr/bin/guile-config
configure:19516: result: /usr/bin/guile-config
configure:19532: checking for guile-tools
configure:19550: found /usr/bin/guile-tools
configure:19562: result: /usr/bin/guile-tools
configure:19594: checking fcntl.h usability
configure:19611: gcc -c -g -O2  conftest.c >&5
configure:19617: $? = 0
configure:19631: result: yes
configure:19635: checking fcntl.h presence
configure:19650: gcc -E  conftest.c
configure:19656: $? = 0
configure:19670: result: yes
configure:19703: checking for fcntl.h
configure:19711: result: yes
configure:19584: checking for unistd.h
configure:19590: result: yes
configure:19594: checking libguile.h usability
configure:19611: gcc -c -g -O2  conftest.c >&5
configure:19617: $? = 0
configure:19631: result: yes
configure:19635: checking libguile.h presence
configure:19650: gcc -E  conftest.c
configure:19656: $? = 0
configure:19670: result: yes
configure:19703: checking for libguile.h
configure:19711: result: yes
configure:19724: checking libguile compile flags
configure:19727: result: 
configure:19729: checking libguile link flags
configure:19732: result: -lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm
configure:19737: checking for Guile site directory
configure:19740: result: /usr/share/guile/site
configure:19746: checking for off_t
configure:19776: gcc -c -g -O2  conftest.c >&5
configure:19782: $? = 0
configure:19797: result: yes
configure:19809: checking for pid_t
configure:19839: gcc -c -g -O2  conftest.c >&5
configure:19845: $? = 0
configure:19860: result: yes
configure:19872: checking for off_t
configure:19924: result: yes
configure:19931: checking size of off_t
configure:20239: gcc -o conftest -g -O2   conftest.c  >&5
conftest.c:26: error: syntax error before 'ac__type_sizeof_'
conftest.c:26: warning: data definition has no type or storage class
configure:20242: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "getlk"
| #define PACKAGE_TARNAME "getlk"
| #define PACKAGE_VERSION "0.0"
| #define PACKAGE_STRING "getlk 0.0"
| #define PACKAGE_BUGREPORT "spk121@yahoo.com"
| #define PACKAGE "getlk"
| #define VERSION "0.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_LIBGUILE_H 1
| /* end confdefs.h.  */
| #include <unistd.h>
| 
|    typedef off_t ac__type_sizeof_;
| static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
| static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
| #include <stdio.h>
| #include <stdlib.h>
| int
| main ()
| {
| 
|   FILE *f = fopen ("conftest.val", "w");
|   if (! f)
|     return 1;
|   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
|     {
|       long int i = longval ();
|       if (i != ((long int) (sizeof (ac__type_sizeof_))))
| 	return 1;
|       fprintf (f, "%ld\n", i);
|     }
|   else
|     {
|       unsigned long int i = ulongval ();
|       if (i != ((long int) (sizeof (ac__type_sizeof_))))
| 	return 1;
|       fprintf (f, "%lu\n", i);
|     }
|   return ferror (f) || fclose (f) != 0;
| 
|   ;
|   return 0;
| }
configure:20262: error: cannot compute sizeof (off_t)
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_f77_compiler_gnu=no
ac_cv_header_dlfcn_h=yes
ac_cv_header_fcntl_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_libguile_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=i686-pc-linux-gnu
ac_cv_objext=o
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_path_GUILE=/usr/bin/guile
ac_cv_path_GUILE_CONFIG=/usr/bin/guile-config
ac_cv_path_GUILE_TOOLS=/usr/bin/guile-tools
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_CXXCPP='g++ -E'
ac_cv_prog_ac_ct_AR=ar
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_f77_g=no
ac_cv_prog_make_make_set=yes
ac_cv_type_off_t=yes
ac_cv_type_pid_t=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_ld_reload_flag=-r
lt_cv_objdir=.libs
lt_cv_path_LD=/usr/bin/ld
lt_cv_path_LDCXX=/usr/bin/ld
lt_cv_path_NM='/usr/bin/nm -B'
lt_cv_path_SED=/bin/sed
lt_cv_prog_compiler_c_o=yes
lt_cv_prog_compiler_c_o_CXX=yes
lt_cv_prog_compiler_rtti_exceptions=no
lt_cv_prog_gnu_ld=yes
lt_cv_prog_gnu_ldcxx=yes
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ 	]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ 	][ 	]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/  {\"\1\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^. .* \(.*\)$/extern int \1;/p'\'''
lt_cv_sys_max_cmd_len=98304
lt_lt_cv_prog_compiler_c_o='"yes"'
lt_lt_cv_prog_compiler_c_o_CXX='"yes"'
lt_lt_cv_sys_global_symbol_pipe='"sed -n -e '\''s/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'\''"'
lt_lt_cv_sys_global_symbol_to_c_name_address='"sed -n -e '\''s/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'\''"'
lt_lt_cv_sys_global_symbol_to_cdecl='"sed -n -e '\''s/^. .* \\(.*\\)\$/extern int \\1;/p'\''"'

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/missing --run aclocal-1.9'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/missing --run tar'
AR='ar'
AUTOCONF='${SHELL} /home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/missing --run autoconf'
AUTOHEADER='${SHELL} /home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/missing --run autoheader'
AUTOMAKE='${SHELL} /home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/missing --run automake-1.9'
AWK='gawk'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP='gcc -E'
CPPFLAGS=''
CXX='g++'
CXXCPP='g++ -E'
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -O2'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
F77=''
FFLAGS=''
GREP='/bin/grep'
GUILE='/usr/bin/guile'
GUILE_CFLAGS=''
GUILE_CONFIG='/usr/bin/guile-config'
GUILE_LDFLAGS='-lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm'
GUILE_SITE='/usr/share/guile/site'
GUILE_TOOLS='/usr/bin/guile-tools'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
LN_S='ln -s'
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/missing --run makeinfo'
OBJEXT='o'
PACKAGE='getlk'
PACKAGE_BUGREPORT='spk121@yahoo.com'
PACKAGE_NAME='getlk'
PACKAGE_STRING='getlk 0.0'
PACKAGE_TARNAME='getlk'
PACKAGE_VERSION='0.0'
PATH_SEPARATOR=':'
RANLIB='ranlib'
SED='/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
STRIP='strip'
VERSION='0.0'
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_F77=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='/home/kaloian/src/oi/mmis/trunk/src/semafor-hacks/getlk/getlk-0.0/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "getlk"
#define PACKAGE_TARNAME "getlk"
#define PACKAGE_VERSION "0.0"
#define PACKAGE_STRING "getlk 0.0"
#define PACKAGE_BUGREPORT "spk121@yahoo.com"
#define PACKAGE "getlk"
#define VERSION "0.0"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define HAVE_FCNTL_H 1
#define HAVE_UNISTD_H 1
#define HAVE_LIBGUILE_H 1

configure: exit 77

[-- Attachment #5: Type: text/plain, Size: 257 bytes --]



    Cygwin fails because I don't know how to do DLLs.

I do not plan to use Cygwin, so this is not a problem (for me, at
least).
    

-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

[-- Attachment #6: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-09-02  0:30     ` Kevin Ryde
@ 2007-09-03  8:10       ` Kaloian Doganov
  0 siblings, 0 replies; 12+ messages in thread
From: Kaloian Doganov @ 2007-09-03  8:10 UTC (permalink / raw)
  To: guile-user

Kevin Ryde <user42@zip.com.au> writes:

    If you don't mind breaking out a little C code it shouldn't be too
    hard.

I don't mind, but I'm still clueless about C and don't have any
experience in extending Guile with C.

    
-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-09-03  8:08   ` Kaloian Doganov
@ 2007-09-03 13:41     ` Mike Gran
  2007-09-11 15:00       ` Kaloian Doganov
  0 siblings, 1 reply; 12+ messages in thread
From: Mike Gran @ 2007-09-03 13:41 UTC (permalink / raw)
  To: Kaloian Doganov, Gule User


--- Kaloian Doganov <kaloian@doganov.org> wrote:

> I guess by "Linux" you actually mean GNU/Linux, since the make
> program
> can not run on the bare kernel.  

I knew I was going to get in trouble for that the moment I hit "send".

> Unfortunately, the configure script
> fails on my system (gNewSense):

Try this:   http://lonelycactus.com/getlk-0.1.tar.gz

Anyway, configure failed for you because it did not find the definition
of the type "off_t" in <unistd.h>.  I changed the test to look for it
in <sys/types.h>, because that is where the LSB says it should be.

If it fails again, you should write me directly, as autoconf problems
(and my failings as a coder) are off-topic for the list. ;-)

-Mike Gran


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-09-03 13:41     ` Mike Gran
@ 2007-09-11 15:00       ` Kaloian Doganov
  2007-09-11 16:03         ` Mike Gran
  0 siblings, 1 reply; 12+ messages in thread
From: Kaloian Doganov @ 2007-09-11 15:00 UTC (permalink / raw)
  To: guile-user

Mike Gran <spk121@yahoo.com> writes:

    If it fails again, you should write me directly, as autoconf
    problems (and my failings as a coder) are off-topic for the
    list. ;-)

I don't have any autoconf problems anymore, thank you.

I've just managed to backport your example to Guile 1.6.x. and come up
with the following table of correspondence:

Guile 1.8.x            Guile 1.6.x
--------------         -----------
scm_is_integer         SCM_INUMP
scm_is_true            SCM_NFALSEP
scm_to_int             SCM_INUM
scm_to_int32           SCM_INUM
scm_from_int           SCM_MAKINUM
scm_from_int32         SCM_MAKINUM
scm_to_short (x)       scm_num2short (x, 0, NULL)
scm_from_short         scm_short2num

Not sure whether it is correct, but works for the trivial examples I
run for now.  I don't know what to do with scm_to_int64 and
scm_from_int64, though.


-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: (fcntl fd F_GETLK ...) from Guile
  2007-09-11 15:00       ` Kaloian Doganov
@ 2007-09-11 16:03         ` Mike Gran
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gran @ 2007-09-11 16:03 UTC (permalink / raw)
  To: Kaloian Doganov, guile-user


--- Kaloian Doganov <kaloian@doganov.org> wrote:

> I've just managed to backport your example to Guile 1.6.x. and come
> up
> with the following table of correspondence:
> 
> Guile 1.8.x            Guile 1.6.x
> --------------         -----------
> scm_is_integer         SCM_INUMP
> scm_is_true            SCM_NFALSEP
> scm_to_int             SCM_INUM
> scm_to_int32           SCM_INUM
> scm_from_int           SCM_MAKINUM
> scm_from_int32         SCM_MAKINUM
> scm_to_short (x)       scm_num2short (x, 0, NULL)
> scm_from_short         scm_short2num
> 

That appears correct.

> Not sure whether it is correct, but works for the trivial examples I
> run for now.  I don't know what to do with scm_to_int64 and
> scm_from_int64, though.

For many machines 64bits is long long integers. Try scm_num2long_long
and scm_long_long2num.

-Mike Gran


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-09-11 16:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-31 12:58 (fcntl fd F_GETLK ...) from Guile Kaloian Doganov
2007-08-31 23:50 ` Kevin Ryde
2007-09-01  9:53   ` Kaloian Doganov
2007-09-02  0:30     ` Kevin Ryde
2007-09-03  8:10       ` Kaloian Doganov
2007-09-02  3:34 ` Mike Gran
2007-09-03  8:08   ` Kaloian Doganov
2007-09-03 13:41     ` Mike Gran
2007-09-11 15:00       ` Kaloian Doganov
2007-09-11 16:03         ` Mike Gran
  -- strict thread matches above, loose matches on Subject: below --
2007-08-31 14:19 dsmich
2007-09-01 17:58 dsmich

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).