• Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 635 from 2007/10/23
    From: Gelsenkirchen,...
    At least I have an executable with this hack
    Code:
    --- misc.c.bak	2021-04-04 19:45:23 +0200
    +++ misc.c 2021-04-04 20:41:57 +0200
    @@ -315,6 +315,30 @@
    }
    #endif

    +#ifdef __MORPHOS__
    +void flockfile(FILE *F)
    +{
    +#if 0
    + if ((F >= (&__iob_func()[0])) && (F <= (&__iob_func()[_IOB_ENTRIES-1]))) {
    + _lock(_STREAM_LOCKS + (int)(F - (&__iob_func()[0])));
    + F->_flag |= _IOLOCKED;
    + } else
    + EnterCriticalSection(&(((_FILEX *)F)->lock));
    +#endif
    +}
    +
    +void funlockfile(FILE *F)
    +{
    +#if 0
    + if ((F >= (&__iob_func()[0])) && (F <= (&__iob_func()[_IOB_ENTRIES-1]))) {
    + F->_flag &= ~_IOLOCKED;
    + _unlock(_STREAM_LOCKS + (int)(F - (&__iob_func()[0])));
    + } else
    + LeaveCriticalSection(&(((_FILEX *)F)->lock));
    +#endif
    +}
    +#endif
    +
    FD open_file(const char *name)
    {
    #ifndef _WIN32
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17"
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.15
  • »04.04.21 - 19:55
    Profile