[Glibc-bsd-commits] r4761 - in trunk/freebsd-glue: debian include/sys

Robert Millan rmh at alioth.debian.org
Tue Jul 16 13:20:22 UTC 2013


Author: rmh
Date: 2013-07-16 13:20:22 +0000 (Tue, 16 Jul 2013)
New Revision: 4761

Modified:
   trunk/freebsd-glue/debian/changelog
   trunk/freebsd-glue/include/sys/param.h
Log:
Add roundup2 in <sys/param.h>. It is no longer provided by glibc (??).

Modified: trunk/freebsd-glue/debian/changelog
===================================================================
--- trunk/freebsd-glue/debian/changelog	2013-07-16 11:31:36 UTC (rev 4760)
+++ trunk/freebsd-glue/debian/changelog	2013-07-16 13:20:22 UTC (rev 4761)
@@ -2,6 +2,8 @@
 
   * Include <grp.h> in <unistd.h> (for initgroups).
   * Add __containerof() to <sys/cdefs.h>.
+  * Add roundup2 in <sys/param.h>. It is no longer provided by glibc
+    (??).
 
  -- Robert Millan <rmh at debian.org>  Wed, 10 Jul 2013 00:12:06 +0200
 

Modified: trunk/freebsd-glue/include/sys/param.h
===================================================================
--- trunk/freebsd-glue/include/sys/param.h	2013-07-16 11:31:36 UTC (rev 4760)
+++ trunk/freebsd-glue/include/sys/param.h	2013-07-16 13:20:22 UTC (rev 4761)
@@ -1,3 +1,40 @@
+/*-
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)param.h	8.3 (Berkeley) 4/4/95
+ * $FreeBSD$
+ */
+
 #include_next <sys/param.h>
 
 #ifdef __FreeBSD_kernel__
@@ -12,12 +49,15 @@
 #undef __FreeBSD_version
 #define __FreeBSD_version	1000010
 
-/* FreeBSD code expects that this file implicitly defines SIG* macros.  */
+/* For SIG* */
 #include <signal.h>
 
-/* FreeBSD code expects that this file includes... */
 #include <sys/types.h>
 
+#  ifndef roundup2
+#   define		roundup2(x, y)  (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
+#  endif
+
 #endif
 
 #endif




More information about the Glibc-bsd-commits mailing list