Page MenuHomeFreeBSD

Move zstd malloc()/free()/calloc() macros to stdlib.h.
ClosedPublic

Authored by markj on Feb 13 2018, 3:57 PM.

Details

Summary

The issue with keeping them in the main compat header is that the macro
definitions leak into anything that includes zstd.h, which might include
native FreeBSD code.

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.

Event Timeline

markj created this revision.Feb 13 2018, 3:57 PM
allanjude accepted this revision.Feb 13 2018, 4:33 PM
This revision is now accepted and ready to land.Feb 13 2018, 4:33 PM
cem accepted this revision.Feb 13 2018, 5:13 PM
imp added a comment.Feb 13 2018, 5:33 PM

this looks fine, apart maybe from the copyright stuff...

But honestly, those few lines are likely not deserving of copyright protection...

sys/contrib/zstd/lib/freebsd/stdlib.h
2 ↗(On Diff #39255)

2015?

markj added a comment.Feb 13 2018, 5:52 PM
In D14352#300773, @imp wrote:

this looks fine, apart maybe from the copyright stuff...

But honestly, those few lines are likely not deserving of copyright protection...

I didn't really think so either, but it doesn't hurt to be conservative here.

sys/contrib/zstd/lib/freebsd/stdlib.h
2 ↗(On Diff #39255)

I just copied it from zstd_kfreebsd.h.

imp accepted this revision.Feb 13 2018, 5:57 PM
imp added inline comments.
sys/contrib/zstd/lib/freebsd/stdlib.h
2 ↗(On Diff #39255)

Fair enough.

This revision was automatically updated to reflect the committed changes.