]> granicus.if.org Git - sudo/commitdiff
Add howmany() macro since some systems have this in sys/param.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 20 Dec 2012 19:46:45 +0000 (14:46 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 20 Dec 2012 19:46:45 +0000 (14:46 -0500)
which we no longer include.

include/missing.h

index a060b7cc8336cf66ac648fc48b78bc66a158d256..8276065cfbe1f2c3ea9a238f1bec22923ec49277 100644 (file)
 # 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
  */