[uClibc] Functions listed by SuSv3 but not (yet) included in uClibc

Alexander van Heukelum heukelum at freemail.nl
Wed Mar 10 10:09:55 UTC 2004


Hi again,

[ I forgot to CC this to the list, but this gives me the opportunity to
add that I checked my list of interfaces against the "UNIX® System API
tables". Every entry of my list exists in the apitables, but the
apitables contains 45 additional entries. The differences all arise,
because I considered only the functions that must be exported from the
C-library. See P.S.3. ]

Manuel wrote:
> > > > setjmp.h: setsigjmp
> > > Only visible with the appropriate feature test macros. See setjmp.h
> > > and the (conditional)
> > >  # define sigsetjmp(env, savemask) __sigsetjmp (env, savemask)
> > Does susv3 allow this? Why? (read: I don't like this! ;) )
>
> From the Rational section...
>
> The ISO C standard specifies various restrictions on the usage of the
> setjmp() macro in order to permit implementors to recognize the name in
> the compiler and not implement an actual function. These same
> restrictions apply to the sigsetjmp() macro.
>
> So sigsetjmp isn't guaranteed to be a function.

I see... In the description of the setjmp.h header, this caption is
placed above the list of functions: "The following may be declared as a
function, or defined as a macro, or both. Function prototypes shall be
provided."; A bit strange, isn't it? My script triggered on the
"Function prototypes shall be provided."

> Yes it is. But until I actually find a need for it, I don't plan to
> implement it unless contracted to do so.  Even porting the glibc
> implementation isn't really an option.  I looked at it a while back
> and the code is huge.  :-(

I looked at the susv3 description. It is probably a rather large
function (old_vfprintf-ish), but should not be huge. Probably glibc
adds a lot of extra functionality to this hopeless function.

> > The result (which I believe is correct): mandatory interfaces: 40,
> > optional interfaces: 144 and mathematical interfaces: 203.

You just talked a whole header file of the unimplemented 
interfaces list. Unfortunately there was only one unimplemented 
function left. So 40 -> 39 and remove "setjmp.h: setsigjmp".

Greetings,
        Alexander

P.S. My list of susv3 interfaces has 1095 entries, of which 17 are
duplicated because they are declared in (exactly) two header files.

P.S.2. 1-(39+144+203)/1078. = 64.2% of the interfaces is present.

P.S.3. Differences between the generated list and the "UNIX® System API
tables". All differences are expected.

Each of the following 11 entries must be a functions or a macro:
 - htonl, htons, ntohl, and ntohs (in arpa/inet.h)
 - _setjmp, setjmp, and sigsetjmp (in setjmp.h)
 - FD_CLR, FD_ISSET, FD_SET, and FD_ZERO (in sys/select.h and sys/time.h)

The following 19 entries must be implemented as macros:
 - assert (in assert.h)
 - _tolower and _toupper (in ctype.h)
 - fpclassify, isfinite, isgreater, isgreaterequal, isinf, isless,
        islessequal, islessgreater, isnan, isnormal, isunordered, and
        signbit (in math.h)
 - va_arg, va_copy, va_end, and va_start (in stdarg.h)

The following 3 entries must be macros or external variables:
 - errno (in errno.h)
 - h_errno (in netdb.h)
 - getdate_err (in time.h)

The following 12 entries must be a external variables:
 - signgam (in math.h)
 - stderr, stdin, and stdout (in stdio.h)
 - daylight, timezone, and tzname (in time.h)
 - environ, optarg, opterr, optind, and optopt (in unistd.h)

I did this search to double-check my list, but thought it could be
useful information for others too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getheaders.tar.bz2
Type: application/octet-stream
Size: 3354 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20040310/f22ac422/attachment.obj 


More information about the uClibc mailing list