File: Tray.diff

package info (click to toggle)
libjdic-java 0.9.5-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,024 kB
  • ctags: 2,427
  • sloc: java: 8,655; xml: 3,837; cpp: 3,437; ansic: 677; sh: 318; makefile: 214
file content (44 lines) | stat: -rw-r--r-- 1,338 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- a/jdic/src/unix/native/jni/Tray.c	2010-01-09 10:31:24.000000000 +0000
+++ b/jdic/src/unix/native/jni/Tray.c	2010-01-09 10:34:50.000000000 +0000
@@ -74,7 +74,31 @@
 static void *awtHandle = NULL;
 
 #ifdef __linux__
-#define LIBARCH  "i386"
+#  if defined(__x86_64__)
+#    define LIBARCH "amd64"
+#  elif defined(__i386__)
+#    define LIBARCH "i386"
+#  elif defined(__alpha__)
+#    define LIBARCH "alpha"
+#  elif defined(__ia64__)
+#    define LIBARCH "ia64"
+#  elif defined(__arm__)
+#    define LIBARCH "arm"
+#  elif defined(__mips__)
+#    define LIBARCH "mips"
+#  elif defined(__MIPSEL__)
+#    define LIBARCH "mipsel"
+#  elif defined(__powerpc__)
+#    define LIBARCH "ppc"
+#  elif defined(__sparc__)
+#    define LIBARCH "sparc"
+#  elif defined(__s390__)
+#    define LIBARCH "s390"
+#  elif defined(__sh__)
+#    define LIBARCH "sh"
+#  else
+#    error "Unknown arch, please edit "__FILE__
+#  endif
 #else
 #ifdef __i386
 #define LIBARCH "i386"
@@ -717,7 +741,7 @@
     awtHandle = dlopen(awtPath, RTLD_LAZY);
     if (awtHandle == NULL) {
         /* must be JDK try JDK location */
-        sprintf(awtPath,"%s/jre/lib/%s/libawt.so",java_home, LIBARCH);
+        sprintf(awtPath,"%s/lib/%s/libawt.so",java_home, LIBARCH);
         dprintf("JDK - %s\n",awtPath);
         awtHandle = dlopen(awtPath, RTLD_LAZY);