|
|
|
@ -1,6 +1,24 @@
|
|
|
|
|
Index: Makefile
|
|
|
|
|
--- Makefile.orig 2009-07-27 09:55:23 +0200
|
|
|
|
|
+++ Makefile 2010-01-07 09:58:18 +0100
|
|
|
|
|
@@ -2,11 +2,11 @@
|
|
|
|
|
|
|
|
|
|
INSTALL_PREFIX = /usr/local
|
|
|
|
|
|
|
|
|
|
-CFLAGS = -Wall -O3 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE
|
|
|
|
|
-EXTFLAGS = -pthread
|
|
|
|
|
+CFLAGS = -Wall -O2 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE
|
|
|
|
|
+EXTFLAGS =
|
|
|
|
|
MAKESO = $(CC) -shared -WBsymbolic
|
|
|
|
|
LIBNEKO_NAME = libneko.so
|
|
|
|
|
-LIBNEKO_LIBS = -ldl -lgc -lm
|
|
|
|
|
+LIBNEKO_LIBS = -lgc -lm
|
|
|
|
|
NEKOVM_FLAGS = -Lbin -lneko
|
|
|
|
|
STD_NDLL_FLAGS = ${NEKOVM_FLAGS}
|
|
|
|
|
INSTALL_FLAGS =
|
|
|
|
|
Index: libs/std/process.c
|
|
|
|
|
--- libs/std/process.c.orig 2008-03-16 14:59:15 +0100
|
|
|
|
|
+++ libs/std/process.c 2008-05-30 13:23:36 +0200
|
|
|
|
|
--- libs/std/process.c.orig 2009-07-27 09:55:13 +0200
|
|
|
|
|
+++ libs/std/process.c 2010-01-07 09:58:18 +0100
|
|
|
|
|
@@ -23,7 +23,7 @@
|
|
|
|
|
# include <unistd.h>
|
|
|
|
|
# include <errno.h>
|
|
|
|
@ -10,35 +28,63 @@ Index: libs/std/process.c
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
Index: libs/std/sys.c
|
|
|
|
|
--- libs/std/sys.c.orig 2009-07-27 09:55:14 +0200
|
|
|
|
|
+++ libs/std/sys.c 2010-01-07 09:58:18 +0100
|
|
|
|
|
@@ -35,7 +35,6 @@
|
|
|
|
|
# include <termios.h>
|
|
|
|
|
# include <sys/time.h>
|
|
|
|
|
# include <sys/times.h>
|
|
|
|
|
-# include <xlocale.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef NEKO_MAC
|
|
|
|
|
@@ -123,7 +122,7 @@
|
|
|
|
|
<doc>Set the locale for LC_TIME, returns true on success</doc>
|
|
|
|
|
**/
|
|
|
|
|
static value set_time_locale( value l ) {
|
|
|
|
|
-#ifdef NEKO_POSIX
|
|
|
|
|
+#if 0
|
|
|
|
|
locale_t lc, old;
|
|
|
|
|
val_check(l,string);
|
|
|
|
|
lc = newlocale(LC_TIME_MASK,val_string(l),NULL);
|
|
|
|
|
Index: src/tools/install.neko
|
|
|
|
|
--- src/tools/install.neko.orig 2008-03-16 14:59:25 +0100
|
|
|
|
|
+++ src/tools/install.neko 2008-05-30 13:26:33 +0200
|
|
|
|
|
@@ -39,24 +39,6 @@
|
|
|
|
|
--- src/tools/install.neko.orig 2009-07-27 09:55:22 +0200
|
|
|
|
|
+++ src/tools/install.neko 2010-01-07 10:00:59 +0100
|
|
|
|
|
@@ -39,32 +39,6 @@
|
|
|
|
|
// LIBS DATAS
|
|
|
|
|
|
|
|
|
|
libs = {
|
|
|
|
|
- mod_neko => {
|
|
|
|
|
- src => $array("mod_neko","cgi","../../vm/context","../../vm/stats"),
|
|
|
|
|
- src => $array("../../vm/stats","mod_neko","cgi"),
|
|
|
|
|
- inc => "httpd.h",
|
|
|
|
|
- incname => "Apache 1.3.x"
|
|
|
|
|
- },
|
|
|
|
|
- mod_neko2 => {
|
|
|
|
|
- src => $array("mod_neko","cgi","../../vm/context","../../vm/stats"),
|
|
|
|
|
- src => $array("../../vm/stats","mod_neko","cgi"),
|
|
|
|
|
- inc => $array("httpd.h","apr.h"),
|
|
|
|
|
- incname => "Apache 2.2.x",
|
|
|
|
|
- cflags => "-D_LARGEFILE64_SOURCE",
|
|
|
|
|
- realdir => "mod_neko",
|
|
|
|
|
- apache2 => true,
|
|
|
|
|
- },
|
|
|
|
|
- mysql => {
|
|
|
|
|
- src => $array("mysql"),
|
|
|
|
|
- inc => "mysql.h",
|
|
|
|
|
- incname => "MySQL 4.+"
|
|
|
|
|
- lib => "libmysqlclient.a",
|
|
|
|
|
- lib => "libmysqlclient_r.a",
|
|
|
|
|
- lparams => "-lz -lssl"
|
|
|
|
|
- },
|
|
|
|
|
- mysql5 => {
|
|
|
|
|
- src => $array("../common/sha1","../common/socket","my_proto/my_proto","my_proto/my_api","mysql"),
|
|
|
|
|
- inc => $array(),
|
|
|
|
|
- realdir => "mysql",
|
|
|
|
|
- cflags => "-Imy_proto -I../common",
|
|
|
|
|
- },
|
|
|
|
|
regexp => {
|
|
|
|
|
src => $array("regexp"),
|
|
|
|
|
inc => "pcre.h",
|
|
|
|
|
@@ -69,24 +51,11 @@
|
|
|
|
|
@@ -77,46 +51,18 @@
|
|
|
|
|
incname => "LibZ",
|
|
|
|
|
lparams => "-lz",
|
|
|
|
|
},
|
|
|
|
@ -54,48 +100,85 @@ Index: src/tools/install.neko
|
|
|
|
|
- incname => switch system { "Mac" => "Carbon" default => "GTK+2.0" },
|
|
|
|
|
- cflags => switch system { "Mac" => "" default => "`pkg-config --cflags gtk+-2.0`" },
|
|
|
|
|
- lparams => switch system { "Mac" => "-framework Carbon" default => "`pkg-config --libs gtk+-2.0` -lgthread-2.0" },
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- mod_tora => {
|
|
|
|
|
- src => $array("../common/socket","protocol","mod_tora"),
|
|
|
|
|
- inc => "httpd.h",
|
|
|
|
|
- incname => "Apache 1.3.x",
|
|
|
|
|
- cflags => "-I../common",
|
|
|
|
|
- },
|
|
|
|
|
- mod_tora2 => {
|
|
|
|
|
- src => $array("../common/socket","protocol","mod_tora"),
|
|
|
|
|
- inc => $array("httpd.h","apr.h"),
|
|
|
|
|
- incname => "Apache 2.2.x",
|
|
|
|
|
- cflags => "-D_LARGEFILE64_SOURCE -I../common",
|
|
|
|
|
- realdir => "mod_tora",
|
|
|
|
|
- apache2 => true,
|
|
|
|
|
- },
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PLATFORM
|
|
|
|
|
|
|
|
|
|
-cflags = "-O3 -fPIC";
|
|
|
|
|
-if( system == "Linux" ) cflags += " -pthread";
|
|
|
|
|
+cflags = "-O2 -fPIC";
|
|
|
|
|
cc = getenv("CC");
|
|
|
|
|
if( cc == null ) cc = "gcc";
|
|
|
|
|
linkcmd = switch system { "BSD" => "ld" default => cc };
|
|
|
|
|
@@ -112,37 +81,13 @@
|
|
|
|
|
linkneko = "-lneko";
|
|
|
|
|
linkoptions = switch system {
|
|
|
|
|
"Mac" => "-bundle -undefined dynamic_lookup -L../../bin"
|
|
|
|
|
- default => "-shared -L../../bin -pthread"
|
|
|
|
|
+ default => "-shared -L../../bin"
|
|
|
|
|
};
|
|
|
|
|
nekovm = switch system { "Windows" => "..\\bin\\neko" default => "../bin/neko" };
|
|
|
|
|
|
|
|
|
|
search_includes = function(ism2) {
|
|
|
|
|
return $array(
|
|
|
|
|
@@ -140,38 +86,14 @@
|
|
|
|
|
|
|
|
|
|
search_includes = function(isap2) {
|
|
|
|
|
var inc1 = $array(
|
|
|
|
|
- "/usr/include",
|
|
|
|
|
- if( ism2 ) "/usr/local/apache2/include" else "/usr/local/apache/include",
|
|
|
|
|
- if( ism2 ) "/usr/include/apache2" else "/usr/apache/include",
|
|
|
|
|
- if( ism2 ) "/opt/local/apache2/include" else "/opt/local/include/apache",
|
|
|
|
|
- if( ism2 ) "" else "/usr/include/apache-1.3",
|
|
|
|
|
- "/usr/local/include/mysql",
|
|
|
|
|
- "/usr/include/mysql",
|
|
|
|
|
- "/usr/local/include",
|
|
|
|
|
- "/usr/include/apr-1",
|
|
|
|
|
- "/usr/include/apr-1.0",
|
|
|
|
|
- "/usr/include/apr-0",
|
|
|
|
|
- "/usr/include/gtk-2.0",
|
|
|
|
|
- "/usr/local/include/apr-1",
|
|
|
|
|
- "/usr/local/include/apr-1.0",
|
|
|
|
|
- "/usr/local/include/apr-0",
|
|
|
|
|
- "/opt/local/include",
|
|
|
|
|
- "/opt/local/include/apr-1",
|
|
|
|
|
- "/opt/local/include/apr-1.0",
|
|
|
|
|
- "/opt/local/include/apr-0",
|
|
|
|
|
- "/opt/local/include/mysql",
|
|
|
|
|
- "/Developer/Headers/FlatCarbon",
|
|
|
|
|
+ "@l_prefix@/include"
|
|
|
|
|
);
|
|
|
|
|
var inc2;
|
|
|
|
|
if( isap2 )
|
|
|
|
|
inc2 = $array(
|
|
|
|
|
- "/usr/local/apache2/include",
|
|
|
|
|
- "/usr/include/apache2",
|
|
|
|
|
- "/opt/local/apache2/include",
|
|
|
|
|
- "/usr/include/apr-1",
|
|
|
|
|
- "/usr/include/apr-1.0",
|
|
|
|
|
- "/usr/include/apr-0",
|
|
|
|
|
- "/usr/local/include/apr-1",
|
|
|
|
|
- "/usr/local/include/apr-1.0",
|
|
|
|
|
- "/usr/local/include/apr-0",
|
|
|
|
|
- "/opt/local/include/apr-1",
|
|
|
|
|
- "/opt/local/include/apr-1.0",
|
|
|
|
|
- "/opt/local/include/apr-0"
|
|
|
|
|
);
|
|
|
|
|
else
|
|
|
|
|
inc2 = $array(
|
|
|
|
|
- "/usr/apache/include",
|
|
|
|
|
- "/usr/include/apache-1.3",
|
|
|
|
|
- "/usr/include/httpd",
|
|
|
|
|
- "/opt/local/include/apache",
|
|
|
|
|
- "/usr/local/apache/include"
|
|
|
|
|
);
|
|
|
|
|
return $aconcat($array(inc1,inc2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -180,12 +102,7 @@
|
|
|
|
|
cwd = $ssub(cwd,0,$ssize(cwd)-1);
|
|
|
|
|
libraries = $array(
|
|
|
|
|
"../../libs/include",
|
|
|
|
|
cwd,
|
|
|
|
|
- "/usr/lib",
|
|
|
|
|
- "/usr/lib/mysql",
|
|
|
|
|
- "/usr/local/lib",
|
|
|
|
|
- "/usr/local/lib/mysql",
|
|
|
|
|
- "/opt/local/lib",
|
|
|
|
@ -104,21 +187,12 @@ Index: src/tools/install.neko
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
exec = function(cmd) {
|
|
|
|
|
Index: vm/alloc.c
|
|
|
|
|
--- vm/alloc.c.orig 2008-03-16 14:59:25 +0100
|
|
|
|
|
+++ vm/alloc.c 2008-05-30 13:23:36 +0200
|
|
|
|
|
@@ -168,9 +168,14 @@
|
|
|
|
|
# else
|
|
|
|
|
pthread_mutex_init(&p.lock,NULL);
|
|
|
|
|
pthread_mutex_lock(&p.lock);
|
|
|
|
|
+#if 0 && defined(GC_PTHREADS)
|
|
|
|
|
// force the use of a the GC method to capture created threads
|
|
|
|
|
// this function should be defined in gc/gc.h
|
|
|
|
|
if( GC_pthread_create((pthread_t*)handle,NULL,&ThreadMain,&p) != 0 ) {
|
|
|
|
|
+#else
|
|
|
|
|
+#undef pthread_create
|
|
|
|
|
+ if( pthread_create((pthread_t*)handle,NULL,&ThreadMain,&p) != 0 ) {
|
|
|
|
|
+#endif
|
|
|
|
|
pthread_mutex_destroy(&p.lock);
|
|
|
|
|
return 0;
|
|
|
|
|
@@ -358,7 +275,7 @@
|
|
|
|
|
compile(data.src[i],if( data.cflags != null ) data.cflags else "", dirs);
|
|
|
|
|
i = i + 1;
|
|
|
|
|
}
|
|
|
|
|
- link(data.src,name,if( data.lparams != null ) { data.lparams+" " } else ""," "+linklib);
|
|
|
|
|
+ link(data.src,name," "+linklib+" ",if( data.lparams != null ) { " "+data.lparams } else "");
|
|
|
|
|
chdir("..");
|
|
|
|
|
data.built = true;
|
|
|
|
|
}
|
|
|
|
|