[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (c.harding 22644) Re: (c.harding 22613) int vs long in ldapext-ldap-c-api-01



Dear Kurt,

>At 08:50 AM 11/19/98 +0000, Chris Harding wrote:
>>Hi -
>>
>>The draft new ISO C standard defines a number of integer types of exact and
>>minimum sizes.  Why not use these?
>
>I believe the C API specification should be defined in terms of Standard
>C but not require implementations nor applications to be written in
>Standard C.  This was the approach taken with POSIX and has suited both
>implementors and application developers well.
>
>As such, the C API should only require types/structures/defines that are
>available in LCD C (Least Common Denominator C).  Requiring a type which
>is widely available would not be wise.
>
Implementations that don't support the new ISO C (which after all isn't
a standard yet) can always define the types by typedef.

>In addition, I feel that implementation provided headers should be:
>	1) idempotent
>		You can include the same header more than once.
>		The effect is as if you included it once.
Agreed.

>	2) mutually independent
>		No header requires that another header (including
>		system headers) be included for it to work properly.
>		Nor does the header include (or cause to be included)
>		any system header or other header defined by the API.
Agreed that this is desirable - but it may not always be possible.

>	3) equivalent to file level declarations
>		ldap headers must be included before the application
>		refers to anything that the header defines or declares.
You can even go further and require the application to define feature-
test macros, as in POSIX.

>	4) well documented
>		The draft need to state which headers are required
>		by the implementation and details about their content.
>
Absolutely agreed!

>(the above was derived from Standard C library header requirements)
>
>The motivation behind these suggestion is to allow implementations
>that are C translator neutral and to allow application developers
>to use the available features of these C translators.
>
I don't agree completely with this, although making things independant
of things that they don't need to depend on always sounds a good idea.
If this principle had always been followed then the innovations
introduced by the present ISO C standard - in particular function
prototypes and the const modifier, would never be used. This would
be a pity, as they are useful in interface definitions.


Regards,

Chris
+++++

-------------------------------------------------------------------------
           Chris Harding
  T H E    Development Manager
 O P E N   Apex Plaza, Forbury Road, Reading RG1 1AX, UK
G R O U P  Mailto:c.harding@opengroup.org   Ph: +44 118 950 8311 x2262
           WWW: http://www.opengroup.org    Fx: +44 118 950 0110  

OSF/1, Motif, UNIX and the "X" device are registered trademarks in
the US and other countries, and IT DialTone and The Open Group are
trademarks of The Open Group.
-------------------------------------------------------------------------