Skip to content
Snippets Groups Projects
Commit f7acefd9 authored by zimoch's avatar zimoch
Browse files

support munched C++ libs

parent ef77393b
No related branches found
No related tags found
1 merge request!7Submodule merge
...@@ -35,12 +35,12 @@ int require(char* lib, char* version) ...@@ -35,12 +35,12 @@ int require(char* lib, char* version)
} }
if (version) if (version)
{ {
sprintf(libname, "%s/%sLib-%s", *path, lib, version); sprintf(libname, "%s/%sLib-%s.munch", *path, lib, version);
sprintf(dbdname, "%s/dbd/%s-%s.dbd", *path, lib, version); sprintf(dbdname, "%s/dbd/%s-%s.dbd", *path, lib, version);
} }
else else
{ {
sprintf(libname, "%s/%sLib", *path, lib); sprintf(libname, "%s/%sLib.munch", *path, lib);
sprintf(dbdname, "%s/dbd/%s.dbd", *path, lib); sprintf(dbdname, "%s/dbd/%s.dbd", *path, lib);
} }
...@@ -48,14 +48,29 @@ int require(char* lib, char* version) ...@@ -48,14 +48,29 @@ int require(char* lib, char* version)
if (!loaded) if (!loaded)
{ {
/* Load library and dbd file of requested version */ /* Load library and dbd file of requested version */
if (stat(libname, &filestat) == ERROR)
{
/* no munched lib */
libname[strlen(libname)-6]=0; /* skip ".munch" */
}
if (stat(libname, &filestat) == ERROR)
{
printf("Library %s not found\n", libname);
printf("Aborting startup stript.\n");
shellScriptAbort();
return ERROR;
}
errno = 0; errno = 0;
if (ld(0, 0, libname) == NULL) if (ld(0, 0, libname) == NULL)
{ {
if (errno == S_symLib_SYMBOL_NOT_FOUND) printf("Aborting startup stript.\n");
{ shellScriptAbort();
printf ("Library requires some other library\n"); return ERROR;
} }
printf ("Aborting startup stript.\n"); if (errno == S_symLib_SYMBOL_NOT_FOUND)
{
printf("Library requires some other library\n");
printf("Aborting startup stript.\n");
shellScriptAbort(); shellScriptAbort();
return ERROR; return ERROR;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment