Merge branch 'master' of git://factorcode.org/git/factor
commit
b8434788bd
|
@ -12,12 +12,18 @@
|
||||||
#define UNIX
|
#define UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
#define BSD
|
#define BSD
|
||||||
#define OPENBSD
|
#define OPENBSD
|
||||||
#define UNIX
|
#define UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#define BSD
|
||||||
|
#define MACOSX
|
||||||
|
#define UNIX
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(linux)
|
#if defined(linux)
|
||||||
#define LINUX
|
#define LINUX
|
||||||
#define UNIX
|
#define UNIX
|
||||||
|
@ -34,6 +40,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -134,6 +141,10 @@ void unix_constants()
|
||||||
constant(EINTR);
|
constant(EINTR);
|
||||||
constant(EAGAIN);
|
constant(EAGAIN);
|
||||||
constant(EINPROGRESS);
|
constant(EINPROGRESS);
|
||||||
|
constant(PROT_READ);
|
||||||
|
constant(PROT_WRITE);
|
||||||
|
constant(MAP_FILE);
|
||||||
|
constant(MAP_SHARED);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
|
@ -225,3 +225,6 @@ PRIVATE>
|
||||||
|
|
||||||
: replace ( str oldseq newseq -- str' )
|
: replace ( str oldseq newseq -- str' )
|
||||||
H{ } 2seq>assoc substitute ;
|
H{ } 2seq>assoc substitute ;
|
||||||
|
|
||||||
|
: remove-nth ( seq n -- seq' )
|
||||||
|
cut-slice 1 tail-slice append ;
|
||||||
|
|
Loading…
Reference in New Issue