Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dinkum tests FreeBSD's C library

0 views
Skip to first unread message

pfgshiel...@yahoo.com

unread,
Mar 9, 2006, 8:48:47 PM3/9/06
to freebsd-...@freebsd.org
Hi again;

This might be slightly outdated but nevertheless interesting:

http://dinkumware.com/conform_c.html

For those too lazy to look ...

______________

FreeBSD C Library
C95
The following list covers the faults uncovered while testing compliance for
C95. With the headers iso646.h and wchar.h missing, the coverage for C95 is
minimal.

assert() does not raise SIGABRT
EILSEQ is not defined in errno.h
The header iso646.h is not included.
The header wchar.h is not included.
The function mbtowc does not correctly convert "" to a wide character string.
ferror fails to return an error indicator for a read of a file that was opened
using fopen with an argument mode of "w".
The optional math functions are not implemented for C95. (See Table 1.)

C++
The same issues that were found during the C95 testing are also present when
compiling for C++, plus the following.

The islpha, isalnum, iscntrl, isdigit, islower, isprint, ispunct, isspace,
isupper, isxdigit, tolower, and toupper functions in ctype.h are defined as
macros.
va_list is not defined in stdarg.h.
Not all the signatures called for by the C++ Standard for memchr, strchr,
strpbrk, strchr, and strstr are declared in string.h.
Not all the signatures called for by the C++ Standard for wmemchr, wcspbrk,
wcschr, wcsrchr, and wcsstr are declared in wchar.h.
The float and the long double versions of ceil, fabs, floor, fmod, frexp,
ldexp, modf, acos, asin, atan, atan2, cos, sin, tan, cosh, exp, log, log10,
sinh, sqrt and tanh functions are not declared in math.h.
The long int overloads of the functions abs and div are not declared in
stdlib.h.
Overloads abs(double) and pow(double, int) in math.h give bad or inaccurate
results.
setjmp is not defined as a macro in setjmp.h.
The functions feof, ferror, clearerr, getc, putc, getchar, and putchar in
stdio.h are defined as macros.
Overloads abs(long) and div(long, long) in stdlib.h are missing.
C99
The same issues that were found during the C95 testing are also present when
compiling for C99, plus the following.

The properties for unsigned long long are not reasonable, in a #if preprocessor
directive the statement ULLONG_MAX / 2 < LLONG_MAX evaluates to a nonzero.
The properties for long long are not reasonable, in a #if preprocessor
directive the statement LLONG_MAX < LONG_MAX evaluates to a nonzero.
The hh print specifier for d, i, o, u, x, or X conversion specifier does not
convert the value to a signed or unsigned char before printing.
The a and A print/scan specifiers are not implemented.
The e and f print specifiers display INFINITY as Inf. The C Standard indicates
that [-]inf or [-]infinity are the valid representations.
The F print specifier is not implemented.
The e or f print specifiers display NAN as NaN. The C Standard indicates that
[-]nan or [-]nan(n-char-sequence) are the valid representations.
The type lldiv_t is not define in stdlib.h.
The function _Exit is not declared in stdlib.h.
The functions llabs, lldiv, atoll, strtof, strtold are not declared in
stdlib.h.
F specifier for strftime is not implemented.
The header complex.h is not included.
The type imaxdiv_t is not defined in inttypes.h.
The functions imaxabs, imaxdiv, strtoimax, strtoumax, wcstoimax, and wcstoumax
are not declared in inttypes.h.
The functions nexttoward, acoshf, asinhf, atanhf, cbrtf, exp2f, expm1f, log1pf,
log2f, erff, erfcf, lgammaf, tgammaf, hypotf, nexttowardf, acoshl, asinhl,
atanhl, cbrtl, exp2l, expm1l, scalbnl, scalblnl, ilogbl, log1pl, log2l, logbl,
erfl, erfcl, lgammal, tgammal, copysignl, fdiml, fmal, fmaxl, fminl, hypotl,
remainderl, remquol, llrintl, llroundl, lrintl, lroundl, rintl, roundl,
nearbyintl, nextafterl, nexttowardl, truncl, and nanl are not declared in
math.h.
The header tgmath.h is not included.
_________________



___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it

David Leimbach

unread,
Mar 9, 2006, 9:20:10 PM3/9/06
to pfgshiel...@yahoo.com, freebsd-...@freebsd.org
That's the FreeBSD C library as was used in Darwin from Mac OS X
10.2 :-).

Dave

> _______________________________________________
> freebsd-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-standards
> To unsubscribe, send any mail to "freebsd-standards-
> unsub...@freebsd.org"

pfgshiel...@yahoo.com

unread,
Mar 9, 2006, 10:48:31 PM3/9/06
to David Leimbach, freebsd-...@freebsd.org

Yes, it's old and many of those have been fixed, but it's a good reference on
what might still be missing, given that this test suites are not available for
free.

They also have some library references available:
http://www.dinkumware.com/libraries_ref.html

cheers,

Pedro.

pa, The commercial library and test suite are being used by an OpenWatcom
developer:
http://www.openwatcom.org/index.php/Standard_C_Library_Tests


--- David Leimbach <lei...@mac.com> ha scritto:

> That's the FreeBSD C library as was used in Darwin from Mac OS X
> 10.2 :-).
>
> Dave
>
> On Mar 9, 2006, at 5:48 PM, pfgshiel...@yahoo.com wrote:
>
> > Hi again;
> >
> > This might be slightly outdated but nevertheless interesting:
> >
> > http://dinkumware.com/conform_c.html
> >

Dag-Erling Smørgrav

unread,
Mar 13, 2006, 2:24:52 AM3/13/06
to pfgshiel...@yahoo.com, freebsd-...@freebsd.org
<pfgshiel...@yahoo.com> writes:
> assert() does not raise SIGABRT

wrong; it calls abort(), which raises SIGABRT after resetting the
signal handler.

> EILSEQ is not defined in errno.h

EILSEQ was added shortly before 3.1-RELEASE in 1998.

> The header iso646.h is not included.

iso646.h was added before 3.0-RELEASE in 1998.

> The header wchar.h is not included.

wchar.h was added before 4.4-RELEASE in 2001.

> [much more]

need I go on?

DES
--
Dag-Erling Smørgrav - d...@des.no

pfgshiel...@yahoo.com

unread,
Mar 13, 2006, 8:23:39 AM3/13/06
to freebsd-...@freebsd.org

--- Dag-Erling Smørgrav <d...@des.no> ha scritto:

...


> > [much more]
>
> need I go on?
>

Hmm... it's rather weird that the first versions of MacOSX had such an outdated
libc. I'll check before posting from now on... sorry.

BTW, One thing that I noticed wrongly updated in our POSIX conformance page:
"Add -p option to the more utility"

The problem was not really adding -p, -p is there but is not posix compliant.
The problem is reported with Ref. number 255 on the "Known bugs in less" page.

cheers,

Pedro.

Roman Bogorodskiy

unread,
Mar 13, 2006, 5:21:26 PM3/13/06
to Dag-Erling Sm?rgrav, pfgshiel...@yahoo.com, freebsd-...@freebsd.org
Dag-Erling Sm?rgrav wrote:

> > [much more]
>
> need I go on?

Anyway, our libc is still missing quite a few math functions.

Roman Bogorodskiy

0 new messages