l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2002 Oct 10 16:41

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] errno upon success (a real success)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] errno upon success (a real success)?



On Wed, Oct 09, 2002 at 08:28:14PM -0700, Peter Jay Salzman wrote:
> begin Micah J. Cowan <micah@cowan.name> 
> > On Wed, Oct 09, 2002 at 03:15:46PM -0700, Peter Jay Salzman wrote:
> > > does anyone know of an example where errno is set upon success that may
> > > not be as much of a stretch as taking the square root of infinity?
> > 
> > I'm pretty sure there are no such cases in C proper; dunno about
> > POSIX.
>  
> oi, i should know this by now.  sorry to have to ask, but what exactly
> is the difference between C proper and POSIX?  and where does ISO and
> ANSI fit in?

Well, the C language is defined in ISO/IEC 9899, whereas POSIX is
defined in IEEE 1003. I believe the POSIX standard is a collaborative
effort between IEEE, ISO and X/Open; but this may no longer be the
case (otherwise, it'd probably still be published as an ISO standard
rather than as an IEEE standard). I don't have my draft copy of POSIX
where I'm at now, so I'm not sure.

Standard C is often referred to as ISO C and sometimes (rather
imprecisely) as ANSI C. The latter reference is because C was
standardized by ANSI in 1989, and the exact same standard was accepted
by ISO as an International Standard in 1990. Currently, C is an ANSI
standard only *because* it is an ISO standard (and ANSI is a member of
ISO). So, "ISO C" is more accurate than "ANSI C".

POSIX defines scads of things. Some of them have pretty much nothing
to do with C; but a portion of it defines a set of header files and
extensions to the C programming language. Things like dirent.h, and
the open(), close(), read() and write() system calls (actually, *all*
standardized system calls) are from POSIX, not ISO C. Which is why none
of these are topical in comp.lang.c - that's what comp.unix.programmer
is for.

FWIW, ISO C doesn't even specify that, e.g., fopen() sets errno when a
file can't be open. IIRC, POSIX mandates that it does.

Another interesting difference: ISO C does not specify the size of a
"byte": only that it must be at *least* 8 bits (it could be
more). There are certain older systems which have non-octet bytes, and
also various modern CPUs which are used in embedded
applications. POSIX mandates that a byte is an octet.

HTH,
Micah
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!