Changeset 1391 for branches/GNU/src/gcc/libjava/win32.cc
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (21 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 dir.info 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/win32.cc
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 // win32.cc - Helper functions for Microsoft-flavored OSs. 2 2 3 /* Copyright (C) 2002 Free Software Foundation3 /* Copyright (C) 2002, 2003 Free Software Foundation 4 4 5 5 This file is part of libgcj. … … 10 10 11 11 #include <config.h> 12 #include <platform.h> 12 13 #include <jvm.h> 13 14 #include <sys/timeb.h> 14 15 #include <stdlib.h> 15 16 16 #include "platform.h"17 17 #include <java/lang/ArithmeticException.h> 18 #include <java/lang/UnsupportedOperationException.h> 18 19 #include <java/util/Properties.h> 19 20 … … 29 30 } 30 31 32 // Platform-specific executable name 33 static char exec_name[MAX_PATH]; 34 // initialized in _Jv_platform_initialize() 35 36 const char *_Jv_ThisExecutable (void) 37 { 38 return exec_name; 39 } 40 31 41 // Platform-specific VM initialization. 32 42 void … … 38 48 MessageBox (NULL, "Error initialising winsock library.", "Error", 39 49 MB_OK | MB_ICONEXCLAMATION); 50 40 51 // Install exception handler 41 52 SetUnhandledExceptionFilter (win32_exception_handler); 53 54 // Initialize our executable name 55 GetModuleFileName(NULL, exec_name, sizeof(exec_name)); 42 56 } 43 57 … … 91 105 _Jv_Free (buffer); 92 106 } 93 107 94 108 // Use GetUserName to set 'user.name'. 95 109 buflen = 257; // UNLEN + 1 … … 102 116 } 103 117 104 // According to the api documentation for 'GetWindowsDirectory()', the 105 // environmental variable HOMEPATH always specifies the user's home 118 // According to the api documentation for 'GetWindowsDirectory()', the 119 // environmental variable HOMEPATH always specifies the user's home 106 120 // directory or a default directory. On the 3 windows machines I checked 107 121 // only 1 had it set. If it's not set, JDK1.3.1 seems to set it to … … 118 132 { 119 133 if (GetWindowsDirectory (winHome, MAX_PATH)) 120 134 SET ("user.home", winHome); 121 135 _Jv_Free (winHome); 122 136 } … … 136 150 { 137 151 sprintf (buffer, "%d.%d", (int) osvi.dwMajorVersion, 138 152 (int) osvi.dwMinorVersion); 139 153 SET ("os.version", buffer); 140 154 _Jv_Free (buffer); … … 151 165 SET ("os.name", "Windows Me"); 152 166 else 153 SET ("os.name", "Windows ??"); 167 SET ("os.name", "Windows ??"); 154 168 break; 155 169 … … 174 188 SYSTEM_INFO si; 175 189 GetSystemInfo (&si); 176 switch (si.dwProcessorType) 177 { 178 case PROCESSOR_INTEL_386: 179 SET ("os.arch", "i386"); 180 break; 181 case PROCESSOR_INTEL_486: 182 SET ("os.arch", "i486"); 183 break; 184 case PROCESSOR_INTEL_PENTIUM: 185 SET ("os.arch", "i586"); 186 break; 187 case PROCESSOR_MIPS_R4000: 188 SET ("os.arch", "MIPS4000"); 189 break; 190 case PROCESSOR_ALPHA_21064: 191 SET ("os.arch", "ALPHA"); 192 break; 190 switch (si.wProcessorArchitecture) 191 { 192 case PROCESSOR_ARCHITECTURE_INTEL: 193 SET ("os.arch", "x86"); 194 break; 195 case PROCESSOR_ARCHITECTURE_MIPS: 196 SET ("os.arch", "mips"); 197 break; 198 case PROCESSOR_ARCHITECTURE_ALPHA: 199 SET ("os.arch", "alpha"); 200 break; 201 case PROCESSOR_ARCHITECTURE_PPC: 202 SET ("os.arch", "ppc"); 203 break; 204 case PROCESSOR_ARCHITECTURE_IA64: 205 SET ("os.arch", "ia64"); 206 break; 207 case PROCESSOR_ARCHITECTURE_UNKNOWN: 193 208 default: 194 209 SET ("os.arch", "unknown"); … … 218 233 return i; 219 234 } 235 236 /* Placeholder implementation */ 237 int 238 _Jv_select (int, fd_set *, fd_set *, fd_set *, struct timeval *) 239 { 240 throw new java::lang::UnsupportedOperationException(JvNewStringUTF("_Jv_select() not implemented in Win32")); 241 return 0; 242 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.