Re: 'native' and errno or *Err
Hi Randall, How do I get the value of errno after my call? Now there is an 'errno' function (64 bits only). For example: : (in mist (read)) # Produce an error !? (in mist (read)) mist -- Open error: No such file or directory : (errno) # Get the error number - 2 Then this also works: : (native NIL strerror 'S (errno)) - No such file or directory Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: 'native' and errno or *Err
Hi Alex, I tried to compile the 64 bit version on my macbook yesterday - no joy. I think I have to create the /usr/bin/picolisp and /usr/lib/picolisp links to the 32 bit version and then create the .s files. I didn't get that far yet. Thanks for the 'errno' call. I'll try again this evening btw. The 64 V3 version runs my sum.l flawlessly too. Rand On Tue, Jul 14, 2009 at 9:11 AM, Alexander Burgera...@software-lab.de wrot= e: Hi Randall, How do I get the value of errno after my call? Now there is an 'errno' function (64 bits only). For example: =C2=A0 : (in mist (read)) =C2=A0# Produce an error =C2=A0 !? (in mist (read)) =C2=A0 mist -- Open error: No such file or directory =C2=A0 : (errno) =C2=A0# Get the error number =C2=A0 - 2 Then this also works: =C2=A0 : (native NIL strerror 'S (errno)) =C2=A0 - No such file or directory Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: 'native' and errno or *Err
Hi Randall, I tried to compile the 64 bit version on my macbook yesterday - no joy. I think I have to create the /usr/bin/picolisp and /usr/lib/picolisp links to the 32 bit version and then create the .s files. I didn't get that far yet. This should not be necessary. The .s files are in the release already, so calling 'make' should only invoke the GNU assembler. Only if you modify one of the src64/*.l files, you need a runnable bin/picolisp (no matter if 32 or 64 bits) to re-create the *.s files. Thus, a bootstrapping without a pre-installed PicoLisp should work. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Compiling on Mac (was: 'native' and errno or *Err)
Hi Alex, I don't have the specifics in my head, but it complains that it cannot find *darwin*.s files. And when I just try as linux.*.s I get a lot of error messages. I haven't looked deeper yet, but the as may be tuned somehow for Mac - it is GNU as, but . I'll take a closer look this evening and let you know (post my findings her= e). Cheers, - Rand On Tue, Jul 14, 2009 at 9:46 AM, Alexander Burgera...@software-lab.de wrot= e: Hi Randall, I tried to compile the 64 bit version on my macbook yesterday - no joy. I think I have to create the /usr/bin/picolisp and /usr/lib/picolisp links to the 32 bit version and then create the .s files. =C2=A0I didn't get that far yet. This should not be necessary. The .s files are in the release already, so calling 'make' should only invoke the GNU assembler. Only if you modify one of the src64/*.l files, you need a runnable bin/picolisp (no matter if 32 or 64 bits) to re-create the *.s files. Thus, a bootstrapping without a pre-installed PicoLisp should work. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: Compiling on Mac (was: 'native' and errno or *Err)
Hi Randall, I don't have the specifics in my head, but it complains that it cannot find *darwin*.s files. Ah, yes, sorry! This makes sense. Makefile looks at the system. I don't know how similar Darwin is to Linux. Perhaps we should start with copying the file src64/x86-64.linux.base.s - src64/x86-64.darwin.base.s src64/x86-64.linux.ext.s - src64/x86-64.darwin.ext.s and try 'make' again (the 'ext' is not really necessary, but Makefile wants to see it). If it works, the corresponding sources src64/sys/linux.defs.l - src64/sys/darwin.defs.l src64/sys/linux.code.l - src64/sys/darwin.code.l should be copied, and adjusted as necessary. I made a simple C program that displays the 'defs' on the actual system, I'll send it to you if necessary. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
'native' and errno or *Err
Hi Alex, I am trying to use 'native', am getting only 'NIL' as the return value, where I would like to be getting a file descriptor number. How do I get the value of errno after my call? Cheers, - Rand -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe
Re: 'native' and errno or *Err
Hi Randall, I am trying to use 'native', am getting only 'NIL' as the return value, where I would like to be getting a file descriptor number. If you supply the symbol 'I' as the ret argument to native, (native fun lib ret val ..) you'll get the int return value from the native function. For example: : (native NIL printf 'I hello^J) hello - 6 How do I get the value of errno after my call? Oops, there is no interface yet. Will be in the future. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe