Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jonok

#1
newLISP newS / Re: newLISP Stable Release v.10.5.4
December 15, 2013, 03:27:35 PM
I took a punt on equating Cygwin to Win32 so I put in msvcrt.dll, and it worked.



BTW, you should look closely at my fix ... it's completely naive.
#2
newLISP newS / Re: newLISP Stable Release v.10.5.4
December 14, 2013, 02:19:29 PM
I can confirm that installing cygserver makes the semaphore test succeed!



Also, after tweaking qa-ffi to handle CYGWIN (by equating Windows to Cygin), eg replacing Win32 test with



(if (or (= ostype "Win32") (= ostype "Cygwin"))



all tests pass ...



$ make testall

make checkall | grep '>>>'

>>>>> ALL FUNCTIONS FINISHED SUCCESSFUL: ./newlisp

>>>>> Dictionary API tested SUCCESSFUL

>>>>> XML API tested SUCCESSFUL

>>>>> XML callback tested SUCCESSFUL

>>>>> JSON translation tested SUCESSFUL

>>>>> Signal testing SUCCESSFUL

>>>>> Network eval and network file functions IPv4 SUCCESSFUL

 >>>> Cannot bind socket. Cannot test IPv6 on this platform.

>>>>> The Cilk API tested SUCCESSFUL

>>>>> Reference testing SUCCESSFUL

>>>>> Time per simple message: 31 micro seconds

>>>>> Time per round trip : 160 micros seconds

>>>>> Time per proxy trip: 310 micro seconds

>>>>> Message API tested SUCCESSFUL

>>>>> Memory allocation/deallocation SUCCESSFUL

>>>>> Exception testing SUCCESSFUL

>>>>> Floating point tests SUCCESSFUL

>>>>> FOOP nested 'self' tested SUCCCESSFUL

>>>>> FOOP symbol protection SUCCESSFUL

>>>>> UNIX local domain sockets SUCCESSFUL

>>>>> In-place modification passed SUCCESSFUL

>>>>> qa-utf16path: This test is only used on UTF8 enabled versions.

>>>>> 0.047 ms per write->read pipe/fork (0.0356 ms Mac OSX, 1.83 GHz Core 2 Duo)

>>>>> ffilib API testing SUCCESSFUL

>>>>> callback API 1234567890 (simple callback API) SUCCESSFUL

>>>>> callback API 1234567890 12345.6789 (extended callback API) SUCCESSFUL

>>>>> struct tested SUCCESSFUL

>>>>> struct ptr tested SUCCESSFUL

>>>>> abs, float, bigint, +, -, *, /, % big integers tested SUCCESSFUL

>>>>> parsing big integers SUCCESSFUL

>>>>> Benchmarking all non I/O primitives ... may take a while ...

>>>>> Performance ratio: 0.48 (1.0 on Mac OSX, 1.83 GHz Core 2 Duo, newLISP v10.2.8)
#3
newLISP newS / Re: newLISP Stable Release v.10.5.4
December 14, 2013, 01:01:46 AM
OK ... after some more digging ... I enabled using the cygwin libffi packages and ffi.h.

I also testing using the default FFI stuff in the source distribution ... (ie I just fixed the bracket placement as in previous post) and it behaves exactly the same.



newlisp compiles and the qa-specific-test run by make test all run SUCCESSFULLY



the qa-dot test runs but fails at semaphore



jon@jon-Z930 /cygdrive/c/src/newlisp-10.5.4

$ ./newlisp.exe qa-dot > test_qa_dot.txt



Testing built-in functions ...

Bad system call (core dumped)  



jon@jon-Z930 /cygdrive/c/src/newlisp-10.5.4

$ tail test_qa_dot.txt

  -> rotate          

  -> round          

  -> save          

  -> search          

  -> seed          

  -> seek          

  -> select          

  -> self          

  -> semaphore          



If there's interest in getting cygwin back as a supported platform, I'm happy to help.



Jon
#4
newLISP newS / Re: newLISP Stable Release v.10.5.4
December 14, 2013, 12:37:26 AM
I gather CYGWIN isn't supported any more ... but in any case I found an error in the code



in nl-import.c  if FFI is NOT defined and CYGWIN IS, it breaks the following code, as there is a bracket inside the #ifdef that I'm presuming shouldn't be.



This is the cause of the weird error ...

nl-import.c:470:5: error: static declaration of 'template' follows non-static declaration



With this fix in place, newlisp compiles

the bracket with the FIX comment is currently inside the #ifdef FFI



starting from line 134 of nl-import.c

------------------

#ifdef CYGWIN

if(params != nilCell)

    {

    if(params->next == nilCell)

        {

        params = getString(params, &options);

        if(strcmp(options, "cdecl") ==  0)

            type = CELL_IMPORT_CDECL;

        }

#ifdef FFI

    else type = CELL_IMPORT_FFI;

#endif

    } /* FIX moved from inside previous ifdef FIX */

#else

if(params->next != nilCell)

    type = CELL_IMPORT_FFI;

#endif

------------------



PS, I'm not sure why FFI is NOT defined ... as I have the cygwin libffi installed ... not sure if it's relevant or not.