Add howmany() macro since some systems have this in sys/param.h

which we no longer include.
This commit is contained in:
Todd C. Miller
2012-12-20 14:46:45 -05:00
parent 652d0de98a
commit a449e8b3e7

View File

@@ -149,6 +149,13 @@
# define MAX(a,b) (((a)>(b))?(a):(b))
#endif
/*
* Some systems define this in <sys/param.h> but we don't include that anymore.
*/
#ifndef howmany
# define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
/*
* Older systems may be missing stddef.h and/or offsetof macro
*/