Page 1 of 2
posix compatable
Posted: Tue Aug 02, 2005 6:34 pm
by GLneo
what is exactly is posix compatable i know it is a unix compatablity standard but how do you be it, im having a lot of troble finding doc's ???
Re:posix compatable
Posted: Tue Aug 02, 2005 6:55 pm
by AR
Can't help you with the docs, but basically it's just a set of functions that your OS must provide to be "POSIX compatible", they are basically just extensions to the C standard library.
Edit:
http://standards.ieee.org/catalog/olis/posix.html
POSIX specs on IEEE.
Re:posix compatable
Posted: Wed Aug 03, 2005 12:06 am
by Solar
Note that POSIX was decided upon after each Unix-derivate already had its own soup cooking. So it's full of compromises, inconsistencies and fuzzy definitions. Otherwise you wouldn't need [tt]./configure[/tt] on POSIX-"compatible" systems to find out what works and what doesn't...
Posix compatibility is a waste of time!
Posted: Wed Aug 03, 2005 3:46 am
by tom1000000
Hi,
If you want posix compatibility then why not simply use Linux.
Try to be original when developing your Operating System's API.
As mentioned above posix is almost as bad as the win32 api, where some things are duplicated and / or inconsistent.
Create a whole new API and way of thinking is my recommendation.
A compiler / library could always translate c compatible posix code into using your native APIs.
Re:posix compatable
Posted: Wed Aug 03, 2005 4:04 am
by Pype.Clicker
hmm ... while i'm amongst people who believe it's time to break the enslavement about Posix/WinAPI and all the other crippling legacy, getting good documentation on it can still be interresting.
Posix exists. You can't deny that. And you can't deny the huge collection of POSIX stuff that are hanging around ... Being able to have a "posix emulator" (maybe something '? la WINE') that translates posix calls into your own system's calls could certainly be a benefit for your system (and one more nightmare for people writing POSIX programs
Re:posix compatable
Posted: Wed Aug 03, 2005 4:23 am
by Solar
Agreed. I myself don't want my system to be "POSIX compatible" because I really loathe it's API and much of the philosophy around it.
But then again: gcc, as, ld, make, vim, cvs, all of them just a ./configure away... I see where it's tempting.
Personally, I'd opt for a compatibility layer (see Cygwin.dll and how useful it is for Windows users, or how ixemul.library has kept the Amiga "alive"), and create a better mousetrap... erm, API underneath. If it's really good, people will use it. If it isn't, you still have a life as YAPS. (Yet Another POSIX System.)
Re:posix compatable
Posted: Wed Aug 03, 2005 8:31 am
by GLneo
well, i am working on a mult-compatible OS, i know menuet has cool aps and it's intruppts are cleanly documented and on int $0x40, if other OS's use use non clashing system calls it might work
Re:posix compatable
Posted: Wed Aug 03, 2005 9:32 am
by durand
Whenever I develop for UNIX, I always use the Single Unix specification as a guide:
http://www.opengroup.org/onlinepubs/007908799/
It's supposed to be a superset of posix (I believe but still have to confirm), and it details exactly what is supposed to be available on a UNIX system. Implementing the spec should provide not only posix-like compatibilty but also unix compatibilty for source.
Coincidentally, I've actually just begun re-arranging my C99 library to make it easily portable across OS's (very much like RedHat's newlibc except not as complicated, geez). I've managed to reduce the number of OS-dependant calls to about 10. I'm then thunking those 10 OS-dependant calls into my main OS/kernel library - like glue.
I'm documenting everything nicely.
For some other OS developer's, presuming that they have enough of their system implemented, it's going to be really easy for them to implement these OS-dependant calls and they will have full C99 compatibility within a few hours or whatever... And then once I've done that, I'll do the same thing with the UNIX library. I think it will be useful.
Re:posix compatable
Posted: Thu Aug 04, 2005 1:11 am
by Solar
Heh... and there I am, with the bare beginnings of a C99 lib sitting on SourceForge and waiting for me to finish and release it...
Where do you guys steal the time to get all those things done? I'm envious...
Re:posix compatable
Posted: Thu Aug 04, 2005 5:01 am
by tom1000000
durand wrote:
Coincidentally, I've actually just begun re-arranging my C99 library to make it easily portable across OS's (very much like RedHat's newlibc except not as complicated, geez). I've managed to reduce the number of OS-dependant calls to about 10. I'm then thunking those 10 OS-dependant calls into my main OS/kernel library - like glue.
I'm documenting everything nicely.
For some other OS developer's, presuming that they have enough of their system implemented, it's going to be really easy for them to implement these OS-dependant calls and they will have full C99 compatibility within a few hours or whatever... And then once I've done that, I'll do the same thing with the UNIX library. I think it will be useful.
Wow that is brilliant work I hope you release it to everyone (BSD or LGPL or GPL). Of course its up to you.
Re:posix compatable
Posted: Thu Aug 04, 2005 5:10 am
by Solar
tom1000000 wrote:
Wow that is brilliant work I hope you release it to everyone (BSD or LGPL or GPL).
I would like to point out that LGPL / GPL is not "for everyone", and that I would dispute it even for BSD. (That's why I started working on a
Public Domain C lib...)
Re:posix compatable
Posted: Thu Aug 04, 2005 6:30 am
by AR
Solar wrote:
tom1000000 wrote:
Wow that is brilliant work I hope you release it to everyone (BSD or LGPL or GPL).
I would like to point out that LGPL / GPL is not "for everyone", and that I would dispute it even for BSD. (That's why I started working on a
Public Domain C lib...)
Although I agree about the GPL, I don't really see what exactly is wrong with the [new] BSD licence, the terms basically amount to nothing more than "Do not use the author's name to endorse your derived product without approval" and "please include somewhere in the documentation that the program contains code that was originally written by XYZ" which hardly forces you to go out of your way for anything [documentation could be taken as the README file], or is this just an "absolute freedom" thing where it just isn't acceptable to have any terms? As far as I can tell it almost amounts to the same as public domain (In a public domain source file you still have to write "this file is public domain" on it)
Copyright (c) 2005, XYZ
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
And there's no reason that you can't remove or change any of the terms...
Re:posix compatable
Posted: Thu Aug 04, 2005 6:53 am
by Solar
Been there, discussed that, won't go there again. When I release code I want to be "free for all", it reads "use, modify, and/or redistribute at will".
But BSD is preferrable over (L)GPL - especially for a C library, since you aren't allowed to make the exception to the LGPL as glibc did since the LGPL "must not be modified"...
Re:posix compatable
Posted: Thu Aug 04, 2005 8:46 am
by durand
Agreed. With respect to a library, especially one as err.. "central" as a C library, then I think that public domain is preferably. All my code is released under the new BSD license. My libraries will be released under the new BSD license to kinda protect me ("use this code at your own risk. don't use my name to endorse your product.") but that's the limit of my license preference.
Re:posix compatable
Posted: Thu Aug 04, 2005 9:03 am
by Solar
I might get into contact with you after having a look at your sources, for possible inclusion in my PDClib under PD terms. Would that be OK with you? (In any case, keep me informed about the status of your release.)