On Thu, Feb 15, 2018 at 12:06 PM, Graham Leggett <minf...@sharp.fm> wrote: > On 15 Feb 2018, at 5:03 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote: > >> I've long been in favor of every httpd struct having an exposed _create() >> function. It hadn't occurred to me to expose either a _sizeof() or _copy() >> accessor, but mod_ftp could use this (until Stefan introduced the idea of >> run time server_rec merging.) >> >> What is the preference? _sizeof() or _copy()? > > I’m guessing they’re both useful. The implementations could in theory be > macros?
How does a macro solve binary compatibility? The point is to ensure that sizeof(struct given_rec) changes in a previously compiled module, when the core httpd is upgraded and more members added to struct given_rec, that the entire given_rec contents are copied to their new buffer, without being aware of the contents or purpose of those unanticipated new members.