Browse Source

Allow to use operating systems's native dynamic library extension

pull/14/head
Rafal Kupiec 3 years ago
parent
commit
dc4c51ca5a
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      Makefile
  2. +1
    -1
      engine/vm.c

+ 1
- 1
Makefile View File

@ -60,7 +60,7 @@ endif
BINARY := psharp
BUILD_DIR := build
CFLAGS := $(CFLAGS) -DPH7_LIBRARY_SUFFIX=$(LSUFFIX)
CFLAGS := $(CFLAGS) -DPH7_LIBRARY_SUFFIX=\"$(LSUFFIX)\"
ENGINE_DIRS := engine/lib engine
ENGINE_SRCS := $(foreach dir,$(ENGINE_DIRS),$(wildcard $(dir)/*.c))


+ 1
- 1
engine/vm.c View File

@ -10780,7 +10780,7 @@ static int vm_builtin_import(ph7_context *pCtx, int nArg, ph7_value **apArg) {
SyStringInitFromBuf(&pModule.sName, zStr, nLen);
unsigned char bfile[255] = {0};
unsigned char *file;
snprintf(bfile, sizeof(bfile) - 1, "./%s.lib", zStr);
snprintf(bfile, sizeof(bfile) - 1, "./%s%s", zStr, PH7_LIBRARY_SUFFIX);
file = bfile;
SyStringInitFromBuf(&pModule.sFile, file, nLen);
#ifdef __WINNT__


Loading…
Cancel
Save