9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ape/errno.h
@ 2012-12-17 22:06 Jeff Sickel
  2012-12-17 23:25 ` erik quanstrom
  2012-12-18  8:35 ` tlaronde
  0 siblings, 2 replies; 15+ messages in thread
From: Jeff Sickel @ 2012-12-17 22:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'm not familiar with the full history of /sys/include/ape/errno.h, but it looks like EISCON should be EISCONN to fit with other systems that at least pretend to be POSIX compliant.  SunOS 5.11 did have EISCON, but...


e.g.:

FreeBSD 9.0 /usr/include/errno.h && Mac OS X 10.8 (POSIX-compliant now) /usr/include/sys/errno.h both have:

#define	EISCONN		56		/* Socket is already connected */



/sys/include/ape/errno.h:

#define EISCON	53




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-17 22:06 [9fans] ape/errno.h Jeff Sickel
@ 2012-12-17 23:25 ` erik quanstrom
  2012-12-18  6:08   ` Jens Staal
  2012-12-18  8:35 ` tlaronde
  1 sibling, 1 reply; 15+ messages in thread
From: erik quanstrom @ 2012-12-17 23:25 UTC (permalink / raw)
  To: 9fans

On Mon Dec 17 17:38:33 EST 2012, jas@corpus-callosum.com wrote:
> I'm not familiar with the full history of /sys/include/ape/errno.h, but it looks like EISCON should be EISCONN to fit with other systems that at least pretend to be POSIX compliant.  SunOS 5.11 did have EISCON, but...

makes sense to me; there are no references to EISCON
on the system other than the include file.

- erik



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-17 23:25 ` erik quanstrom
@ 2012-12-18  6:08   ` Jens Staal
  2012-12-18  6:37     ` Lyndon Nerenberg
  0 siblings, 1 reply; 15+ messages in thread
From: Jens Staal @ 2012-12-18  6:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

In my porting of stuff using APE, I often notice that many applications
assume more members of the struct stat in sys/stat.h, especially
st_blocksize. Is there any reasonable similar information available
elsewhere in the system that could be used in a local "rpl_stat" struct for
those ports?

other annoying stuff are normally related to malloc/alloca and sys/mtio.h
stdint.h is normally easily just redirected to inttypes.h and stdbool.h can
also easily included.


2012/12/18 erik quanstrom <quanstro@quanstro.net>

> On Mon Dec 17 17:38:33 EST 2012, jas@corpus-callosum.com wrote:
> > I'm not familiar with the full history of /sys/include/ape/errno.h, but
> it looks like EISCON should be EISCONN to fit with other systems that at
> least pretend to be POSIX compliant.  SunOS 5.11 did have EISCON, but...
>
> makes sense to me; there are no references to EISCON
> on the system other than the include file.
>
> - erik
>
>

[-- Attachment #2: Type: text/html, Size: 1455 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18  6:08   ` Jens Staal
@ 2012-12-18  6:37     ` Lyndon Nerenberg
  0 siblings, 0 replies; 15+ messages in thread
From: Lyndon Nerenberg @ 2012-12-18  6:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 2012-12-17, at 10:08 PM, Jens Staal wrote:

> In my porting of stuff using APE,

The spec speaks.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-17 22:06 [9fans] ape/errno.h Jeff Sickel
  2012-12-17 23:25 ` erik quanstrom
@ 2012-12-18  8:35 ` tlaronde
  2012-12-18 10:16   ` Richard Miller
  1 sibling, 1 reply; 15+ messages in thread
From: tlaronde @ 2012-12-18  8:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Dec 17, 2012 at 04:06:46PM -0600, Jeff Sickel wrote:
> I'm not familiar with the full history of /sys/include/ape/errno.h, but it looks like EISCON should be EISCONN to fit with other systems that at least pretend to be POSIX compliant.  SunOS 5.11 did have EISCON, but...
>

It should be EISCONN, not because "other systems" have this, but because
it is in Sus v3.

The only reference for APE should be POSIX. One has enough "surprises"
with POSIX support on Unix like systems to not rely upon what they did
or do.

And to verify that a program passes the APE test is a good way to catch
systems idiosynchrasies, BTW...
--
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18  8:35 ` tlaronde
@ 2012-12-18 10:16   ` Richard Miller
  2012-12-18 16:43     ` Jeff Sickel
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Miller @ 2012-12-18 10:16 UTC (permalink / raw)
  To: 9fans

> It should be EISCONN, not because "other systems" have this, but because
> it is in Sus v3.

Patch submitted.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18 10:16   ` Richard Miller
@ 2012-12-18 16:43     ` Jeff Sickel
  2012-12-18 17:04       ` arnold
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Sickel @ 2012-12-18 16:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


>> It should be EISCONN, not because "other systems" have this, but because
>> it is in Sus v3.

Other systems were my only reference as I just didn't want to buy the
spec at this stage.  If anyone has a link to a freely available spec
then that would be a good reference point for APE in the future.


> Patch submitted.

Thanks for submitting this--I should read the docs and do my own push
in the future.

-jas





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18 16:43     ` Jeff Sickel
@ 2012-12-18 17:04       ` arnold
  2012-12-18 18:03         ` Jeff Sickel
  0 siblings, 1 reply; 15+ messages in thread
From: arnold @ 2012-12-18 17:04 UTC (permalink / raw)
  To: 9fans

Hi.

Jeff Sickel <jas@corpus-callosum.com> wrote:

> >> It should be EISCONN, not because "other systems" have this, but because
> >> it is in Sus v3.
>
> Other systems were my only reference as I just didn't want to buy the
> spec at this stage.  If anyone has a link to a freely available spec
> then that would be a good reference point for APE in the future.

http://pubs.opengroup.org/onlinepubs/009604599/basedefs/errno.h.html

This is from the 2004 standard (the first one google found) but the
2008 version should be findable from opengrouop.org somewhere. It won't
be too much different (we hope! :-).

HTH,

Arnold



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18 17:04       ` arnold
@ 2012-12-18 18:03         ` Jeff Sickel
  2012-12-18 18:21           ` arnold
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff Sickel @ 2012-12-18 18:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


>
> http://pubs.opengroup.org/onlinepubs/009604599/basedefs/errno.h.html
>
> This is from the 2004 standard (the first one google found) but the
> 2008 version should be findable from opengrouop.org somewhere. It won't
> be too much different (we hope! :-).

If the OpenGroup's so open why do I need an account to view/download
the Single UNIX Specification?  Or any of their specs for that matter...

https://www2.opengroup.org/ogsys/catalog/t101

Guess I'll dig through some other accounts to keep the IEEE lawyers happy.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18 18:03         ` Jeff Sickel
@ 2012-12-18 18:21           ` arnold
  2012-12-18 20:02             ` David du Colombier
  0 siblings, 1 reply; 15+ messages in thread
From: arnold @ 2012-12-18 18:21 UTC (permalink / raw)
  To: 9fans

Hi.

Jeff Sickel <jas@corpus-callosum.com> wrote:

> > http://pubs.opengroup.org/onlinepubs/009604599/basedefs/errno.h.html
> >
> > This is from the 2004 standard (the first one google found) but the
> > 2008 version should be findable from opengrouop.org somewhere. It won't
> > be too much different (we hope! :-).
>
> If the OpenGroup's so open why do I need an account to view/download
> the Single UNIX Specification?  Or any of their specs for that matter...
>
> https://www2.opengroup.org/ogsys/catalog/t101
>
> Guess I'll dig through some other accounts to keep the IEEE lawyers happy.

If you're happy with HTML:

http://pubs.opengroup.org/onlinepubs/9699919799/

(Google for "POSIX 2008 base definitions").

HTH,

Arnold



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18 18:21           ` arnold
@ 2012-12-18 20:02             ` David du Colombier
  2012-12-21 18:38               ` Jeff Sickel
  0 siblings, 1 reply; 15+ messages in thread
From: David du Colombier @ 2012-12-18 20:02 UTC (permalink / raw)
  To: 9fans

To sum things up a little, here are the different
versions of the Single UNIX Specification, available
from The Open Group:

SUSv2 (1997)
http://www.opengroup.org/onlinepubs/7990989775/

SUSv3 (POSIX.1-2001/2004)
http://www.opengroup.org/onlinepubs/009695399/

SUSv4 (POSIX.1-2008)
http://www.opengroup.org/onlinepubs/9699919799/

--
David du Colombier



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-18 20:02             ` David du Colombier
@ 2012-12-21 18:38               ` Jeff Sickel
  2012-12-21 18:39                 ` erik quanstrom
                                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jeff Sickel @ 2012-12-21 18:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Given all the Plan 9 spinoffs that still include APE, it might
be worth the effort at some point to bring APE up to SUSv3 or
SUSv4 to ease in porting code that's heavily POSIX-dependent.

Though there might not be enough time or energy to take on
such an endeavor.

-jas


On Dec 18, 2012, at 2:02 PM, David du Colombier <0intro@gmail.com> wrote:

> To sum things up a little, here are the different
> versions of the Single UNIX Specification, available
> from The Open Group:
>
> SUSv2 (1997)
> http://www.opengroup.org/onlinepubs/7990989775/
>
> SUSv3 (POSIX.1-2001/2004)
> http://www.opengroup.org/onlinepubs/009695399/
>
> SUSv4 (POSIX.1-2008)
> http://www.opengroup.org/onlinepubs/9699919799/
>
> --
> David du Colombier
>




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-21 18:38               ` Jeff Sickel
@ 2012-12-21 18:39                 ` erik quanstrom
  2012-12-21 18:54                 ` tlaronde
  2012-12-24  5:56                 ` Jens Staal
  2 siblings, 0 replies; 15+ messages in thread
From: erik quanstrom @ 2012-12-21 18:39 UTC (permalink / raw)
  To: 9fans

On Fri Dec 21 13:38:20 EST 2012, jas@corpus-callosum.com wrote:
> Given all the Plan 9 spinoffs that still include APE, it might
> be worth the effort at some point to bring APE up to SUSv3 or
> SUSv4 to ease in porting code that's heavily POSIX-dependent.
>
> Though there might not be enough time or energy to take on
> such an endeavor.
>

or even a will to live after the first 10k pages.  :-)

- erik



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-21 18:38               ` Jeff Sickel
  2012-12-21 18:39                 ` erik quanstrom
@ 2012-12-21 18:54                 ` tlaronde
  2012-12-24  5:56                 ` Jens Staal
  2 siblings, 0 replies; 15+ messages in thread
From: tlaronde @ 2012-12-21 18:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Dec 21, 2012 at 12:38:01PM -0600, Jeff Sickel wrote:
> Given all the Plan 9 spinoffs that still include APE, it might
> be worth the effort at some point to bring APE up to SUSv3 or
> SUSv4 to ease in porting code that's heavily POSIX-dependent.
>
> Though there might not be enough time or energy to take on
> such an endeavor.

YMMV. The problem is not really on the APE side, but---as noted in the
APE paper---that not a lot of programs out there are POSIX compliant.

One can mention the GNU ones, since GNU _is_ "GNU is Not Unix", and
departing from POSIX is a "feature" (I discovered this looooooooonnnng
years ago when I started with GNU/Linux Debian; asking why a POSIX.2
utility like ed(1) was not in the default install, the answer was:
because it is POSIX and GNU blabla, and Perl has everything...)

For kerTeX, I had less problems with APE than with various Unices where
there is always one bit of something that is not as the standard says.

So verifying that the current APE is SuS v3 compliant, for example, but
without extending its scope could be done and rather easily. Trying to
handle various POSIX extensions is more involved and should be done only
if there is a huge need of some external stuff---it could be simpler to
write from scratch a software or to fix the software.

But that's just my opinion ;)
--
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9fans] ape/errno.h
  2012-12-21 18:38               ` Jeff Sickel
  2012-12-21 18:39                 ` erik quanstrom
  2012-12-21 18:54                 ` tlaronde
@ 2012-12-24  5:56                 ` Jens Staal
  2 siblings, 0 replies; 15+ messages in thread
From: Jens Staal @ 2012-12-24  5:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

fredagen den 21 december 2012 12.38.01 skrev  Jeff Sickel:
> Given all the Plan 9 spinoffs that still include APE, it might
> be worth the effort at some point to bring APE up to SUSv3 or
> SUSv4 to ease in porting code that's heavily POSIX-dependent.
>
> Though there might not be enough time or energy to take on
> such an endeavor.
>
> -jas

Just recently, I copied a few files from the newlib libc into an application
to make it compile under APE.

I guess that the "low road" to take might be to basically do the same but to
generate a temporary "APE extension library" with kernel-independent libc code
copied from other projects (basially similar to what gnulib does).

Newlib and Musl libc are both permissively licensed so they should not be a
problem to use. Musl is currently linux-specific but perhaps there are kernel-
independent parts that could be used. I guess the most important thing is to
make sure that the things included in the extension library does not overlap
with the APE libraries.

The advantage with this approach could be that the real APE keeps clean and
can be developed at its own pace depending on what the needs are (and stuff
found useful from the extension library could be merged back to real APE after
being re-written according to the standards of Plan9).



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-12-24  5:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 22:06 [9fans] ape/errno.h Jeff Sickel
2012-12-17 23:25 ` erik quanstrom
2012-12-18  6:08   ` Jens Staal
2012-12-18  6:37     ` Lyndon Nerenberg
2012-12-18  8:35 ` tlaronde
2012-12-18 10:16   ` Richard Miller
2012-12-18 16:43     ` Jeff Sickel
2012-12-18 17:04       ` arnold
2012-12-18 18:03         ` Jeff Sickel
2012-12-18 18:21           ` arnold
2012-12-18 20:02             ` David du Colombier
2012-12-21 18:38               ` Jeff Sickel
2012-12-21 18:39                 ` erik quanstrom
2012-12-21 18:54                 ` tlaronde
2012-12-24  5:56                 ` Jens Staal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).