Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/win32.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// win32.cc - Helper functions for Microsoft-flavored OSs.
    22
    3 /* Copyright (C) 2002  Free Software Foundation
     3/* Copyright (C) 2002, 2003  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    1010
    1111#include <config.h>
     12#include <platform.h>
    1213#include <jvm.h>
    1314#include <sys/timeb.h>
    1415#include <stdlib.h>
    1516
    16 #include "platform.h"
    1717#include <java/lang/ArithmeticException.h>
     18#include <java/lang/UnsupportedOperationException.h>
    1819#include <java/util/Properties.h>
    1920
     
    2930}
    3031
     32// Platform-specific executable name
     33static char exec_name[MAX_PATH];
     34  // initialized in _Jv_platform_initialize()
     35
     36const char *_Jv_ThisExecutable (void)
     37{
     38  return exec_name;
     39}
     40
    3141// Platform-specific VM initialization.
    3242void
     
    3848    MessageBox (NULL, "Error initialising winsock library.", "Error",
    3949                MB_OK | MB_ICONEXCLAMATION);
     50
    4051  // Install exception handler
    4152  SetUnhandledExceptionFilter (win32_exception_handler);
     53
     54  // Initialize our executable name
     55  GetModuleFileName(NULL, exec_name, sizeof(exec_name));
    4256}
    4357
     
    91105      _Jv_Free (buffer);
    92106    }
    93  
     107
    94108  // Use GetUserName to set 'user.name'.
    95109  buflen = 257;  // UNLEN + 1
     
    102116    }
    103117
    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
    106120  // directory or a default directory.  On the 3 windows machines I checked
    107121  // only 1 had it set.  If it's not set, JDK1.3.1 seems to set it to
     
    118132            {
    119133              if (GetWindowsDirectory (winHome, MAX_PATH))
    120                 SET ("user.home", winHome);
     134        SET ("user.home", winHome);
    121135              _Jv_Free (winHome);
    122136            }
     
    136150        {
    137151          sprintf (buffer, "%d.%d", (int) osvi.dwMajorVersion,
    138                    (int) osvi.dwMinorVersion);
     152           (int) osvi.dwMinorVersion);
    139153          SET ("os.version", buffer);
    140154          _Jv_Free (buffer);
     
    151165              SET ("os.name", "Windows Me");
    152166            else
    153               SET ("os.name", "Windows ??"); 
     167              SET ("os.name", "Windows ??");
    154168            break;
    155169
     
    174188  SYSTEM_INFO si;
    175189  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:
    193208      default:
    194209        SET ("os.arch", "unknown");
     
    218233  return i;
    219234}
     235
     236/* Placeholder implementation */
     237int
     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}
Note: See TracChangeset for help on using the changeset viewer.