fixed solaris build

Mon, 09 Sep 2013 12:15:54 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 09 Sep 2013 12:15:54 +0200
changeset 93
95b77e842db3
parent 92
382bff43c6eb
child 94
6b15a094d996

fixed solaris build

config.mk file | annotate | diff | comparison | revisions
make/suncc.mk file | annotate | diff | comparison | revisions
src/server/admin/admin.c file | annotate | diff | comparison | revisions
src/server/daemon/acl.c file | annotate | diff | comparison | revisions
src/server/plugins/java/Makefile file | annotate | diff | comparison | revisions
templates/config/init.conf file | annotate | diff | comparison | revisions
templates/config/obj.conf file | annotate | diff | comparison | revisions
--- a/config.mk	Mon Sep 09 11:55:14 2013 +0200
+++ b/config.mk	Mon Sep 09 12:15:54 2013 +0200
@@ -3,13 +3,13 @@
 #
 
 INSTALL_DIR = /export/home/olaf/Projekte/webserver/work
-HOST = x4.fritz.box
+HOST = sunfire
 
 
-include $(BUILD_ROOT)/make/gcc.mk
-include $(BUILD_ROOT)/make/linux.mk
+include $(BUILD_ROOT)/make/suncc.mk
+include $(BUILD_ROOT)/make/solaris.mk
 
-CFLAGS += -I/usr/include/libxml2  
-LDFLAGS += -lxml2 -lssl -lcrypto  
+CFLAGS += -I/usr/include/libxml2 -I/usr/sfw/include  
+LDFLAGS += -R/usr/sfw/lib -L/usr/sfw/lib -lxml2 -lpthread -lz -lm -lssl -lcrypto -lsocket -lnsl -ldl  
 
 
--- a/make/suncc.mk	Mon Sep 09 11:55:14 2013 +0200
+++ b/make/suncc.mk	Mon Sep 09 12:15:54 2013 +0200
@@ -27,11 +27,11 @@
 #
 
 CFLAGS += -xc99 -g -D_REENTRANT
-LDFLAGS += -R../lib
+LDFLAGS += -Wl,-R,'$$ORIGIN/../lib'
 
 CC  = cc
 CXX = CC
 LD = cc
 
 SHLIB_CFLAGS = -Kpic
-SHLIB_FLAGS = -G
+SHLIB_LDFLAGS = -G
--- a/src/server/admin/admin.c	Mon Sep 09 11:55:14 2013 +0200
+++ b/src/server/admin/admin.c	Mon Sep 09 12:15:54 2013 +0200
@@ -64,7 +64,7 @@
     char *uri = pblock_findkeyval(pb_key_uri, rq->reqpb);
     uri++;
     uri = strchr(uri, '/');
-    size_t uri_len = strlen(uri);
+    size_t uri_len = uri ? strlen(uri) : 0;
     // start with second character to skip leading '/'
     int s = 0;
     int i = 1;
@@ -117,7 +117,10 @@
 }
 
 int adm_listener(Page *page, AdminRequest *rq) {
-    printf("adm_listener\n");
+    SYS_NETFD out = rq->sn->csd;
+    
+    
+    
     return REQ_PROCEED;
 }
 
--- a/src/server/daemon/acl.c	Mon Sep 09 11:55:14 2013 +0200
+++ b/src/server/daemon/acl.c	Mon Sep 09 12:15:54 2013 +0200
@@ -321,7 +321,7 @@
         sstr_t pp = sstr(path);
         p.length = wd.length + pp.length + 1;
         p.ptr = malloc(p.length + 1);
-        p = sstrncat(3, p, wd, sstrn("/", 1), pp);
+        p = sstrncat(p, 3, wd, sstrn("/", 1), pp);
         p.ptr[p.length] = '\0';
     } else {
         p = sstrdup(sstr(path));
--- a/src/server/plugins/java/Makefile	Mon Sep 09 11:55:14 2013 +0200
+++ b/src/server/plugins/java/Makefile	Mon Sep 09 12:15:54 2013 +0200
@@ -30,7 +30,7 @@
 include $(BUILD_ROOT)/config.mk
 
 # LDFLAGS += -lpthread -ldl -lnsl -lm -lxerces-c -lldap
-CFLAGS += -I/usr/java/include -I/usr/java/include/solaris  -I../../ -Kpic
+CFLAGS += -I/usr/java/include -I/usr/java/include/solaris  -I../../ -I../../../ -Kpic
 LDFLAGS = -shared -Kpic
 
 OBJ_DIR = $(BUILD_ROOT)/build/
--- a/templates/config/init.conf	Mon Sep 09 11:55:14 2013 +0200
+++ b/templates/config/init.conf	Mon Sep 09 12:15:54 2013 +0200
@@ -2,5 +2,5 @@
 # init.conf
 #
 
-Init fn="init-test"
-
+Init fn="admin-init"
+Init fn="webdav-init"
--- a/templates/config/obj.conf	Mon Sep 09 11:55:14 2013 +0200
+++ b/templates/config/obj.conf	Mon Sep 09 12:15:54 2013 +0200
@@ -6,6 +6,7 @@
 
 <Object name="default">
 NameTrans fn="assign-name" from="/hello" name="hello"
+NameTrans fn="assign-name" from="/admin name="admin"
 ObjectType fn="type-by-extension"
 Service fn="send-options" method="OPTIONS"
 Service fn="common-index" type="internal/directory"
@@ -17,3 +18,6 @@
 Service fn="service-hello"
 </Object>
 
+<Object name="admin">
+Service fn="admin-service"
+</Object>

mercurial