[Smipl-devel] SF.net SVN: smipl:[43] smipl-devel/src
Brought to you by:
the_student
From: <the...@us...> - 2009-08-22 14:20:24
|
Revision: 43 http://smipl.svn.sourceforge.net/smipl/?rev=43&view=rev Author: the_student Date: 2009-08-22 14:20:13 +0000 (Sat, 22 Aug 2009) Log Message: ----------- * Fixed linux builds Modified Paths: -------------- smipl-devel/src/Error.h smipl-devel/src/ModuleSystem/modload.cpp smipl-devel/src/SIA/SIASOUND.h smipl-devel/src/SMIPL-header.h smipl-devel/src/SMIPL.cpp smipl-devel/src/SVM.h Modified: smipl-devel/src/Error.h =================================================================== --- smipl-devel/src/Error.h 2009-08-22 11:30:57 UTC (rev 42) +++ smipl-devel/src/Error.h 2009-08-22 14:20:13 UTC (rev 43) @@ -1,7 +1,7 @@ -char* LastSysError; -char* GetLastSysError() { - return LastSysError; -} -void SetLastSysError(char* err) { - LastSysError=err; -} +char* LastSysError; +char* GetLastSysError() { + return LastSysError; +} +void SetLastSysError(char* err) { + LastSysError=err; +} Modified: smipl-devel/src/ModuleSystem/modload.cpp =================================================================== --- smipl-devel/src/ModuleSystem/modload.cpp 2009-08-22 11:30:57 UTC (rev 42) +++ smipl-devel/src/ModuleSystem/modload.cpp 2009-08-22 14:20:13 UTC (rev 43) @@ -12,13 +12,13 @@ #ifdef system_is_posix #include <dlfcn.h> -void GetAddress(void* Module, char* funcname, void *func) - *func=(void)*dlsym(handle, funcname); +void GetAddress(void* Module, char* funcname, void *func) { + func=dlsym(Module, funcname); } void OpenModule(char*fn) { char str[255], str2[255]; sprintf(str, "/Library/%s/Address"); sprintf(str2, "%s.so",fn); - MDS_Set(str, (double)*dlopen(fn, RTLD_LAZY)); + MDS_Set(str, *(value_t*)dlopen(fn, RTLD_LAZY)); } #endif Modified: smipl-devel/src/SIA/SIASOUND.h =================================================================== --- smipl-devel/src/SIA/SIASOUND.h 2009-08-22 11:30:57 UTC (rev 42) +++ smipl-devel/src/SIA/SIASOUND.h 2009-08-22 14:20:13 UTC (rev 43) @@ -15,7 +15,7 @@ void MIDI_Write(MIDI_Message Melding) { pthread_mutex_lock(&SIA_SOUND); if(MIDI_OUT_INITED) { - write(MIDI_Out, Melding.word, sizeof(Melding.word)); + write(MIDI_Out, Melding.data, sizeof(Melding.word)); } pthread_mutex_unlock(&SIA_SOUND); } Modified: smipl-devel/src/SMIPL-header.h =================================================================== --- smipl-devel/src/SMIPL-header.h 2009-08-22 11:30:57 UTC (rev 42) +++ smipl-devel/src/SMIPL-header.h 2009-08-22 14:20:13 UTC (rev 43) @@ -13,14 +13,15 @@ #include "FS/physfs_stream.cpp" //SMIPL -#define cmd_is(c) !strcasecmp(cmd.argv[0],c) +#define cmd_is(c) !strcasecmp(cmd.argv[0],c) +#define stricmp strcasecmp bool Init(int,char**); bool DeInit(); //SMIPL Basic Services -#include "Config.h" +#include "config.h" #include "String.h" -#include "Log.h" +#include "log.h" #include "Scheduler.h" #include "Error.h" #include "FS/FS.h" Modified: smipl-devel/src/SMIPL.cpp =================================================================== --- smipl-devel/src/SMIPL.cpp 2009-08-22 11:30:57 UTC (rev 42) +++ smipl-devel/src/SMIPL.cpp 2009-08-22 14:20:13 UTC (rev 43) @@ -1,11 +1,11 @@ -#include "SMIPL-header.h" -int main(int argc, char **argv) { - cout<<"Setting up version globals"<<endl; - MDS_Create("/Global/smipl.version.major",3); - MDS_Create("/Global/smipl.version.minor",50); - MDS_Create("/Global/smipl.version.patch",0); - cout<<"Running init"<<endl; - if(!Init(argc, argv)) {cerr<<"Init error:"<<GetLastSysError()<<endl;for(;;);} - else if(!Console(argc, argv)) {cerr<<"Console error"<<GetLastSysError()<<endl;for(;;);} - if(!DeInit()) {cerr<<"DeInit error:"<<GetLastSysError()<<endl;for(;;);} -} +#include "SMIPL-header.h" +int main(int argc, char **argv) { + cout<<"Setting up version globals"<<endl; + MDS_Create("/Global/smipl.version.major",3); + MDS_Create("/Global/smipl.version.minor",50); + MDS_Create("/Global/smipl.version.patch",0); + cout<<"Running init"<<endl; + if(!Init(argc, argv)) {cerr<<"Init error:"<<GetLastSysError()<<endl;for(;;);} + else if(!Console(argc, argv)) {cerr<<"Console error"<<GetLastSysError()<<endl;for(;;);} + if(!DeInit()) {cerr<<"DeInit error:"<<GetLastSysError()<<endl;for(;;);} +} Modified: smipl-devel/src/SVM.h =================================================================== --- smipl-devel/src/SVM.h 2009-08-22 11:30:57 UTC (rev 42) +++ smipl-devel/src/SVM.h 2009-08-22 14:20:13 UTC (rev 43) @@ -9,7 +9,7 @@ SMIPL_String cmd; value_t number,number2; MIDI_Message MIDI_Melding; - + void MDS_Get(char* Name, value_t* value) { pthread_mutex_lock(&Admin); if(JailAddress==NULL) {str1=new char[strlen(Name)+1];strcpy(str1,"/");} @@ -45,15 +45,15 @@ if(*b==0) *b=atof(a); pthread_mutex_unlock(&doatof); } - + void*Run(void*); SVM_Thread* Next; - SVM_Thread() { - Admin=PTHREAD_MUTEX_INITIALIZER; - AllowGetGlobal=isVM0=false; - JailAddress=NULL; - StartAddress=0; - Next=NULL; + SVM_Thread() { + pthread_mutex_unlock(&Admin); + AllowGetGlobal=isVM0=false; + JailAddress=NULL; + StartAddress=0; + Next=NULL; } }VM0; pthread_mutex_t doStartThread=PTHREAD_MUTEX_INITIALIZER; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |