summaryrefslogtreecommitdiffstats
path: root/src/bind/javabind.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-03-10 08:18:59 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-03-10 08:18:59 +0000
commit458078cf1cb185c131ed970b7f494731706be7b6 (patch)
tree16c7f11b25082b10d3f03ad210d4c318d449a2de /src/bind/javabind.cpp
parentFixing build (diff)
downloadinkscape-458078cf1cb185c131ed970b7f494731706be7b6.tar.gz
inkscape-458078cf1cb185c131ed970b7f494731706be7b6.zip
Fixed stat include
(bzr r5035)
Diffstat (limited to 'src/bind/javabind.cpp')
-rw-r--r--src/bind/javabind.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index 2710efcda..1786dc731 100644
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
@@ -1,6 +1,6 @@
/**
* This is a simple mechanism to bind Inkscape to Java, and thence
- * to all of the nice things that can be layered upon that.
+ * to all of the nice things that can be layered upon that.
*
* Authors:
* Bob Jamison
@@ -43,6 +43,10 @@
#include <errno.h>
#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#include "javabind.h"
#include "javabind-private.h"
#include <path-prefix.h>
@@ -251,7 +255,7 @@ static CreateVMFunc getCreateVMFunc()
char verbuf[16];
char regpath[80];
strcpy(regpath, "SOFTWARE\\JavaSoft\\Java Runtime Environment");
- bool ret = getRegistryString(HKEY_LOCAL_MACHINE,
+ bool ret = getRegistryString(HKEY_LOCAL_MACHINE,
regpath, "CurrentVersion", verbuf, 15);
if (!ret)
{
@@ -262,7 +266,7 @@ static CreateVMFunc getCreateVMFunc()
strcat(regpath, verbuf);
//msg("reg path: %s\n", regpath);
char libname[80];
- ret = getRegistryString(HKEY_LOCAL_MACHINE,
+ ret = getRegistryString(HKEY_LOCAL_MACHINE,
regpath, "RuntimeLib", libname, 79);
if (!ret)
{
@@ -312,7 +316,7 @@ static void getJavaRoot(String &javaroot)
/**
* Recursively descend into a directory looking for libjvm.so
- */
+ */
static bool findJVMRecursive(const String &dirpath,
std::vector<String> &results)
{
@@ -345,7 +349,7 @@ static bool findJVMRecursive(const String &dirpath,
if (finfo.st_mode & S_IFDIR)
{
ret |= findJVMRecursive(path, results);
- }
+ }
}
closedir(dir);
return ret;
@@ -363,7 +367,7 @@ static const char *commonJavaPaths[] =
/**
* Look for a Java VM (libjvm.so) in several Unix places
- */
+ */
static bool findJVM(String &result)
{
std::vector<String> results;
@@ -480,7 +484,7 @@ static void populateClassPath(const String &javaroot,
cp.append(path);
}
closedir(dir);
-
+
result = cp;
return;