[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initial SCTP support for the upcoming 1.6.5 release
From: |
Rob Browning |
Subject: |
Re: Initial SCTP support for the upcoming 1.6.5 release |
Date: |
Mon, 16 Aug 2004 13:44:43 -0500 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Michael Tuexen <address@hidden> writes:
> I'm trying to build the SCTP support as a loadable module.
>
> Is there any documentation available (or an example) where
> I can figure out how I can solve the questions described
> below.
>
> I looked in the guile sources, but only found modules defined
> in scheme...
In general, C-only modules are deprecated. The recommendation is that
you create a small .scm file for your module, and then have that load
your shared library and export your symbols, i.e.:
(define-module (pcre))
;; exports at end of file.
(let ((lib "libguile-pcre-v-1")
(init-func "libguile_pcre_init"))
(if (string=? (substring (version) 0 3) "1.4")
(dynamic-call init-func (dynamic-link lib))
(load-extension lib init-func)))
;; make any scheme side defines you that want to here.
;; export things here (though you could also do this above, or in
;; the define-module statement)
;; these exports will often be symbols that were defined during your
;; _init function above
(export PCRE_MAJOR)
(export PCRE_MINOR)
...
Now, presuming that your .scm file is in the %load-path (via
GUILE_LOAD_PATH, or whatever), and your shared library is in the
LD_LIBRARY_PATH (or default ld.so locations), then (use-modules
(pcre)) should work just fine.
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
- Re: Initial SCTP support for the upcoming 1.6.5 release, (continued)
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/14
- Re: Initial SCTP support for the upcoming 1.6.5 release, Kevin Ryde, 2004/08/15
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/16
- Re: Initial SCTP support for the upcoming 1.6.5 release, Kevin Ryde, 2004/08/17
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/19
- Re: Initial SCTP support for the upcoming 1.6.5 release, Kevin Ryde, 2004/08/19
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/20
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/16
- Re: Initial SCTP support for the upcoming 1.6.5 release,
Rob Browning <=
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/20
- Re: Initial SCTP support for the upcoming 1.6.5 release, Kevin Ryde, 2004/08/22
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/23
- Re: Initial SCTP support for the upcoming 1.6.5 release, Kevin Ryde, 2004/08/23
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/24
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/24
- Re: Initial SCTP support for the upcoming 1.6.5 release, Marius Vollmer, 2004/08/24
- Re: Initial SCTP support for the upcoming 1.6.5 release, Michael Tuexen, 2004/08/24