Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

build fixes

  • Loading branch information...
commit 6fb75d0e5e80286b1fe07ed2d8d676bcdf040c5b 1 parent 880b961
krizsa authored
8 include/cMgr.h
View
@@ -228,19 +228,27 @@ struct cMgr : cUnk, iMgr {
Buf downloadInstaller(iCtx* ctx)
{
o3_trace_comglue("downloadInstaller");
+#ifdef O3_PLUGIN
Str url = Str(O3_REPO_URL)
+ O3_PLUGIN_INSTALLER;
return downloadFile(url, ctx, Delegate(), Delegate());
+#else
+ return Buf();
+#endif
}
Buf downloadHashes( iCtx* ctx )
{
o3_trace_comglue("downloadHashes");
+#ifdef O3_PLUGIN
Str url = Str(O3_REPO_URL)
+ O3_PLUGIN_VERSION;
return downloadFile(url, ctx, Delegate(), Delegate());
+#else
+ return Buf();
+#endif
}
Buf downloadFile( Str url, iCtx* ctx, Delegate onreadystatechange,
8 include/cO3.h
View
@@ -165,6 +165,7 @@ struct cO3 : cScr {
o3_fun void doInstall()
{
o3_trace_scrfun("doInstall");
+#ifdef O3_PLUGIN
siCtx ctx = m_ctx;
siFs dir_of_installer = ctx->mgr()->factory("installerDir")(0);
@@ -216,6 +217,7 @@ struct cO3 : cScr {
execve("/usr/bin/open", cmd, env);
}
#endif // O3_APPLE
+#endif // O3_PLUGIN
}
o3_get tVec<Str> args()
@@ -685,6 +687,7 @@ o3_trace_scrfun("moduleUpdating");
o3_set siScr setOnupdate(iCtx* ctx, iScr* onupdate)
{
o3_trace_scrfun("setOnupdate");
+#ifdef O3_PLUGIN
siFs updater = siFs(ctx->mgr()->factory("pluginDir")(0))->get(O3_PLUGIN_UPDATER);
if (!m_installer)
@@ -706,7 +709,10 @@ o3_trace_scrfun("moduleUpdating");
}
#endif // O3_APPLE
return onupdate;
- }
+#else // O3_PLUGIN
+ return siScr();
+#endif //O3_PLUGIN
+ }
o3_get siScr oninstall()
{
6 include/cScrBuf.h
View
@@ -215,8 +215,8 @@ struct cScrBuf : cScr, iBuf {
sourceEnd = (sourceEnd<0 || sourceEnd>target->unwrap().size())
? target->unwrap().size() : sourceEnd;
- int tl = max(target->unwrap().size()-targetStart, 0);
- int sl = max(min(sourceEnd-sourceStart, m_buf.size()-sourceStart),0);
+ int tl = max((int)target->unwrap().size()-targetStart, 0);
+ int sl = max(min(sourceEnd-sourceStart, (int)m_buf.size()-sourceStart),0);
int l = min(tl,sl);
memCopy((uint8_t*)m_buf.ptr() + sourceStart,
@@ -226,7 +226,7 @@ struct cScrBuf : cScr, iBuf {
o3_fun siScr slice(int start, int end)
{
start = max(0,start);
- end = min(end, m_buf.size());
+ end = min(end, (int)m_buf.size());
return o3_new(cScrBuf)(Buf((uint8_t*)m_buf.ptr()+start, end-start));
}
3  include/cSys_posix.h
View
@@ -556,7 +556,7 @@ struct cMessageLoop : cUnk, iMessageLoop {
o3_cls(cSys);
-struct cSys : cSysBase, file(0) {
+struct cSys : cSysBase {
int fd;
size_t m_overall;
struct sockaddr_in addr;
@@ -565,6 +565,7 @@ struct cSys : cSysBase, file(0) {
cSys()
{
o3_trace_no_trace;
+ file = 0;
m_overall = 0;
#ifdef O3_LOGFILE
removeLogFile();
6 modules/js/cJs_posix.h
View
@@ -82,6 +82,10 @@ struct cJs : cJsBase {
}
return 0;
}
+
+ virtual Str className(){
+ return "ScrObj";
+ }
};
static void* cast(Local<Value> value)
@@ -508,7 +512,7 @@ struct cJs : cJsBase {
static o3_ext("cO3") o3_get siScr js(iCtx* ctx)
{
- o3_trace_hostglue("js", __FILE__, __LINE__);
+ o3_trace_hostglue("js");
#ifndef O3_NODE
Var js = ctx->value("js");
10 modules/socket/cSocketBase.h
View
@@ -301,17 +301,27 @@ namespace o3 {
return m_on_error = cb;
}
+ Str className()
+ {
+ if (m_class_name.size())
+ return m_class_name;
+ else
+ return cScr::className();
+ }
+
o3_fun void close() = 0;
o3_fun void shutdown() = 0;
o3_prop size_t m_packet_size;
o3_prop size_t m_min_receive_size;
+ Str m_class_name;
o3_get size_t m_bytes_sent;
o3_get size_t m_bytes_received;
o3_get Type m_type;
o3_get Str m_src_address;
+
siScr m_on_accept;
siScr m_on_connect;
siScr m_on_receive;
Please sign in to comment.
Something went wrong with that request. Please try again.