unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: <dsmich@adelphia.net>
To: Kaloian Doganov <kaloian@doganov.org>
Cc: guile-user@gnu.org
Subject: Re: (fcntl fd F_GETLK ...) from Guile
Date: Fri, 31 Aug 2007 10:19:14 -0400	[thread overview]
Message-ID: <14960157.1188569954996.JavaMail.root@web19> (raw)


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


             reply	other threads:[~2007-08-31 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 14:19 dsmich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-01 17:58 (fcntl fd F_GETLK ...) from Guile dsmich
2007-08-31 12:58 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

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=14960157.1188569954996.JavaMail.root@web19 \
    --to=dsmich@adelphia.net \
    --cc=guile-user@gnu.org \
    --cc=kaloian@doganov.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).