Re: Euphoria for FreeBSD!
- Posted by Ted Fines <fines at macalester.edu> Apr 20, 2002
- 442 views
'uname -s' shows OS name. Here's the Linux programmer's man page on uname. I'd bet that freeBSD has the same function. Someone would just have to inline some C code or wrap the function in Eu (by someone, I of course mean someone besides me!): UNAME(2) Linux Programmer's Manual UNAME(2) NAME uname - get name and information about current kernel SYNOPSIS #include <sys/utsname.h> int uname(struct utsname *buf); DESCRIPTION uname returns system information in the structure pointed to by buf. The utsname struct is as defined in <sys/utsname.h>: struct utsname { char sysname[SYS_NMLN]; char nodename[SYS_NMLN]; char release[SYS_NMLN]; char version[SYS_NMLN]; char machine[SYS_NMLN]; #ifdef _GNU_SOURCE char domainname[SYS_NMLN]; #endif }; RETURN VALUE On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS EFAULT buf is not valid. CONFORMING TO SVr4, SVID, POSIX, X/OPEN The domainname member is a GNU extension. SEE ALSO uname(1), getdomainname(2), gethostname(2) Linux 0.99.11 1993-07-24 UNAME(2) --On Saturday, April 20, 2002 4:08 PM +0000 jbrown105 at speedymail.org wrote: > > On 0, Robert Craig <rds at RapidEuphoria.com> wrote: >> >> I've released Euphoria 2.3 for FreeBSD. >> You can get the Interpreter and the Euphoria To C Translator >> for FreeBSD from: >> http://www.rapideuphoria.com/v20.htm >> > > I don't have it myself, but this is still excellent news. > >> You first have to install Euphoria for Linux, >> then replace exu with the one compiled for FreeBSD. >> The two platforms are so similar, I decided to let >> platform() return 3 for both of them. Otherwise >> a lot of existing Linux code would break needlessly on FreeBSD. >> > > Then how do I tell the difference between a FreeBSD platform and a > Linux platform? Some Linux code (not a lot, but some) may not run on > FreeBSD. > Perhaps a unix_platform() function, which returns 1 on Linux and 2 on > FreeBSD and 0 on DOS/Windows? > > jbrown > > > -- > Please don't use http://fastmail.fm > (I like feeling special.) > > > >