From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: (fcntl fd F_GETLK ...) from Guile Date: Fri, 31 Aug 2007 10:19:14 -0400 Message-ID: <14960157.1188569954996.JavaMail.root@web19> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1188569995 6710 80.91.229.12 (31 Aug 2007 14:19:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2007 14:19:55 +0000 (UTC) Cc: guile-user@gnu.org To: Kaloian Doganov Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 31 16:19:52 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IR7Lj-0002bD-EK for guile-user@m.gmane.org; Fri, 31 Aug 2007 16:19:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IR7Li-0000jt-Q9 for guile-user@m.gmane.org; Fri, 31 Aug 2007 10:19:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IR7Ld-0000fu-E5 for guile-user@gnu.org; Fri, 31 Aug 2007 10:19:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IR7La-0000Zi-NB for guile-user@gnu.org; Fri, 31 Aug 2007 10:19:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IR7La-0000ZZ-KI for guile-user@gnu.org; Fri, 31 Aug 2007 10:19:42 -0400 Original-Received: from mta9.adelphia.net ([68.168.78.199]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IR7La-0005Mu-D4 for guile-user@gnu.org; Fri, 31 Aug 2007 10:19:42 -0400 Original-Received: from web19 ([68.168.75.45]) by mta9.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20070831141914.YGKC7790.mta9.adelphia.net@web19>; Fri, 31 Aug 2007 10:19:14 -0400 X-Priority: 3 (Normal) Sensitivity: Normal X-Detected-Kernel: Solaris 8 (2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6118 Archived-At: ---- Kaloian Doganov 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