Using BSD queue.h for linked lists

John Hascall john at iastate.edu
Tue May 29 11:10:28 EDT 2012



If "ABI" is a concern, (but I don't think any of the structures
in question are currently publically visible), then perhaps the
solution is to copy the macros but change all the names:

  CIRCLEQ_ENTRY -> KRB5_CIRCLEQ_ENTRY

or some such.

John

-------------------------------------------------------------------------------
John Hascall, john at iastate.edu
Team Lead, NIADS (Network Infrastructure, Authentication & Directory Services)
IT Services, The Iowa State University of Science and Technology



> Nico Williams <nico at cryptonector.com> writes:
> 
> > I would hope that the krb5 API itself won't be depending on the
> > application using these macros.  Greg didn't imply that the API would
> > expose the BSD queue.h, so I don't see a problem.
> 
> It was unclear if "public" structures would contain the queue pointers.
> I had assumed "yes", which implies that k5-queue would necessarily be
> required for inclusion of those structures in an application.  Obviously
> it's not the case for 100% opaque objects where the application never
> gets the structure definition.
> 
> However, for public structures this means that if an application pulls
> in the krb structure header (that pulls in k5-queue) but the application
> also wants to use the standard queue, that could result in a double
> definition.
> 
> John,
> 
> > Perhaps I'm not following, but it's protected by:
> > 
> > #ifndef _SYS_QUEUE_H_
> > #define _SYS_QUEUE_H_
> >    ...
> > #endif
> 
> I would hope that k5-queue does not use #ifndef _SYS_QUEUE_H ...
> Moreover, what happens if the definitions change?  It would suck if the
> library is built with k5-queue but an application with sys/queue,
> especially if they don't provide the same ABI.  If we're copying the
> header then it is possible that they may diverge over time resulting in
> an ABI incompatibility.
> 
> > Nico
> 
> -derek
> 
> -- 
>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>        Member, MIT Student Information Processing Board  (SIPB)
>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>        warlord at MIT.EDU                        PGP key available
> _______________________________________________
> krbdev mailing list             krbdev at mit.edu
> https://mailman.mit.edu/mailman/listinfo/krbdev
> 



More information about the krbdev mailing list