source: installer/lib/wrapper/macosx/wrapper_unix.c.diff @ 20c42a17

Last change on this file since 20c42a17 was d6c3ffd, checked in by zzz <zzz@…>, 15 years ago

2005-09-17 jrandom

  • Added the natively compiled jbigi and patched java service wrapper for OS X. Thanks Bill Dorsey for letting me use your machine!
  • Don't build i2p.exe or i2pinstall.exe when run on OS X machines, as we don't bundle the binutils necessary (and there'd be a naming conflict if we did).
  • Added 'single user' functionality to syndie - if the single user checkbox on the admin page is checked, all users are allowed to control the instance and sync up with remote syndie nodes.
  • Temporarily disable the x-i2p-gzip in i2ptunnel until it is more closely debugged.
  • Property mode set to 100644
File size: 1.5 KB
  • src/c/wrapper_unix.c

    old new  
    309309#include <limits.h>
    310310#include <pthread.h>
    311311#include <pwd.h>
     312
     313#ifdef MACOSX
     314#include <sys/time.h>
     315#else
    312316#include <sys/timeb.h>
     317#endif
     318
    313319#include <sys/types.h>
    314320#include <sys/stat.h>
    315321#include <sys/wait.h>
     
    10561062    ssize_t bytesRead;
    10571063    char readBuf [1025];
    10581064    int readBufPos, childOutputBufferPos;
     1065#ifdef MACOSX
     1066    struct timeval timeBuffer;
     1067#else
    10591068    struct timeb timeBuffer;
     1069#endif
    10601070    long startTime;
    10611071    int startTimeMillis;
    10621072    long now;
     
    10641074    long durr;
    10651075   
    10661076    if (jvmOut != -1) {
     1077#ifdef MACOSX
     1078        gettimeofday(&timeBuffer, NULL);
     1079        startTime = now = timeBuffer.tv_sec;
     1080        startTimeMillis = nowMillis = timeBuffer.tv_usec / 1000;
     1081#else
    10671082        ftime( &timeBuffer );
    10681083        startTime = now = timeBuffer.time;
    10691084        startTimeMillis = nowMillis = timeBuffer.millitm;
     1085#endif
    10701086
    10711087        /*
    10721088        log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "now=%ld, nowMillis=%d", now, nowMillis);
     
    11591175            }
    11601176
    11611177            /* Get the time again */
     1178#ifdef MACOSX
     1179            gettimeofday(&timeBuffer, NULL);
     1180            now = timeBuffer.tv_sec;
     1181            nowMillis = timeBuffer.tv_usec / 1000;
     1182#else
    11621183            ftime( &timeBuffer );
    11631184            now = timeBuffer.time;
    11641185            nowMillis = timeBuffer.millitm;
     1186#endif
    11651187        }
    11661188    }
    11671189   
Note: See TracBrowser for help on using the repository browser.