summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/java/java.c10
-rw-r--r--ext/java/java.dsp4
-rw-r--r--ext/rpc/java/java.c10
-rw-r--r--ext/rpc/java/java.dsp4
4 files changed, 26 insertions, 2 deletions
diff --git a/ext/java/java.c b/ext/java/java.c
index ed78777e77..6bb0aaa2d0 100644
--- a/ext/java/java.c
+++ b/ext/java/java.c
@@ -29,6 +29,13 @@
#include "php_ini.h"
#include "php_globals.h"
+#ifdef PHP_WIN32
+ #include "win32/winutil.h"
+ #define DL_ERROR php_win_err()
+#else
+ #define DL_ERROR dlerror()
+#endif
+
#include <jni.h>
#include <stdio.h>
@@ -185,7 +192,8 @@ static int jvm_create() {
dl_handle = DL_LOAD(javalib);
if (!dl_handle) {
- php_error(E_ERROR, "Unable to load Java Library %s", javalib);
+ php_error(E_ERROR, "Unable to load Java Library %s, error: %s",
+ javalib, DL_ERROR);
return -1;
}
}
diff --git a/ext/java/java.dsp b/ext/java/java.dsp
index 2cc1633245..6c33f4e0e3 100644
--- a/ext/java/java.dsp
+++ b/ext/java/java.dsp
@@ -150,6 +150,10 @@ LINK32=link.exe
SOURCE=.\java.c
# End Source File
+# Begin Source File
+
+SOURCE=.\..\..\win32\winutil.c
+# End Source File
# End Group
# Begin Group "Header Files"
diff --git a/ext/rpc/java/java.c b/ext/rpc/java/java.c
index ed78777e77..6bb0aaa2d0 100644
--- a/ext/rpc/java/java.c
+++ b/ext/rpc/java/java.c
@@ -29,6 +29,13 @@
#include "php_ini.h"
#include "php_globals.h"
+#ifdef PHP_WIN32
+ #include "win32/winutil.h"
+ #define DL_ERROR php_win_err()
+#else
+ #define DL_ERROR dlerror()
+#endif
+
#include <jni.h>
#include <stdio.h>
@@ -185,7 +192,8 @@ static int jvm_create() {
dl_handle = DL_LOAD(javalib);
if (!dl_handle) {
- php_error(E_ERROR, "Unable to load Java Library %s", javalib);
+ php_error(E_ERROR, "Unable to load Java Library %s, error: %s",
+ javalib, DL_ERROR);
return -1;
}
}
diff --git a/ext/rpc/java/java.dsp b/ext/rpc/java/java.dsp
index 2cc1633245..6c33f4e0e3 100644
--- a/ext/rpc/java/java.dsp
+++ b/ext/rpc/java/java.dsp
@@ -150,6 +150,10 @@ LINK32=link.exe
SOURCE=.\java.c
# End Source File
+# Begin Source File
+
+SOURCE=.\..\..\win32\winutil.c
+# End Source File
# End Group
# Begin Group "Header Files"