basis/extra: cleanup uses of add-library.

db4
John Benediktsson 2014-11-13 13:05:14 -08:00
parent 2b32e31ad2
commit de179243ce
26 changed files with 154 additions and 164 deletions

View File

@ -4,18 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
gobject-introspection kernel system vocabs ; gobject-introspection kernel system vocabs ;
IN: atk.ffi IN: atk.ffi
<< << "gobject.ffi" require >>
"gobject.ffi" require
>>
LIBRARY: atk LIBRARY: atk
<< << "atk" {
"atk" { { [ os windows? ] [ "libatk-1.0-0.dll" ] }
{ [ os windows? ] [ "libatk-1.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libatk-1.0.dylib" ] }
{ [ os macosx? ] [ "libatk-1.0.dylib" cdecl add-library ] } { [ os unix? ] [ "libatk-1.0.so" ] }
{ [ os unix? ] [ "libatk-1.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
GIR: vocab:atk/Atk-1.0.gir GIR: vocab:atk/Atk-1.0.gir

View File

@ -3,16 +3,16 @@
! Copyright (C) 2010 Anton Gorenko. ! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.destructors alien.libraries USING: alien alien.c-types alien.destructors alien.libraries
alien.syntax classes.struct combinators kernel system ; alien.syntax assocs classes.struct combinators kernel system ;
IN: cairo.ffi IN: cairo.ffi
! Adapted from cairo.h, version 1.8.10 ! Adapted from cairo.h, version 1.8.10
<< "cairo" { << "cairo" {
{ [ os windows? ] [ "libcairo-2.dll" cdecl add-library ] } { [ os windows? ] [ "libcairo-2.dll" ] }
{ [ os macosx? ] [ "libcairo.dylib" cdecl add-library ] } { [ os macosx? ] [ "libcairo.dylib" ] }
{ [ os unix? ] [ "libcairo.so" cdecl add-library ] } { [ os unix? ] [ "libcairo.so" ] }
} cond >> } cond cdecl add-library >>
LIBRARY: cairo LIBRARY: cairo

View File

@ -1,11 +1,14 @@
! Copyright (C) 2014 Doug Coleman. ! Copyright (C) 2014 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries USING: alien alien.c-types alien.libraries alien.syntax
alien.libraries.finder alien.syntax classes.struct ; combinators classes.struct system ;
USE: nested-comments
IN: compression.snappy.ffi IN: compression.snappy.ffi
<< "snappy" "snappy" find-library cdecl add-library >> << "snappy" {
{ [ os windows? ] [ "snappy.dll" ] }
{ [ os macosx? ] [ "libsnappy.dylib" ] }
{ [ os unix? ] [ "libsnappy.so" ] }
} cond cdecl add-library >>
LIBRARY: snappy LIBRARY: snappy

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman. ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.syntax combinators system USING: alien alien.c-types alien.libraries alien.syntax
alien.libraries ; combinators system ;
IN: compression.zlib.ffi IN: compression.zlib.ffi
<< "zlib" { << "zlib" {

View File

@ -1,14 +1,14 @@
! Copyright (C) 2007, 2008 Doug Coleman. ! Copyright (C) 2007, 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
! tested on debian linux with postgresql 8.1 ! tested on debian linux with postgresql 8.1
USING: alien alien.c-types alien.syntax combinators system USING: alien alien.c-types alien.libraries alien.syntax
alien.libraries ; combinators system ;
IN: db.postgresql.ffi IN: db.postgresql.ffi
<< "postgresql" { << "postgresql" {
{ [ os windows? ] [ "libpq.dll" ] } { [ os windows? ] [ "libpq.dll" ] }
{ [ os macosx? ] [ "libpq.dylib" ] } { [ os macosx? ] [ "libpq.dylib" ] }
{ [ os unix? ] [ "libpq.so" ] } { [ os unix? ] [ "libpq.so" ] }
} cond cdecl add-library >> } cond cdecl add-library >>
! ConnSatusType ! ConnSatusType

View File

@ -2,15 +2,15 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
! An interface to the sqlite database. Tested against sqlite v3.1.3. ! An interface to the sqlite database. Tested against sqlite v3.1.3.
! Not all functions have been wrapped. ! Not all functions have been wrapped.
USING: alien compiler kernel math namespaces sequences strings alien.syntax USING: alien alien.c-types alien.libraries alien.syntax
system combinators alien.c-types alien.libraries ; combinators system ;
IN: db.sqlite.ffi IN: db.sqlite.ffi
<< "sqlite" { << "sqlite" {
{ [ os windows? ] [ "sqlite3.dll" ] } { [ os windows? ] [ "sqlite3.dll" ] }
{ [ os macosx? ] [ "/usr/lib/libsqlite3.dylib" ] } { [ os macosx? ] [ "libsqlite3.dylib" ] }
{ [ os unix? ] [ "libsqlite3.so" ] } { [ os unix? ] [ "libsqlite3.so" ] }
} cond cdecl add-library >> } cond cdecl add-library >>
! Return values from sqlite functions ! Return values from sqlite functions
CONSTANT: SQLITE_OK 0 ! Successful result CONSTANT: SQLITE_OK 0 ! Successful result

View File

@ -1,24 +1,20 @@
! Copyright (C) 2010 Anton Gorenko. ! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.data alien.libraries alien.syntax USING: alien alien.c-types alien.data alien.libraries
combinators gio.ffi glib.ffi gobject-introspection alien.syntax combinators gio.ffi glib.ffi gobject-introspection
gobject-introspection.standard-types kernel libc gobject-introspection.standard-types kernel libc sequences
sequences system vocabs ; system vocabs ;
IN: gdk.pixbuf.ffi IN: gdk.pixbuf.ffi
<< << "gio.ffi" require >>
"gio.ffi" require
>>
LIBRARY: gdk.pixbuf LIBRARY: gdk.pixbuf
<< << "gdk.pixbuf" {
"gdk.pixbuf" { { [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" ] }
{ [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" ] }
{ [ os macosx? ] [ "libgdk_pixbuf-2.0.dylib" cdecl add-library ] } { [ os unix? ] [ "libgdk_pixbuf-2.0.so" ] }
{ [ os unix? ] [ "libgdk_pixbuf-2.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
GIR: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir GIR: vocab:gdk/pixbuf/GdkPixbuf-2.0.gir

View File

@ -4,18 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
gobject-introspection kernel system vocabs ; gobject-introspection kernel system vocabs ;
IN: gio.ffi IN: gio.ffi
<< << "gobject.ffi" require >>
"gobject.ffi" require
>>
LIBRARY: gio LIBRARY: gio
<< << "gio" {
"gio" { { [ os windows? ] [ "libgio-2.0-0.dll" ] }
{ [ os windows? ] [ "libgio-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libgio-2.0.dylib" ] }
{ [ os macosx? ] [ "libgio-2.0.dylib" cdecl add-library ] } { [ os unix? ] [ "libgio-2.0.so" ] }
{ [ os unix? ] [ "libgio-2.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
GIR: vocab:gio/Gio-2.0.gir GIR: vocab:gio/Gio-2.0.gir

View File

@ -8,13 +8,11 @@ IN: glib.ffi
LIBRARY: glib LIBRARY: glib
<< << "glib" {
"glib" { { [ os windows? ] [ "libglib-2.0-0.dll" ] }
{ [ os windows? ] [ "libglib-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libglib-2.0.0.dylib" ] }
{ [ os macosx? ] [ "libglib-2.0.0.dylib" cdecl add-library ] } { [ os unix? ] [ "libglib-2.0.so" ] }
{ [ os unix? ] [ "libglib-2.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
IMPLEMENT-STRUCTS: GError GPollFD GSource GSourceFuncs ; IMPLEMENT-STRUCTS: GError GPollFD GSource GSourceFuncs ;

View File

@ -4,18 +4,14 @@ USING: alien alien.libraries alien.syntax combinators
gobject-introspection kernel system vocabs ; gobject-introspection kernel system vocabs ;
IN: gmodule.ffi IN: gmodule.ffi
<< << "glib.ffi" require >>
"glib.ffi" require
>>
LIBRARY: gmodule LIBRARY: gmodule
<< << "gmodule" {
"gmodule" { { [ os windows? ] [ "libgmodule-2.0-0.dll" ] }
{ [ os windows? ] [ "libgmodule-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libgmodule-2.0.dylib" ] }
{ [ os macosx? ] [ drop ] } { [ os unix? ] [ "libgmodule-2.0.so" ] }
{ [ os unix? ] [ "libgmodule-2.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
GIR: vocab:gmodule/GModule-2.0.gir GIR: vocab:gmodule/GModule-2.0.gir

View File

@ -1,25 +1,21 @@
! Copyright (C) 2010 Anton Gorenko. ! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.destructors alien.libraries alien.syntax kernel USING: alien alien.destructors alien.libraries alien.syntax
combinators gobject-introspection literals math system vocabs ; combinators gobject-introspection literals math system vocabs ;
IN: gobject.ffi IN: gobject.ffi
! these two are needed for the definition of GError and others. ! these two are needed for the definition of GError and others.
! otherwise we generate GError and some others in this vocab as well. ! otherwise we generate GError and some others in this vocab as well.
<< << "glib.ffi" require >>
"glib.ffi" require
>>
USE: glib.ffi USE: glib.ffi
LIBRARY: gobject LIBRARY: gobject
<< << "gobject" {
"gobject" { { [ os windows? ] [ "libobject-2.0-0.dll" ] }
{ [ os windows? ] [ "libobject-2.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libgobject-2.0.dylib" ] }
{ [ os macosx? ] [ "libgobject-2.0.dylib" cdecl add-library ] } { [ os unix? ] [ "libgobject-2.0.so" ] }
{ [ os unix? ] [ "libgobject-2.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
IMPLEMENT-STRUCTS: GValue GParamSpecVariant ; IMPLEMENT-STRUCTS: GValue GParamSpecVariant ;

View File

@ -5,18 +5,16 @@
! !
! export LD_LIBRARY_PATH=/opt/local/lib ! export LD_LIBRARY_PATH=/opt/local/lib
USING: alien alien.c-types alien.syntax combinators kernel system USING: alien alien.c-types alien.libraries alien.syntax
alien.libraries classes.struct ; classes.struct combinators system ;
IN: openssl.libcrypto IN: openssl.libcrypto
<< << "libcrypto" {
{ { [ os windows? ] [ "libeay32.dll" ] }
{ [ os windows? ] [ "libcrypto" "libeay32.dll" cdecl add-library ] } { [ os macosx? ] [ "libcrypto.dylib" ] }
{ [ os macosx? ] [ "libcrypto" "libcrypto.dylib" cdecl add-library ] } { [ os unix? ] [ "libcrypto.so" ] }
{ [ os unix? ] [ "libcrypto" "libcrypto.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
STRUCT: bio-method STRUCT: bio-method
{ type int } { type int }

View File

@ -1,9 +1,10 @@
! Copyright (C) 2007 Elie CHAFTARI ! Copyright (C) 2007 Elie CHAFTARI
! Portions copyright (C) 2008 Slava Pestov ! Portions copyright (C) 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.parser alien.syntax classes.struct combinators USING: alien alien.c-types alien.libraries alien.parser
kernel openssl.libcrypto system namespaces assocs parser lexer sequences words alien.syntax assocs classes.struct combinators kernel lexer
quotations math.bitwise alien.libraries literals ; literals namespaces openssl.libcrypto parser quotations
sequences system words ;
IN: openssl.libssl IN: openssl.libssl

View File

@ -4,19 +4,15 @@ USING: alien alien.libraries alien.syntax cairo.ffi combinators
kernel gobject-introspection system vocabs ; kernel gobject-introspection system vocabs ;
IN: pango.cairo.ffi IN: pango.cairo.ffi
<< << "pango.ffi" require >>
"pango.ffi" require
>>
LIBRARY: pango.cairo LIBRARY: pango.cairo
<< << "pango.cairo" {
"pango.cairo" { { [ os windows? ] [ "libpangocairo-1.0-0.dll" ] }
{ [ os windows? ] [ "libpangocairo-1.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libpangocairo-1.0.dylib" ] }
{ [ os macosx? ] [ drop ] } { [ os unix? ] [ "libpangocairo-1.0.so" ] }
{ [ os unix? ] [ "libpangocairo-1.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
FOREIGN-RECORD-TYPE: cairo.Context cairo_t FOREIGN-RECORD-TYPE: cairo.Context cairo_t
FOREIGN-RECORD-TYPE: cairo.ScaledFont cairo_scaled_font_t FOREIGN-RECORD-TYPE: cairo.ScaledFont cairo_scaled_font_t

View File

@ -1,23 +1,19 @@
! Copyright (C) 2010 Anton Gorenko. ! Copyright (C) 2010 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.destructors alien.libraries USING: alien alien.c-types alien.destructors alien.libraries
alien.syntax combinators kernel gobject-introspection alien.syntax combinators gobject-introspection
gobject-introspection.standard-types system vocabs ; gobject-introspection.standard-types system vocabs ;
IN: pango.ffi IN: pango.ffi
<< << "gobject.ffi" require >>
"gobject.ffi" require
>>
LIBRARY: pango LIBRARY: pango
<< << "pango" {
"pango" { { [ os windows? ] [ "libpango-1.0-0.dll" ] }
{ [ os windows? ] [ "libpango-1.0-0.dll" cdecl add-library ] } { [ os macosx? ] [ "libpango-1.0.dylib" ] }
{ [ os macosx? ] [ drop ] } { [ os unix? ] [ "libpango-1.0.so" ] }
{ [ os unix? ] [ "libpango-1.0.so" cdecl add-library ] } } cond cdecl add-library >>
} cond
>>
IMPLEMENT-STRUCTS: PangoRectangle ; IMPLEMENT-STRUCTS: PangoRectangle ;

View File

@ -1,19 +1,17 @@
! Copyright (C) 2008, 2010 Slava Pestov, Jorge Acereda Macia. ! Copyright (C) 2008, 2010 Slava Pestov, Jorge Acereda Macia.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: tools.disassembler namespaces combinators alien USING: alien alien.c-types alien.libraries alien.syntax arrays
alien.syntax alien.c-types lexer parser kernel sequences layouts combinators destructors fry kernel layouts libc make math
math math.order alien.libraries math.parser system make fry math.order math.parser namespaces sequences splitting system
arrays libc destructors tools.memory tools.disassembler.utils tools.disassembler.private tools.disassembler.utils tools.memory
tools.disassembler.private splitting alien.data classes.struct ; ;
IN: tools.disassembler.udis IN: tools.disassembler.udis
<< << "libudis86" {
"libudis86" {
{ [ os macosx? ] [ "libudis86.0.dylib" ] }
{ [ os unix? ] [ "libudis86.so.0" ] }
{ [ os windows? ] [ "libudis86.dll" ] } { [ os windows? ] [ "libudis86.dll" ] }
} cond cdecl add-library { [ os macosx? ] [ "libudis86.dylib" ] }
>> { [ os unix? ] [ "libudis86.so" ] }
} cond cdecl add-library >>
LIBRARY: libudis86 LIBRARY: libudis86

View File

@ -1,10 +1,13 @@
USING: alien alien.c-types alien.enums alien.libraries USING: alien alien.c-types alien.enums alien.libraries
alien.libraries.finder alien.syntax classes.struct combinators alien.syntax classes.struct combinators kernel math
kernel math unix.types words ; system unix.types words ;
IN: curl.ffi IN: curl.ffi
<< "curl" dup find-library cdecl add-library >> << "curl" {
{ [ os macosx? ] [ "libcurl.dylib" ] }
{ [ os unix? ] [ "libcurl.so" ] }
} cond cdecl add-library >>
LIBRARY: curl LIBRARY: curl

View File

@ -2,13 +2,17 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.destructors alien.libraries USING: alien alien.c-types alien.destructors alien.libraries
alien.libraries.finder alien.syntax kernel ; alien.libraries.finder alien.syntax combinators kernel system ;
IN: fftw.ffi IN: fftw.ffi
LIBRARY: fftw3 LIBRARY: fftw3
<< "fftw3" { "fftw3" "libfftw3-3" } find-library-from-list cdecl add-library >> << "fftw3" {
{ [ os windows? ] [ "libfftw3-3.dll" ] }
{ [ os macosx? ] [ "libfftw3.dylib" ] }
{ [ os unix? ] [ "libfftw3.so" ] }
} cond cdecl add-library >>
TYPEDEF: double[2] fftw_complex TYPEDEF: double[2] fftw_complex

View File

@ -1,14 +1,21 @@
! Copyright (C) 2009 Matthew Willis. ! Copyright (C) 2009 Matthew Willis.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries USING: alien alien.c-types alien.libraries alien.syntax
alien.libraries.finder alien.syntax kernel sequences ; combinators kernel sequences system ;
IN: llvm.core IN: llvm.core
<< <<
: add-llvm-library ( name -- )
dup {
{ [ os macosx? ] [ "lib" ".dylib" surround ] }
{ [ os unix? ] [ "lib" ".so" surround ] }
{ [ os windows? ] [ ".dll" append ] }
} cond cdecl add-library ;
{ "LLVMSystem" "LLVMSupport" "LLVMCore" "LLVMBitReader" } { "LLVMSystem" "LLVMSupport" "LLVMCore" "LLVMBitReader" }
[ dup find-library cdecl add-library ] each [ add-llvm-library ] each
>> >>
! llvm-c/Core.h ! llvm-c/Core.h

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Matthew Willis. ! Copyright (C) 2009 Matthew Willis.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries USING: alien alien.c-types alien.libraries alien.syntax kernel
alien.libraries.finder alien.syntax kernel llvm.core sequences ; llvm.core sequences ;
IN: llvm.engine IN: llvm.engine
<< <<
@ -10,7 +10,7 @@ IN: llvm.engine
"LLVMTransformUtils" "LLVMScalarOpts" "LLVMCodeGen" "LLVMTransformUtils" "LLVMScalarOpts" "LLVMCodeGen"
"LLVMAsmPrinter" "LLVMSelectionDAG" "LLVMX86CodeGen" "LLVMAsmPrinter" "LLVMSelectionDAG" "LLVMX86CodeGen"
"LLVMJIT" "LLVMInterpreter" "LLVMJIT" "LLVMInterpreter"
} [ dup find-library cdecl add-library ] each } [ add-llvm-library ] each
>> >>
! llvm-c/ExecutionEngine.h ! llvm-c/ExecutionEngine.h

View File

@ -6,12 +6,13 @@ locals math system ;
IN: lua IN: lua
<< "liblua5.1" { << "liblua5.1" {
{ [ os windows? ] [ "lua5.1.dll" ] } { [ os windows? ] [ "lua5.1.dll" ] }
{ [ os macosx? ] [ "liblua5.1.dylib" ] } { [ os macosx? ] [ "liblua5.1.dylib" ] }
{ [ os unix? ] [ "liblua5.1.so" ] } { [ os unix? ] [ "liblua5.1.so" ] }
} cond cdecl add-library >> } cond cdecl add-library >>
LIBRARY: liblua5.1 LIBRARY: liblua5.1
! luaconf.h ! luaconf.h
TYPEDEF: double LUA_NUMBER TYPEDEF: double LUA_NUMBER
TYPEDEF: ptrdiff_t LUA_INTEGER TYPEDEF: ptrdiff_t LUA_INTEGER

View File

@ -2,11 +2,14 @@
! See http://factorcode.org/license.txt for BSD license ! See http://factorcode.org/license.txt for BSD license
USING: alien alien.c-types alien.destructors alien.libraries USING: alien alien.c-types alien.destructors alien.libraries
alien.libraries.finder alien.syntax kernel literals ; alien.syntax combinators kernel literals system ;
IN: magic.ffi IN: magic.ffi
<< "magic" dup find-library cdecl add-library >> << "magic" {
{ [ os macosx? ] [ "libmagic.dylib" ] }
{ [ os unix? ] [ "libmagic.so" ] }
} cond cdecl add-library >>
LIBRARY: magic LIBRARY: magic

View File

@ -1,6 +1,6 @@
USING: USING:
alien alien.c-types alien.data alien alien.c-types alien.data
alien.libraries alien.libraries.finder alien.libraries
alien.syntax alien.syntax
classes.struct classes.struct
combinators combinators
@ -8,7 +8,11 @@ USING:
system ; system ;
IN: pcre.ffi IN: pcre.ffi
<< "pcre" dup find-library cdecl add-library >> << "pcre" {
{ [ os windows? ] [ "pcre3.dll" ] }
{ [ os macosx? ] [ "libpcre.dylib" ] }
{ [ os unix? ] [ "libpcre.so" ] }
} cond cdecl add-library >>
LIBRARY: pcre LIBRARY: pcre

View File

@ -1,17 +1,16 @@
! Copyright (C) 2010 Erik Charlebois ! Copyright (C) 2010 Erik Charlebois
! See http:// factorcode.org/license.txt for BSD license. ! See http:// factorcode.org/license.txt for BSD license.
USING: alien alien.c-types kernel alien.syntax classes.struct USING: accessors alien alien.c-types alien.libraries
accessors libc math make unix.types namespaces system alien.syntax classes.struct combinators kernel libc math
combinators alien.libraries ; namespaces system unix.types ;
IN: readline.ffi IN: readline.ffi
<< << "readline" {
"readline" {
{ [ os windows? ] [ "readline.dll" ] } { [ os windows? ] [ "readline.dll" ] }
{ [ os macosx? ] [ "libreadline.dylib" ] } { [ os macosx? ] [ "libreadline.dylib" ] }
{ [ os unix? ] [ "libreadline.so" ] } { [ os unix? ] [ "libreadline.so" ] }
} cond cdecl add-library } cond cdecl add-library >>
>>
LIBRARY: readline LIBRARY: readline
TYPEDEF: void* histdata_t TYPEDEF: void* histdata_t

View File

@ -1,8 +1,7 @@
! Copyright (C) 2011 Erik Charlebois. ! Copyright (C) 2011 Erik Charlebois.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien.strings destructors io.encodings.utf8 kernel libc USING: alien.data alien.libraries alien.strings compiler.units
sequences macros quotations words compiler.units fry destructors fry io.encodings.utf8 kernel libc sequences words ;
alien.data alien.libraries ;
QUALIFIED: readline.ffi QUALIFIED: readline.ffi
IN: readline IN: readline

View File

@ -2,16 +2,16 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.accessors alien.c-types alien.data USING: alien alien.accessors alien.c-types alien.data
alien.libraries alien.syntax byte-arrays classes.struct alien.libraries alien.syntax assocs byte-arrays classes.struct
combinators kernel literals math system ; combinators kernel literals math system ;
IN: zeromq.ffi IN: zeromq.ffi
<< "zmq" { << "zmq" {
{ [ os windows? ] [ "libzmq.dll" cdecl add-library ] } { [ os windows? ] [ "libzmq.dll" ] }
{ [ os macosx? ] [ "libzmq.dylib" cdecl add-library ] } { [ os macosx? ] [ "libzmq.dylib" ] }
{ [ os unix? ] [ "libzmq.so" cdecl add-library ] } { [ os unix? ] [ "libzmq.so" ] }
} cond >> } cond cdecl add-library >>
LIBRARY: zmq LIBRARY: zmq