OSX / BSD support
This commit is contained in:
parent
6309826bf2
commit
81e2495aba
@ -10,6 +10,8 @@ Using SlideScript
|
||||
* Modify test.ss to learn the basics of SS.
|
||||
* Run ./test.ss to execute the script.
|
||||
|
||||
***NOTE: if compiling on OSX/BSD, please uncomment #define BSD in src/config.h***
|
||||
|
||||
Documentation
|
||||
-----
|
||||
Here is a list of functions and features that SlideScript comes with
|
||||
|
3
src/config.h
Normal file
3
src/config.h
Normal file
@ -0,0 +1,3 @@
|
||||
// DEFINE IF YOU WANT TO COMPILE VIA BSD / OSX
|
||||
//#define BSD 1
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include "config.h"
|
||||
#include "sbyteswap.h"
|
||||
#include <sys/types.h>
|
||||
// Networking
|
||||
|
@ -72,7 +72,7 @@ static void common64_end (md5_ctx_t *ctx, int swap_needed)
|
||||
if (remaining >= 8)
|
||||
{
|
||||
uint64_md5 t = ctx->total64 << 3;
|
||||
if (swap_needed) t = __bswap_64 (t);
|
||||
if (swap_needed) t = bswap_64 (t);
|
||||
*(uint64_md5 *) (&ctx->wbuffer [64 - 8]) = t;
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,9 @@ void snet_http(int port, int forkval)
|
||||
if(fork() != 0)
|
||||
syn_error("ss:net:http forked");
|
||||
|
||||
#ifndef BSD
|
||||
signal(SIGCLD, SIG_IGN);
|
||||
#endif
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
for(i=0;i<32;i++) {
|
||||
close(i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user