1. Any chance of a BSD constant?
- Posted by D. Newhall <derek_newhall at yahoo.com> Feb 09, 2006
- 495 views
I'm a huge FreeBSD fan (best server OS ever) but never really used Euphoria on it for whatever reason until now. However, I've run into a problem with a script I wrote. This script does some security related stuff and needs to open a .so file. Sadly, on BSD I use a more reliable library than the one that Linux has but I need the script to work on both platforms but platform() returns LINUX for both. I had a workaround that used certain files in the filesystem heirarchy to determine the OS but I intend to use this on BSD as a jailed process and don't want to have to allow access to certain directories just to determine the platform. So, is there any chance of having a BSD constant for use by platform() for those of us that are developing for both BSD and Linux at a level where they differ? The Euphoria Standard Library project : http://esl.sourceforge.net/ The Euphoria Standard Library mailing list : https://lists.sourceforge.net/lists/listinfo/esl-discussion
2. Re: Any chance of a BSD constant?
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 09, 2006
- 486 views
D. Newhall wrote: > I'm a huge FreeBSD fan (best server OS ever) but never really used Euphoria > on it for whatever reason until now. However, I've run into a problem with a > script I wrote. This script does some security related stuff and needs to open > a .so file. Sadly, on BSD I use a more reliable library than the one that > Linux > has but I need the script to work on both platforms but platform() returns > LINUX > for both. I had a workaround that used certain files in the filesystem > heirarchy > to determine the OS but I intend to use this on BSD as a jailed process and > don't want to have to allow access to certain directories just to determine > the platform. So, is there any chance of having a BSD constant for use by > platform() > for those of us that are developing for both BSD and Linux at a level where > they differ? I guess something should be done about this. Unfortunately the obvious solution of adding BSD to the list of platform constants won't work. I've already set the platform values to be the same for Linux and FreeBSD, since 90% of the time that's what you want. A lot of code would break if I gave BSD it's own platform value. I guess for now, if you can't detect a difference, using getenv(), or open() or something, you could just add your own BSD constant to your code, and change one line of code when you copy to a Linux machine. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Any chance of a BSD constant?
- Posted by "Bruce M. Axtens" <bruce_axtens at yahoo.com.au> Feb 09, 2006
- 466 views
I'm just starting to get into FreeBSD. While we're waiting for a BSD constant, couldn't we get 'uname' to tell us what kind of platform we're on? Regards, Bruce. --- Warning: This web site contains images and information which might disturb some viewers, it may also affect the way you perceive the world around you -- http://www.answersingenesis.org.au
4. Re: Any chance of a BSD constant?
- Posted by D. Newhall <derek_newhall at yahoo.com> Feb 09, 2006
- 498 views
Bruce M. Axtens wrote: > > I'm just starting to get into FreeBSD. > > While we're waiting for a BSD constant, couldn't we > get 'uname' to tell us what kind of platform we're on? > > Regards, > Bruce. Most of the time, yes, but it's a common security tactic to disable it so anyone who gets shell access won't know the system specifics. The Euphoria Standard Library project : http://esl.sourceforge.net/ The Euphoria Standard Library mailing list : https://lists.sourceforge.net/lists/listinfo/esl-discussion
5. Re: Any chance of a BSD constant?
- Posted by ChrisBurch2 <crylex at freeuk.co.uk> Feb 09, 2006
- 491 views
Hi What does getenv("OSTYPE") return, in your jailed application? Chris
6. Re: Any chance of a BSD constant?
- Posted by Greg Haberek <ghaberek at gmail.com> Feb 09, 2006
- 480 views
> What does getenv("OSTYPE") return, in your jailed application? (just poking my $0.02 in here) Ubuntu Linux - getenv("OSTYPE") = "linux-gnu" Windows XP - getenv("OS") = "Windows_NT" ~Greg