Re: Socket API improvement, patch #6

2005-10-27 Thread Ludovic Courtès
Hi,

Kevin Ryde <[EMAIL PROTECTED]> writes:

> Ok, we got there eventually.  I checked it in, and I updated the docs
> (have a read to see it they look right).

Great, thanks!

The doc looks good to me.  I'd just suggest the following patch.  It
documents the wrapping/unwrapping C functions (since that was my
original goal).

Thanks,
Ludovic.


--- orig/doc/ref/posix.texi
+++ mod/doc/ref/posix.texi
@@ -2449,18 +2449,20 @@
 @subsubsection Network Socket Address
 @cindex socket
 @cindex network socket
[EMAIL PROTECTED] socket address
 
-A socket address object identifies a socket endpoint for
-communication.  In the case of @code{AF_INET} for instance, the host
-address is only the machine (or interface on the machine), a port
-number is also needed to specify a particular open socket in a running
+A @dfn{socket address} object identifies a socket endpoint for
+communication.  In the case of @code{AF_INET} for instance, the socket
+address object comprises the machine (or interface on the machine) and
+a port number needed to specify a particular open socket in a running
 client or server process.
 
 A socket address object can be created with,
 
[EMAIL PROTECTED] {Scheme Procedure} make-socket-address AF_INET ipv4addr port
[EMAIL PROTECTED] {Scheme Procedure} make-socket-address AF_INET6 ipv6addr port 
[flowinfo [scopeid]]
[EMAIL PROTECTED] {Scheme Procedure} make-socket-address AF_UNIX path
[EMAIL PROTECTED] {Scheme Procedure} make-socket-address AF_INET ipv4addr port
[EMAIL PROTECTED] {Scheme Procedure} make-socket-address AF_INET6 ipv6addr port 
[flowinfo [scopeid]]
[EMAIL PROTECTED] {Scheme Procedure} make-socket-address AF_UNIX path
[EMAIL PROTECTED] {C Function} scm_make_socket_address family address args
 Return a new socket address object.  The first argument is the address
 family, one of the @code{AF} constants, then the arguments vary
 according to the family.
@@ -2473,7 +2475,7 @@
 arguments may be given (both integers, default 0).
 
 For @code{AF_UNIX} the argument is a filename (a string).
[EMAIL PROTECTED] defun
[EMAIL PROTECTED] deffn
 
 @noindent
 The following functions access the fields of a socket address object,
@@ -2508,6 +2510,34 @@
 scope ID value.
 @end deffn
 
+Guile also defines C functions to manipulate socket address objects
+and to convert them from/to their C representation (a @code{struct
+sockaddr} object) to/from their Scheme representation.
+
[EMAIL PROTECTED] {C Function} {struct sockaddr *}scm_c_make_socket_address 
(SCM family, SCM address, SCM args, size_t *address_size)
+Return a newly-allocated @code{sockaddr} structure that reflects
[EMAIL PROTECTED], an address of family @var{family}, with the
+family-specific parameters @var{args} (see the description of
[EMAIL PROTECTED] for details).  On success, a [EMAIL PROTECTED]
+pointer is returned and @var{address_size} is updated to the actual
+size (in bytes) of the returned address.  The returned structure must
+eventually be freed using @code{free ()}.
[EMAIL PROTECTED] deftypefn
+
[EMAIL PROTECTED] {C Function} SCM scm_from_sockaddr (const struct sockaddr 
*address, unsigned address_size)
+Return the Scheme object representing @var{address}, a C socket
+address object of size @var{address_size} bytes.
[EMAIL PROTECTED] deftypefn
+
[EMAIL PROTECTED] {C Function} {struct sockaddr *}scm_to_sockaddr (SCM address, 
size_t *address_size)
+Return a newly-allocated @code{sockaddr} structure that reflects
[EMAIL PROTECTED], an address object returned by either
[EMAIL PROTECTED] ()} or @code{scm_make_socket_address ()}, into
+its C representation.  On success, a [EMAIL PROTECTED] pointer is
+returned and @var{address_size} is updated to the actual size (in
+bytes) of the returned address.  The returned value must eventually be
+freed using @code{free ()}.
[EMAIL PROTECTED] deftypefn
 
 @node Network Sockets and Communication
 @subsubsection Network Sockets and Communication



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


Re: make: don't know how to make CFLAGS. Stop

2005-10-27 Thread Mike Gran
Hi-

Yeah, there is a line in the generated Makefile that is specific to GNU
Make.

You can do the following work around.

Remove this line from the guile-1.6.7/libguile/Makefile

numbers.lo: CFLAGS := $(filter-out -Werror,${CFLAGS})

Then it should build fine.

Or alternately, make sure you are running GNU Make ("gmake") instead of
BSD Make ("make").

FWIW, this affects AIX as well, and is still present in
Guile-1.6.8-rc0.

Hope this helps,

Mike Gran

--- ãÆÑ©±ù <[EMAIL PROTECTED]> wrote:

> Hello,
> I am experiencing an error with guile-1.6.7 installation on FreeBSD
> 5.3.
> Here is the error I get when I run "make" command:
> 
> make  all-recursive
> Making all in oop
> Making all in goops
> Making all in qt
> Making all in md
> Making all in time
> Making all in libguile-ltdl
> Making all in upstream
> make  all-am
> Making all in libguile
> make: don't know how to make CFLAGS. Stop
> *** Error code 1
> 
> Stop in /home/yanxb/guile-1.6.7.
> 
> Thanks in advance for your help.
> Simon Yan
> 
> 
> 
> ___
> Guile-user mailing list
> Guile-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/guile-user
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


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