Changeset 527


Ignore:
Timestamp:
01/31/09 21:10:41 (3 years ago)
Author:
mooneer
Message:

Changes necessary to get Kite to compile in Windows again.

Location:
interpreter/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • interpreter/trunk/modules/System/date/hires.c

    r523 r527  
    44#ifndef WIN32 
    55#include <unistd.h> 
     6#include <sys/time.h> 
     7#else 
     8#include <winsock2.h> 
     9#include <time.h> 
     10 
     11#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) 
     12  #define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64 
     13#else 
     14  #define DELTA_EPOCH_IN_MICROSECS  11644473600000000ULL 
     15#endif 
     16 
    617#endif /* WIN32 */ 
    718#include <errno.h> 
    819#define __USE_XOPEN 
    9 #include <sys/time.h> 
    1020 
    1121#include "kite_object.h" 
     
    3545    } 
    3646 
     47#ifdef WIN32 
     48struct timezone  
     49{ 
     50  int  tz_minuteswest; /* minutes W of Greenwich */ 
     51  int  tz_dsttime;     /* type of dst correction */ 
     52}; 
     53  
     54int gettimeofday(struct timeval *tv, struct timezone *tz) 
     55{ 
     56  FILETIME ft; 
     57  unsigned __int64 tmpres = 0; 
     58  static int tzflag; 
     59  
     60  if (NULL != tv) 
     61  { 
     62    GetSystemTimeAsFileTime(&ft); 
     63  
     64    tmpres |= ft.dwHighDateTime; 
     65    tmpres <<= 32; 
     66    tmpres |= ft.dwLowDateTime; 
     67  
     68    /*converting file time to unix epoch*/ 
     69    tmpres /= 10;  /*convert into microseconds*/ 
     70    tmpres -= DELTA_EPOCH_IN_MICROSECS;  
     71    tv->tv_sec = (long)(tmpres / 1000000UL); 
     72    tv->tv_usec = (long)(tmpres % 1000000UL); 
     73  } 
     74  
     75  if (NULL != tz) 
     76  { 
     77    if (!tzflag) 
     78    { 
     79      _tzset(); 
     80      tzflag++; 
     81    } 
     82    tz->tz_minuteswest = _timezone / 60; 
     83    tz->tz_dsttime = _daylight; 
     84  } 
     85  
     86  return 0; 
     87} 
     88#endif /* WIN32 */ 
    3789 
    3890/* Subtract the `struct timeval' values X and Y, 
  • interpreter/trunk/modules/System/digest.c

    r516 r527  
    55#include "kite_vm.h" 
    66 
    7 #import "md5.h" 
     7#include "digest/md5.h" 
    88 
    99KITE_CLASS_METHOD(Digest_md5file) 
  • interpreter/trunk/objs/kite_obj_locate.c

    r519 r527  
    302302    free(classname); 
    303303    if (word == NULL && loc == NULL) { 
     304        kite_object_t *exc; 
     305 
    304306        if (strncmp(class, "System.exceptions", strlen("System.exceptions")) == 0) 
    305307        { 
     
    314316         
    315317        /* Couldn't find module; throw exception. */ 
    316         kite_object_t *exc = kite_new_exception(thd, "System.exceptions.PackageNotFound",  
     318        exc = kite_new_exception(thd, "System.exceptions.PackageNotFound",  
    317319                                 class); 
    318320        kite_vm_call_method(thd, exc, "throw", kite_new_list(thd), TRUE); 
  • interpreter/trunk/windows/config.h

    r524 r527  
    114114 
    115115/* Define to the full name and version of this package. */ 
    116 #define PACKAGE_STRING "kite 1.0.0" 
     116#define PACKAGE_STRING "kite 1.0.1" 
    117117 
    118118/* Define to the one symbol short name of this package. */ 
     
    120120 
    121121/* Define to the version of this package. */ 
    122 #define PACKAGE_VERSION "1.0.0" 
     122#define PACKAGE_VERSION "1.0.1" 
    123123 
    124124/* Define to 1 if you have the ANSI C header files. */ 
  • interpreter/trunk/windows/ikt.vcproj

    r466 r527  
    6060                        <Tool 
    6161                                Name="VCLinkerTool" 
    62                                 AdditionalDependencies="gc_debug.lib" 
     62                                AdditionalDependencies="gc_debug.lib msvcrt.lib" 
     63                                IgnoreDefaultLibraryNames="msvcrtd.lib" 
    6364                                GenerateDebugInformation="true" 
    6465                                TargetMachine="1" 
  • interpreter/trunk/windows/kdb.vcproj

    r466 r527  
    6060                        <Tool 
    6161                                Name="VCLinkerTool" 
    62                                 AdditionalDependencies="gc_debug.lib" 
     62                                AdditionalDependencies="gc_debug.lib msvcrt.lib" 
     63                                IgnoreDefaultLibraryNames="msvcrtd.lib" 
    6364                                GenerateDebugInformation="true" 
    6465                                TargetMachine="1" 
  • interpreter/trunk/windows/kite.vcproj

    r466 r527  
    6060                        <Tool 
    6161                                Name="VCLinkerTool" 
    62                                 AdditionalDependencies="gc_debug.lib" 
     62                                AdditionalDependencies="gc_debug.lib msvcrt.lib" 
     63                                IgnoreDefaultLibraryNames="msvcrtd.lib" 
    6364                                GenerateDebugInformation="true" 
    6465                                TargetMachine="1" 
  • interpreter/trunk/windows/libkite.vcproj

    r465 r527  
    330330                                        </File> 
    331331                                        <File 
     332                                                RelativePath="..\modules\System\digest.c" 
     333                                                > 
     334                                        </File> 
     335                                        <File 
    332336                                                RelativePath="..\modules\System\directory.c" 
    333337                                                > 
     
    446450                                                <File 
    447451                                                        RelativePath="..\modules\System\vm\thread.c" 
     452                                                        > 
     453                                                </File> 
     454                                        </Filter> 
     455                                        <Filter 
     456                                                Name="date" 
     457                                                > 
     458                                                <File 
     459                                                        RelativePath="..\modules\System\date\hires.c" 
     460                                                        > 
     461                                                </File> 
     462                                        </Filter> 
     463                                        <Filter 
     464                                                Name="digest" 
     465                                                > 
     466                                                <File 
     467                                                        RelativePath="..\modules\System\digest\md5.c" 
     468                                                        > 
     469                                                </File> 
     470                                                <File 
     471                                                        RelativePath="..\modules\System\digest\md5.h" 
    448472                                                        > 
    449473                                                </File> 
     
    495519                                        <File 
    496520                                                RelativePath="..\modules\interface\language.kt" 
     521                                                > 
     522                                        </File> 
     523                                        <File 
     524                                                RelativePath="..\modules\interface\pop3.kt" 
     525                                                > 
     526                                        </File> 
     527                                        <File 
     528                                                RelativePath="..\modules\interface\smtp.kt" 
    497529                                                > 
    498530                                        </File> 
Note: See TracChangeset for help on using the changeset viewer.