From e75303b2e1fbff3a3429de9e1ca10cacb08337d7 Mon Sep 17 00:00:00 2001 From: lxsang Date: Fri, 26 Feb 2016 14:32:13 +0100 Subject: [PATCH] add flexible compilation, allow to select sqlite support or not --- Makefile | 8 ++++---- build/httpd | Bin 44860 -> 44860 bytes .../httpd.dSYM/Contents/Resources/DWARF/httpd | Bin 42973 -> 42973 bytes build/plugins/dummy.dylib | Bin 43252 -> 43252 bytes build/plugins/fileman.dylib | Bin 47524 -> 47524 bytes build/plugins/pluginsman.dylib | Bin 42916 -> 42916 bytes build/plugins/wterm.dylib | Bin 43540 -> 43540 bytes plugin_manager.c | 4 ++-- plugins/fileman/fileman.c.o | Bin 15304 -> 15340 bytes plugins/plugin.c | 2 ++ plugins/plugin.h | 9 ++++++--- plugins/pluginsman/pluginsman.c.o | Bin 10300 -> 10368 bytes plugins/utils.c | 2 +- plugins/utils.h | 1 + 14 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 089817f..2922239 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC=gcc -CFLAGS=-W -Wall -g -std=c99 -D DEBUG +CFLAGS=-W -Wall -g -std=c99 -D DEBUG -D USE_DB EXT=dylib SERVER=plugin_manager.o ini.o http_server.o plugins/dictionary.o plugins/utils.o SERVERLIB=-lpthread -ldl @@ -8,7 +8,7 @@ ifeq ($(UNAME_S),Linux) BUILDIRD=/root/antd endif ifeq ($(UNAME_S),Darwin) - BUILDIRD=../build + BUILDIRD=./build endif #-lsocket @@ -17,7 +17,7 @@ PLUGINS= dummy.$(EXT) fileman.$(EXT) pluginsman.$(EXT) wterm.$(EXT) PLUGINSDEP = plugins/plugin.o plugins/dbhelper.o plugins/dictionary.o plugins/utils.o plugins/list.o PLUGINLIBS = -lsqlite3 -main: httpd plugins +main: httpd plugins httpd:$(SERVER) @@ -29,7 +29,7 @@ plugins: $(PLUGINS) %.$(EXT): $(PLUGINSDEP) for file in $(wildcard plugins/$(basename $@)/*.c) ; do\ - $(CC) $(CFLAGS) -c $$file -o $$file.o; \ + $(CC) $(CFLAGS) -c $$file -o $$file.o; \ done $(CC) $(CFLAGS) $(PLUGINLIBS) -shared -o $(BUILDIRD)/plugins/$(basename $@).$(EXT) \ $(PLUGINSDEP) plugins/$(basename $@)/*.c.o diff --git a/build/httpd b/build/httpd index 1cdc37f49dd2691b09c46fda3efe56317a09a371..fa086d89703ebd6b50d4b0a286831e471c10010f 100755 GIT binary patch delta 3368 zcmY*b3vd(H72PMWkbjbFY+3%xn2-1vV`Di4VvvbNWUv8;KS{yhKnA8@oWUtg#=$O@ z!?K7txzG{_#AMnO@&P3-3^f+WkYdxJMNB&l0ZNoko2-Zdg|riwPu+XpTMa}r(!P7{ zx#xb~>g{&l&~@L?wFi@Y21#O)B;_r`AN=?}`RdD|=I#Y664sk%tUO`)`qn?DeV}v( zV?sIz8jPt*<3P)K3UJq*clU%Ox7@3qg>MbT><^F=n_<}XJi5G&1K^C!G}fc2Td9u7 zuIp~O4|T*rHe~BdVLQS5@+|`67IzB?TdIw#P z>M~Mcqfn5S)CH^JC$p=tCq8e^Lela&((uw%gBm_b{qJIgdR+r(NwVvm@UOYFW4g#1 zP-{?H%*WK0g+8U}-%4Y*+6^orEzTZgrNfAXG1hn?--`3^T1h%ebpTVWhE)lbY&CqC zFxIe;(kYH2xSn9I>R*U`=C&eJk`}q;f4R5yJKb_q1nZ8d!-(l^x`OovXpdyq6|6Hz zT=j=VkNQ=St*QkuKQU$MaK7_s9zlXOtG6)#w{nm)l*S0wGXDO700@V<+A6S@m2g&*%$dgcP1NI5^0MlLIxT0=5gbnsQA$79hpzKY1U0 z*baPb%FA5)BkU{L6%=&`W+mI7F``5Jqxn0C`S1w@#D7fy{RE8Q za}~ff1h7QXMXh+!+6c#!$Lqhu-qkYrI{D}N9na$OG^`oEEdMkPIx5K9`j`Nl5ahr+ z@YV2iovs)j3@>L7VR}mG=#x#9qrvW0_Ow$Td5@c4jytKwqxgTvSr)>+l#I-!lgV(T z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y@!UXh=gN8X5wo6eqQ2 z2<`(7ZG}oit(gL)bC>e9LK~v?EPwxVlcC=&*bcTjTZDLZ# zo{PZ?{>Y||JqOLZR*b^F2Ttz_GCtY9`){N8q+yRq&nK(jSRNxd`+i^y%X;fIN3>l> z4EWuNLeZA=Ms2P2Uut#jN-S_1bESXh0uqAU0TM9$H=Rn3le=R3`g?gOJy@S{CV e)@&ctAM9dv0rt-31Vd?aX?fY&K->GD#r_|d7m&yR diff --git a/build/httpd.dSYM/Contents/Resources/DWARF/httpd b/build/httpd.dSYM/Contents/Resources/DWARF/httpd index 6c505f5ab91bd1151a348075f432453b4a4307b3..4ae4747c099c85b79e3f24ec19d54040523b048a 100644 GIT binary patch delta 1046 zcmZ9LO=uHA6vt;K+3GAwvq@||n;Jhb8{we%auWzKJ&{0YCHu9OsaSQZ&bJ;Z)#BROdL84aV1K z3$1*V<}Y|72nR$uWs-q4s&!X3!{l7KP0{D zgXak^uS)8HdLqEf(#N@LonHby9isS)E5+S;69t2=&qb2>)moXw?oxc}TSaB~H z(!sn=MPX~&W*#t&P)ax}!)X2~t-{tqm=YK$?4@CtDwNG1tZmu|RP0d%soYfu!XxR)bX#m_QuPrsSceNxb3-b z>~mHLdoN(mhNa1O7vM^?Tcc4l_~3E$prA?E@FRL&&>Y5KxU*k8#HpNsr=3wjGdb$4 zcWzly9gEKrxmS z;a{R9}-ZJsZh y!pL}NGmCghGP9TA`OVc;b6LR*>4shwFk^KKFB6!tyDb(XBHhgkQKLQKqyzwDASwd@ delta 131 zcmexzk?G4trVR}&(n+P6IVt)DIi=~DdByrErMbD4dMTATnMn)`lV`Im6<96ryHhC3 z@MF*Y6x|g}mvlD=u=)uwuGu_aG=-7zz-AWll4RydufsN1SIuPwGo%}OS-_0dExb%% X#_qOQ7Us!7HPYR@tYC)rgp(2gtjRSh diff --git a/build/plugins/fileman.dylib b/build/plugins/fileman.dylib index 846c316e7674ccb24993a1ff824f0137d56c3a07..d122eb1a07577e8d73be4fdd9627e657e9103802 100755 GIT binary patch delta 339 zcmZ4TnQ6&qrVR}&OnUm08(8EfFJM_9aCGCkhzV^*-m`zNdS3qdu*&8D)_GEl>o&ia zPhn&{v^hlaf-PghWYu_QMw!W(@y?ky7#J8ldQEfqfK+$wix&{we=F4RYM9}CaKkTb2N}NQr2@q8 zNT7;cj9@k|2VBu=u%Znf%|`-a52sDoJRw0si`mQY{N~kNYgxgJ=n1_nV8-hyyi8!m S?`g3Rk?7gH5H;BgEF}RqHi$p~ delta 380 zcmZ4TnQ6&qrVR}&vPq?xIVt)DIi=~DdByr^nK`MsiFtY{l{uM73=EU!vMd((;`(m& z#uc_~&5IA%L>b!s-WPl|EP=J)a`jEo01hbUgKWsI7v8t=>~HaRoix&9IZ1A|Ae zX$~Kd>aKn9!r|us|D6XreXlguUQt-c&cNTN1X1yxmx00Xl1DGE4^U}$?Vk+{FI;v2 z)w&*e*#}V(1~cQ&jsO2WdTj$h{9e;{f*_;I1U$M!A9!^8-tg#j-2v1b4z$RlJGFL) zN9VB@rw{-CZwoYqfxi`MT_emo5x8~Nwu7wO@=^g}T|7|5E=Dk$mk+LJBUsS}kLDu* zv4{EPTY&Nm44Wq;NN6!ndL6cTb=O)}Fe7?GFAJFQdI~QSnDKjBEDQ5wpql8}ysThG I_5w>u0Q>@(!~g&Q diff --git a/build/plugins/pluginsman.dylib b/build/plugins/pluginsman.dylib index 208c682071db1f3132c310fcf9d0202076415c13..7a5c4fbf06dadf12131398736f899aa24a424310 100755 GIT binary patch delta 9693 zcmZWv3tZGy_W#{c1WAM$<^38EL=a~n9844#l#x*p$Jgd=C8*)5i;C~ZiZdiw<1{vU zdYJ1bSzBt^&PHuQT4)ckEXiI}>wl-Re?Q8$X|r80%RTpZ&!va=^O<{o=X<~R+;d;& z-ro-%J*Rv0oX$6#_3n;dYX}Zev^29q$l#FO`%3iIxk7U=A+5W6O7*^Zr09h7!FX1x z@48uNmQW$Pz|Bgd!>Wb0R0xIZI?xYFZ0%+1bTL+hJfvmqUX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n(N{yLcm z=k$c!4oB}!E)73hFQWLeatx^j2=iGpHL#Ls*?f&ne&4`0&ki?ITN#WM6Q(k2Qk}kws;QbG+X=}YPR?e)RF#pP)B8RyxB?{ z4`pF=FElKN;xQeQ@%S2@ln3!(kC|l-)rngPT!I=NhvE!@BhaV7uR{~EI$^h&c|0Jq z?Qv8L3Mp_FYOZ?}>d4{5i0%_#Z>)UjC?nGXL3HWT>fT$P!fzPXWA?>g;}3Edf2(`s z=g1Gq&yy>$jLBb1t|t$Yo5&ll+oE~qXVTNn@}50jJR*T`A&Bsou>CJ&OYkcY?( z=Fn)vE6Hz>^W^u)8^~ki-Q;8B1LRN0ACXUyKQmmwbDqW*47fy| zCVxx*iTopZhCEBYO}0{{R3 diff --git a/plugins/plugin.c b/plugins/plugin.c index a36f975..f57fd0a 100644 --- a/plugins/plugin.c +++ b/plugins/plugin.c @@ -11,6 +11,7 @@ void __init_plugin__(const char* pl,const char*ph,const char* htdocs, const char __plugin__.pdir = strdup(pdir); if(__init__ != NULL) __init__(); }; +#ifdef USE_DB sqldb getdb() { int plen = strlen(__plugin__.name)+strlen(__plugin__.dbpath)+4; @@ -22,6 +23,7 @@ sqldb getdb() free(path); return ret; } +#endif void header_base(int client) { diff --git a/plugins/plugin.h b/plugins/plugin.h index ea4375a..0f02c5d 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -1,7 +1,9 @@ #include #include #include +#ifdef USE_DB #include "dbhelper.h" +#endif #include "dictionary.h" #include "list.h" @@ -24,9 +26,9 @@ typedef struct { typedef void(*call)(); - +#ifdef USE_DB typedef sqlite3* sqldb; - +#endif extern plugin_header __plugin__; extern call __init__; @@ -48,8 +50,9 @@ int __fb(int, const char*); int upload(const char*, const char*); char* route(const char*); char* htdocs(const char*); +#ifdef USE_DB sqldb getdb(); -void dbclose(sqldb); +#endif void set_cookie(int,dictionary); /*Default function for plugin*/ diff --git a/plugins/pluginsman/pluginsman.c.o b/plugins/pluginsman/pluginsman.c.o index bb80d1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c)z3jU$`rrRq9^S{R9c4O*{|yjEkvoSCgV zOW0dY4r>+_N4rst*HZKQ1*(s*xEQpKnpLZz>?_;$;tf%;zOYhLf~jOX9nt(ZJ+dQx zMpTz$bx15@E1F72ZIK#krp7%Ebuz}>+MsoSvQ?CwcWhs_U#nOr|4Fa^O~2GCjs;3j z(lZs&Z#~T{x}c+nh8$vxGwny#)ak_nNpbdT!ICJuT%2$FG zL5Rv0OsY|!2MbZ~Q==~U1mZ-?DUdgO0^&@|N%90}f=_@I$lnI@;lp4aI0*7}eIVWx zxs$w=`~+Aou)B)cg3b5&pn8;5fC_u8xI`ygR{UZWGr3)EUNMQ?KvEtCxetIi9r9VQ zlGVHI1_jXym^;zswrQhxFg2rR_FWq%U!r&K0r@id6!|;yB>4*YQ}R{vd2%y;XFeA2 z;n$N@j|%*cg9i>$!3Xj~u;;V2TR% zkv}4@C4WX9B2SYaBmYL;K)ylVOm4@?fQ0B1$o6951J diff --git a/plugins/utils.c b/plugins/utils.c index 469af6b..6ee596e 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -325,4 +325,4 @@ unsigned hash(const char* key, int hash_size) for (hashval = 0; *key != '\0'; key++) hashval = *key + 31 * hashval; return hashval % hash_size; -} +} \ No newline at end of file diff --git a/plugins/utils.h b/plugins/utils.h index e1d327f..6945b1c 100644 --- a/plugins/utils.h +++ b/plugins/utils.h @@ -40,6 +40,7 @@ THE SOFTWARE. #define IEQU(a,b) (strcasecmp(a,b) == 0) #define IS_INT(a) (match_int(a)) #define IS_FLOAT(a) (match_float(a)) +#define FILE_OK(f) ( access( f, F_OK ) != -1 ) #define DIR_SEP "/" #define true 1 #define false 0