Add a set of D defines based on the contents of socket.h
ClosedPublic

Authored by gnn on Sep 6 2017, 2:28 AM.

Details

Summary

Pulls in the various SO_, AF_, and PF_ defines for use in D scripts

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gnn created this revision.Sep 6 2017, 2:28 AM
gnn updated this revision to Diff 32699.Sep 6 2017, 2:31 AM
gnn edited the summary of this revision. (Show Details)
gnn added reviewers: markj, DTrace.
markj added a comment.Sep 7 2017, 2:23 AM

This should go in cddl/lib/libdtrace so that it gets included automatically like the rest of the libraries. Otherwise it seems ok to me.

We really need a way to avoid duplicating these definitions. I think illumos has some build-time sed script that substitutes the values from the corresponding header, but I haven't looked at it closely.

markj added a comment.Sep 7 2017, 2:23 AM

Also missing a makefile update.

gnn added a comment.Sep 7 2017, 2:35 AM

It bugs me to have new, BSD licensed, code in the cddl directory but I'm OK with this being there for now. And, yes, we need an automagic way to generate these.

This revision was automatically updated to reflect the committed changes.